/* Modern Dark UI for vid123 */
:root {
    --bg: #0d1117;
    --card-bg: #161b22;
    --border: #30363d;
    --primary: #ff4d6d;
    --primary-hover: #e63956;
    --accent-red: #ff4d6d;
    --text: #f0f6fc;
    --text-muted: #8b949e;
    --tag-color: #f472b6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    min-height: 100vh;
    line-height: 1.5;
}

/* Navbar */
.navbar {
    background: #090d13;
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

/* Category Navigation Tabs in Navbar */
.nav-categories {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-categories::-webkit-scrollbar { display: none; }

.cat-tab {
    padding: 0.5rem 1.2rem;
    border-radius: 20px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-muted);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.cat-tab:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.cat-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35);
}

/* Top-Right Search Icon & Dropdown */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-search-icon {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: 0.2s all;
}

.btn-search-icon:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Expandable Search Drawer / Bar */
.search-drawer {
    display: none;
    background: #090d13;
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.5rem;
}
.search-drawer.open {
    display: block;
}
.search-form-drawer {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}
.search-input-drawer {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.7rem 1.2rem;
    padding-right: 40px;
    color: #fff;
    font-size: 0.95rem;
    outline: none;
}
.search-input-drawer:focus {
    border-color: var(--primary);
}

/* Main Container */
.main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 1.5rem 4rem;
}

.section-header {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}

/* Grid Layout */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.5rem;
    align-items: start;
}

/* Post Card */
.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 77, 109, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
}

/* Image Container */
.post-thumb-wrapper {
    width: 100%;
    background: #000;
    overflow: hidden;
    position: relative;
    display: block;
}

.post-thumb {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.post-card:hover .post-thumb {
    transform: scale(1.03);
}

.price-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(13, 17, 23, 0.85);
    border: 1px solid rgba(255, 77, 109, 0.5);
    color: #ff4d6d;
    font-weight: 800;
    font-size: 0.95rem;
    padding: 4px 10px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    z-index: 2;
}

.post-content {
    padding: 1.1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.post-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 0.35rem;
}

.post-category {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--tag-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

/* Single Price Footer */
.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: auto;
}

.post-price-display {
    font-size: 1.2rem;
    font-weight: 800;
    color: #ff4d6d;
}

.btn-buy {
    background: linear-gradient(135deg, #ff4d6d 0%, #d91b4a 100%);
    color: #fff;
    padding: 0.55rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.88rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 77, 109, 0.35);
}

.btn-buy:hover {
    background: linear-gradient(135deg, #ff6b8b 0%, #ff4d6d 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 77, 109, 0.5);
}

/* Multi-Tier Rows inside Card (For Single Category / Pack Options) */
.card-tier-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.card-tier-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 8px;
    padding: 0.5rem 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s all;
}
.card-tier-item:hover {
    background: rgba(255, 77, 109, 0.06);
    border-color: rgba(255, 77, 109, 0.3);
}

.card-tier-left {
    font-size: 0.88rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-tier-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-tier-prc {
    font-size: 1rem;
    font-weight: 800;
    color: #ff4d6d;
}

.btn-buy-mini {
    background: linear-gradient(135deg, #ff4d6d 0%, #d91b4a 100%);
    color: #fff;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.78rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: 0.2s transform;
}
.btn-buy-mini:hover {
    transform: scale(1.05);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-wrap: wrap;
        gap: 0.8rem;
    }
    .nav-categories {
        order: 3;
        width: 100%;
        justify-content: flex-start;
        padding-top: 0.4rem;
    }
    .posts-grid {
        grid-template-columns: 1fr;
    }
}
