:root {
    /* Dark Theme (Default) */
    --bg-color: #050505;
    --surface-color: #121212;
    --text-primary: #ffffff;
    --text-secondary: #a0a0a0;
    --accent-primary: #00ff88;
    --accent-secondary: #7000ff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    --neon-glow: 0 0 20px rgba(0, 255, 136, 0.3);

    --container-max: 1400px;
    --transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.light-theme {
    /* Base Colors — matched to reference design */
    --bg-color: #eef2f6;
    --surface-color: #ffffff;
    --text-primary: #0b1220;
    --text-secondary: #475569;
    --accent-primary: #00b86b;
    --accent-secondary: #007aa3;
    --glass-bg: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(15, 23, 42, 0.14);
    --card-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    --neon-glow: 0 0 20px rgba(0, 184, 107, 0.35);

    /* Extended Palette */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-elevated: #ffffff;
    --text-tertiary: #94a3b8;
    --text-inverse: #ffffff;
    --accent-gold: #f59e0b;
    --accent-gold-dark: #d97706;
    --accent-gold-light: #fbbf24;
    --accent-blue: #3b82f6;
    --accent-blue-dark: #2563eb;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    --gradient-gold: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-blue: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --gradient-hero: linear-gradient(
        135deg,
        #f8fafc 0%,
        #eef2f6 50%,
        #f1f5f9 100%
    );
    --gradient-card: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.4) 0%,
        rgba(255, 255, 255, 0.2) 100%
    );
    --border-color: rgba(15, 23, 42, 0.14);
    --border-light: #f1f5f9;
    --border-dark: #cbd5e1;
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm:
        0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md:
        0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg:
        0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl:
        0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-gold: 0 10px 40px -10px rgba(0, 184, 107, 0.3);
    --shadow-blue: 0 10px 40px -10px rgba(59, 130, 246, 0.3);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
    --hero-orb-1: #a7f3d0;
    --hero-orb-2: #bfdbfe;
    --hero-text: #0b1220;
    --hero-subtitle: #475569;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: "Outfit", sans-serif;
    line-height: 1.6;
    transition:
        background-color 0.5s ease,
        color 0.5s ease;
}

h1,
h2,
h3,
h4 {
    font-family: "Space Grotesk", sans-serif;
    font-weight: 700;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* Glassmorphism / Cards */
.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    position: relative;
    display: flex;
}

body.dark-theme .glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    background: var(--glass-bg);
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: center;
    /* Center the segments */
    align-items: stretch;
    background: transparent;
    padding: 20px 24px;
    gap: 15px;
    height: auto;
    min-height: 80px;
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: var(--container-max);
    margin: 0 auto;
    /* Keep it centered */
}

.header-segment-logo,
.header-segment-nav,
.header-segment-search {
    background: var(--surface-color);
    border-radius: 50px;
    display: flex;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.header-segment-logo {
    min-width: 160px;
    flex-shrink: 0;
    justify-content: center;
}

.header-segment-nav {
    flex-grow: 0;
    min-width: 400px;
    justify-content: center;
}

.header-segment-search {
    flex-basis: 220px;
    flex-grow: 0;
    display: flex;
    justify-content: center;
}

.header-segment-search {
    flex: 1;
    margin: 0 12px;
}

/* Restored .header-segment-right for Desktop */
.header-segment-right {
    flex-grow: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 6px 8px;
    border-radius: 50px;
    gap: 6px;
    background: linear-gradient(135deg, #aaff00 0%, #00e5ff 100%);
    border: none;
    box-shadow: 0 0 20px rgba(170, 255, 0, 0.3);
}

.search-trigger {
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 10px;
    transition: var(--transition);
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    width: 100%;
}

.search-trigger:hover {
    background: var(--glass-border);
}

/* Shimmering Logo */
.shimmer-logo {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: lowercase;
    background: linear-gradient(
        to right,
        #00e5ff 0%,
        #aaff00 25%,
        #00e5ff 50%,
        #aaff00 75%,
        #00e5ff 100%
    );
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
    text-decoration: none;
    display: inline-block;
}

@keyframes shimmer {
    to {
        background-position: 200% center;
    }
}

.gradient-bg {
    background: linear-gradient(135deg, #00e5ff 0%, #aaff00 100%);
    box-shadow: 0 4px 15px rgba(0, 229, 255, 0.3);
}

/* Button styles for header right segment — dark circles on gradient */
.header-segment-right .icon-btn {
    background: rgba(0, 0, 0, 0.75);
    border: none;
    color: #fff;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.header-segment-right .icon-btn:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.08);
}

.header-segment-right .icon-btn svg {
    stroke: #fff;
}

.header-segment-right .profile-btn {
    padding: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(0, 0, 0, 0.3);
    box-shadow: none;
    flex-shrink: 0;
    background: var(--accent-primary);
    cursor: pointer;
    transition: var(--transition);
}

.header-segment-right .profile-btn:hover {
    transform: scale(1.08);
}

.profile-actions img {
    width: 35px;
    height: 35px;
    border-radius: 50%;
}

.header-segment-right .profile-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-segment-right .lang-switcher {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 2px;
}

.header-segment-right .lang-btn {
    color: var(--text-secondary);
    /* Responsive to background/theme */
    width: auto;
    height: auto;
    padding: 4px 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 800;
    font-size: 0.78rem;
    transition: var(--transition);
    background: transparent;
    border: none;
    cursor: pointer;
}

.header-segment-right .lang-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-radius: 50px;
    padding: 5px 10px;
    font-weight: 800;
}

.header-segment-right .lang-btn:hover:not(.active) {
    color: var(--text-primary);
}

.header-segment-right .user-profile {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 0;
    padding-left: 0;
    border-left: none;
}

.header-segment-right .header-icons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Nav Tabs */
.nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav a.active,
.nav a:hover {
    color: var(--text-primary);
}

/* Search Bar */
/* Search Popup Overlay */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.active {
    opacity: 1;
    visibility: visible;
}

.search-modal-content {
    width: 90%;
    max-width: 800px;
    padding: 24px;
    transform: translateY(-50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.search-modal.active .search-modal-content {
    transform: translateY(0);
}

.search-modal-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.search-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-icon {
    position: absolute;
    left: 16px;
    color: var(--text-secondary);
    pointer-events: none;
}

.search-modal-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 14px 20px 14px 48px;
    color: var(--text-primary);
    font-size: 1.1rem;
    outline: none;
    font-family: "Outfit", sans-serif;
    transition: border-color 0.3s ease;
}

.search-modal-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(170, 255, 0, 0.1);
}

.close-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.4rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--text-primary);
    background: var(--glass-border);
}

.search-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.search-tab-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 6px 16px;
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
    font-family: "Outfit", sans-serif;
}

.search-tab-btn:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.search-tab-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* Search results */
.search-results {
    flex: 1;
    overflow-y: auto;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 50vh;
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

.search-results::-webkit-scrollbar {
    width: 5px;
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

.search-results-count {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    padding-bottom: 4px;
}

.search-result-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
    align-items: center;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--glass-border);
    transform: translateX(4px);
}

.search-result-img {
    width: 80px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.search-result-img.no-image-placeholder::before {
    width: 28px;
    height: 28px;
}

.search-result-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-body {
    flex: 1;
    min-width: 0;
}

.search-result-body .tag {
    font-size: 9px;
    padding: 2px 7px;
    margin-bottom: 4px;
}

.search-result-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result-body p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.search-result-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.search-result-body mark {
    background: rgba(170, 255, 0, 0.25);
    color: var(--accent-primary);
    border-radius: 2px;
    padding: 0 2px;
}

/* Search hint & empty state */
.search-hint,
.search-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-align: center;
}

.search-empty-icon {
    font-size: 2rem;
}

/* Light theme adjustments */
body.light-theme .search-result-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

body.light-theme .search-result-body mark {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

/* Header Icons & Profile */
.header-icons {
    display: flex;
    gap: 8px;
}

.icon-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--glass-border);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
}

.profile-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: var(--transition);
    width: 44px;
    height: 44px;
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.profile-avatar:hover {
    transform: scale(1.05) rotate(5deg);
    border-color: #fff;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

body.light-theme .header-segment-logo,
body.light-theme .header-segment-nav,
body.light-theme .header-segment-search {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 220px;
    gap: 20px;
    grid-auto-flow: dense;
}

.bento-item {
    position: relative;
    transition: var(--transition);
    cursor: pointer;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid var(--glass-border);
    background: var(--surface-color);
    text-decoration: none;
    display: block;
}

.bento-item.wide {
    grid-column: span 2;
}

.bento-item:hover {
    transform: translateY(-6px);
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

/* Read time badge on image */
.bento-read-time-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 50px;
    z-index: 2;
}

.bento-img-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.bento-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.8s ease;
}

.bento-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s ease;
}

.bento-item:hover .bento-img img {
    transform: scale(1.08);
}

/* ── Video play badge ── */
.video-play-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: rgba(0,0,0,0.6);
    border: 2px solid rgba(255,255,255,0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    z-index: 3;
    pointer-events: none;
    transition: background 0.3s, transform 0.3s;
}
.bento-item:hover .video-play-badge,
.promo-card:hover .video-play-badge {
    background: rgba(255,60,60,0.8);
    transform: translate(-50%, -50%) scale(1.1);
}

/* ── No-image placeholder (dark theme default) ── */
.bento-img.no-image-placeholder,
.bslide.no-image-placeholder {
    background: linear-gradient(
        145deg,
        rgba(20, 24, 40, 0.95) 0%,
        rgba(30, 35, 55, 0.9) 40%,
        rgba(25, 30, 50, 0.85) 100%
    );
    display: flex;
    align-items: center;
    justify-content: center;
}

.bento-img.no-image-placeholder::before,
.bslide.no-image-placeholder::before {
    content: "";
    position: absolute;
    width: 56px;
    height: 56px;
    opacity: 0.12;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    z-index: 0;
    pointer-events: none;
}

.bento-img.no-image-placeholder::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(
            ellipse at 25% 75%,
            rgba(0, 255, 136, 0.05) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse at 75% 25%,
            rgba(112, 0, 255, 0.04) 0%,
            transparent 60%
        );
    pointer-events: none;
    z-index: 0;
}

body.light-theme .bento-img.no-image-placeholder::before,
body.light-theme .bslide.no-image-placeholder::before {
    opacity: 0.15;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='1.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2' ry='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E");
}

.bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 22px;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.65) 55%,
        rgba(0, 0, 0, 0) 100%
    );
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    color: #fff;
}

.bento-item h2,
.bento-item h3 {
    font-size: 1.25rem;
    margin-bottom: 8px;
    line-height: 1.2;
    color: #fff !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured h2 {
    font-size: 2rem;
}

.bento-item p {
    font-size: 0.92rem;
    line-height: 1.4;
    opacity: 0.88;
    color: #fff !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
}

.learn-more {
    color: var(--accent-primary);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.84rem;
}

.tag {
    background: var(--accent-primary);
    color: #000;
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 12px;
    width: fit-content;
    white-space: nowrap;
}

.bento-tags {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: calc(100% - 80px);
}

.bento-tags .tag {
    margin-bottom: 0;
}

/* Slider Styles */
.slider-wrapper {
    grid-column: span 2;
    grid-row: span 2;
    position: relative;
    border-radius: 24px;
    overflow: hidden;
}

/* Bento Slider (.bslide) — used by main.js */
.bento-slider-wrap {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.bslide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
    z-index: 1;
}

.bslide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    position: relative;
}

.bslide img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bslide .bento-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2;
}

.bento-content .bento-tags {
    position: relative;
    top: 0;
    left: 0;
    margin-bottom: 12px;
}

.bslide-meta {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 8px;
}

.featured-read-more {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 0.9rem;
    margin-top: 8px;
}

/* Legacy .slide classes (keep for compat) */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.8s ease,
        visibility 0.8s ease;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide .bento-item.featured {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
}

.slider-dots {
    position: absolute;
    bottom: 24px;
    right: 24px;
    display: flex;
    gap: 8px;
    z-index: 10;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.dot.active {
    background: var(--accent-primary);
    transform: scale(1.3);
    box-shadow: 0 0 10px var(--accent-primary);
}

.dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.6);
}

/* Bento Spans */
.featured {
    grid-column: span 2;
    grid-row: span 2;
}

.bento-item.featured h3 {
    font-size: 1.75rem !important;
    line-height: 1.2;
}

.bento-item.featured p {
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── Hub Promo Mini Blocks (inside bento grid) ── */
.bento-hub-promo-wrap {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px;
    cursor: default;
    background: transparent !important;
    border: none !important;
}

.bento-hub-promo-wrap:hover {
    transform: none !important;
    box-shadow: none !important;
}

.bento-hub-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    padding: 14px 18px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.bento-hub-mini::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 14px;
    opacity: 0.12;
    transition: opacity 0.3s;
}

.gta-mini::before {
    background: linear-gradient(135deg, #ff6b00, #ff1493, #8b00ff);
}

.plat-mini::before {
    background: linear-gradient(135deg, #00d4ff, #7b2ff7, #00ff88);
}

.bento-hub-mini:hover {
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.bento-hub-mini:hover::before {
    opacity: 0.22;
}

.bento-hub-mini-icon {
    font-size: 1.6rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.gta-mini .bento-hub-mini-icon {
    background: rgba(255, 107, 0, 0.15);
}

.plat-mini .bento-hub-mini-icon {
    background: rgba(0, 212, 255, 0.15);
}

.bento-hub-mini-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.bento-hub-mini-title {
    font-weight: 800;
    font-size: 1rem;
    font-family: "Space Grotesk", sans-serif;
}

.gta-mini .bento-hub-mini-title {
    color: #ff6b00;
}

.plat-mini .bento-hub-mini-title {
    color: #00d4ff;
}

.bento-hub-mini-badge {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 2px 8px;
    border-radius: 6px;
    width: fit-content;
}

.bento-hub-gta-badge {
    background: rgba(255, 107, 0, 0.15);
    color: #ff9500;
}

.bento-hub-plat-badge {
    background: rgba(0, 212, 255, 0.15);
    color: #00d4ff;
}

.bento-hub-mini-arrow {
    font-size: 1.4rem;
    color: var(--accent-primary);
    opacity: 0.4;
    transition: opacity 0.3s;
    position: relative;
    z-index: 1;
}

.bento-hub-mini:hover .bento-hub-mini-arrow {
    opacity: 1;
}

/* Hide hub promo in compact/list view */
.bento-grid.compact-view .bento-hub-promo-wrap {
    display: none;
}

/* ══════════════════════════════════════════════════
   SHORTS HOME SECTION (inserted between card rows)
   ══════════════════════════════════════════════════ */
.shorts-home-section {
    grid-column: 1 / -1;
    padding: 10px 0 10px;
}

.sh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.sh-header h2 {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
}

.sh-accent {
    color: var(--accent-primary);
}

.sh-link {
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent-primary);
    text-decoration: none;
    transition: var(--transition);
}

.sh-link:hover {
    opacity: 0.8;
}

/* ── Shorts ticker (home) ── */
.sh-ticker {
    display: flex;
    align-items: center;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    height: 40px;
    margin-bottom: 14px;
}

body.light-theme .sh-ticker {
    background: #fff;
    border-color: #e2e8f0;
}

.sh-ticker-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 14px;
    height: 100%;
    background: #e53e3e;
    color: #fff;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 1px;
    white-space: nowrap;
    flex-shrink: 0;
}

.sh-ticker-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #fff;
    animation: sh-pulse 1.2s ease-in-out infinite;
}

@keyframes sh-pulse {
    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.3;
    }
}

.sh-ticker-track {
    flex: 1;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(
        90deg,
        transparent 0%,
        #000 3%,
        #000 97%,
        transparent 100%
    );
    mask-image: linear-gradient(
        90deg,
        transparent 0%,
        #000 3%,
        #000 97%,
        transparent 100%
    );
}

.sh-ticker-scroll {
    display: flex;
    align-items: center;
    gap: 0;
    white-space: nowrap;
    animation: sh-ticker-move 60s linear infinite;
}

.sh-ticker-scroll:hover {
    animation-play-state: paused;
}

@keyframes sh-ticker-move {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.sh-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.82rem;
    font-weight: 500;
    transition: color 0.2s;
}

.sh-ticker-item:hover {
    color: var(--accent-primary);
}

.sh-ticker-text {
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sh-ticker-time {
    padding: 2px 8px;
    background: var(--accent-primary);
    color: #0a0e17;
    border-radius: 5px;
    font-family: "Space Grotesk", monospace;
    font-size: 0.68rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sh-ticker-dot {
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--text-secondary);
    opacity: 0.4;
    flex-shrink: 0;
}

/* ── Shorts cards grid (home) ── */
.sh-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.sh-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: var(--transition);
    overflow: hidden;
}

.sh-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--c, var(--accent-primary));
}

.sh-card:hover {
    transform: translateY(-3px);
    border-color: var(--c, var(--accent-primary));
}

body.light-theme .sh-card {
    background: #fff;
    border-color: #e2e8f0;
}

.sh-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: "Space Grotesk", sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sh-card-cat {
    color: var(--c, var(--accent-primary));
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.sh-card-cat::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}

.sh-card-time {
    color: var(--text-secondary);
    font-weight: 600;
}

.sh-card h4 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hide in compact view */
.bento-grid.compact-view .shorts-home-section {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .sh-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .sh-cards-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .sh-card {
        padding: 12px;
        min-height: 100px;
    }

    .sh-card h4 {
        font-size: 0.82rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .sh-header h2 {
        font-size: 1.15rem;
    }

    .sh-ticker {
        height: 36px;
    }

    .sh-ticker-pill {
        font-size: 0.6rem;
        padding: 0 10px;
    }

    .sh-ticker-item {
        font-size: 0.75rem;
        padding: 0 10px;
    }
}

/* ══════════════════════════════════════════════════
   TRENDING SECTION (inserted between card rows)
   ══════════════════════════════════════════════════ */
.trending-section {
    grid-column: 1 / -1;
    padding: 10px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.section-head h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-link {
    color: var(--accent-primary);
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.section-link:hover {
    opacity: 0.8;
}

body.light-theme .section-link {
    color: #00855a;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.trend-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 18px;
    display: flex;
    gap: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}

.trend-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-3px);
}

.trend-num {
    font-family: "Space Grotesk", "Outfit", sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
    width: 36px;
    flex-shrink: 0;
}

.trend-body h4 {
    font-size: 0.98rem;
    font-weight: 600;
    margin-bottom: 6px;
    line-height: 1.3;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trend-meta {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Light theme trending */
body.light-theme .trend-card {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.12);
}

body.light-theme .trend-card:hover {
    border-color: var(--accent-primary);
}

/* Hide trending in compact view */
.bento-grid.compact-view .trending-section {
    display: none;
}

/* ── Promo sections ── */
.promo-section {
    grid-column: 1 / -1;
    padding: 10px 0;
}

.promo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.promo-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.promo-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.promo-card-img {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: var(--surface-color);
}

.promo-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.promo-card-img.no-image-placeholder {
    background: linear-gradient(
        135deg,
        rgba(20, 24, 40, 0.95),
        rgba(30, 34, 50, 0.85)
    );
}

.promo-card-tags {
    position: absolute;
    top: 10px;
    left: 10px;
}

.promo-card-tags .tag {
    font-size: 0.62rem;
    padding: 3px 8px;
}

.promo-card-body {
    padding: 14px;
    flex: 1;
}

.promo-card-body h4 {
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.promo-card-body p {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Light theme promo */
body.light-theme .promo-card {
    background: #fff;
    border-color: rgba(15, 23, 42, 0.1);
}

body.light-theme .promo-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

body.light-theme .promo-card-img.no-image-placeholder {
    background: linear-gradient(135deg, #eef2f6, #dde4ec);
}

/* Hide promo in compact view */
.bento-grid.compact-view .promo-section {
    display: none;
}

.wide {
    grid-column: span 2;
    grid-row: span 1;
}

.bento-item.wide h3 {
    font-size: 1.3rem !important;
}

.tall {
    grid-column: span 1;
    grid-row: span 2;
}

.category-ribbon-section {
    display: none;
    margin-bottom: 20px;
}

.mobile-categories {
    display: flex;
    padding: 10px;
    gap: 8px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    scrollbar-width: none;
    background: transparent !important;
    border: none;
    box-shadow: none;
    flex-wrap: wrap;
    justify-content: center;
}

.mobile-categories::-webkit-scrollbar {
    display: none;
}

.mobile-categories .cat-btn {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 6px 12px;
    /* Smaller padding */
    border-radius: 12px;
    /* Smaller radius */
    font-size: 0.8rem;
    /* Smaller font */
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.mobile-categories .cat-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* Footer & Buttons */
.login-btn {
    background: var(--accent-primary);
    color: #000;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
}

.main-content {
    margin-bottom: 80px;
}

/* ── Trending Ticker ── */
.trending-section {
    overflow: hidden;
    padding: 10px 0;
    margin-bottom: 5px;
}

.ticker {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.ticker-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-primary);
    animation: pulse-dot 1.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(0.7);
    }
}

.ticker-track {
    flex: 1;
    overflow: hidden;
    display: flex;
}

.ticker-row {
    display: flex;
    gap: 10px;
    white-space: nowrap;
    animation: ticker-scroll 40s linear infinite;
    flex-shrink: 0;
}

@keyframes ticker-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

.ticker-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: color 0.2s;
    cursor: default;
    padding: 0 6px;
}

.ticker-item:hover {
    color: var(--accent-primary);
}

/* ── GTA VI Promo Block ── */
/* ── Promo Row (GTA + Platforms side by side) ── */
.promo-row-section {
    padding: 0 24px;
    margin: 32px 0;
}
.promo-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 0 auto;
}

.gta-promo-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255, 46, 136, 0.15);
    background: linear-gradient(
        135deg,
        #0a0a0a 0%,
        #1a0033 40%,
        #2e0a1a 70%,
        #0a0a0a 100%
    );
    text-decoration: none;
    transition: all 0.3s ease;
}

body.light-theme .gta-promo-card {
    background: linear-gradient(
        135deg,
        #f8f0ff 0%,
        #fff0f5 40%,
        #fff5f0 70%,
        #f8f0ff 100%
    );
    border-color: rgba(255, 46, 136, 0.12);
}

.gta-promo-card:hover {
    border-color: rgba(255, 46, 136, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(255, 46, 136, 0.15);
}

.gta-promo-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.gta-promo-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
    position: relative;
}

.gta-promo-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(255, 46, 136, 0.15),
        rgba(0, 229, 255, 0.1)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.gta-promo-text {
    flex: 1;
    min-width: 0;
}

.gta-promo-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.gta-promo-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffdb00, #ff2e88);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gta-promo-badge {
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(255, 46, 136, 0.12);
    color: #ff2e88;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.gta-promo-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    margin: 0;
}

body.light-theme .gta-promo-desc {
    color: rgba(0, 0, 0, 0.5);
}

.gta-promo-arrow {
    flex-shrink: 0;
    color: rgba(255, 46, 136, 0.6);
    font-size: 1.5rem;
}

@media (max-width: 720px) {
    .promo-row-section {
        padding: 0 14px;
        margin: 20px 0;
    }
    .promo-row {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gta-promo-card,
    .platforms-promo-card {
        border-radius: 18px;
    }

    .gta-promo-inner,
    .platforms-promo-inner {
        gap: 16px;
        padding: 18px 20px;
    }

    .gta-promo-icon,
    .platforms-promo-icon {
        width: 48px;
        height: 48px;
        border-radius: 12px;
        font-size: 1.5rem;
    }

    .gta-promo-name,
    .platforms-promo-name {
        font-size: 1.1rem;
    }

    .gta-promo-badge,
    .platforms-promo-badge {
        font-size: 0.58rem;
        padding: 2px 8px;
    }

    .gta-promo-desc,
    .platforms-promo-desc {
        font-size: 0.8rem;
    }

    .gta-promo-arrow,
    .platforms-promo-arrow {
        display: none;
    }

    .trending-bottom-section {
        margin-top: 20px;
    }
    .trending-bottom-section .container {
        padding: 0 14px;
    }

    .newsletter-section {
        padding: 0 14px;
    }
}

.platforms-promo-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(0, 255, 136, 0.15);
    background: linear-gradient(
        135deg,
        #0a0a0a 0%,
        #001a0d 40%,
        #0a1a2e 70%,
        #0a0a0a 100%
    );
    text-decoration: none;
    transition: all 0.3s ease;
}

body.light-theme .platforms-promo-card {
    background: linear-gradient(
        135deg,
        #f0fff8 0%,
        #f0f8ff 40%,
        #f5f0ff 70%,
        #f0fff8 100%
    );
    border-color: rgba(0, 255, 136, 0.12);
}

.platforms-promo-card:hover {
    border-color: rgba(0, 255, 136, 0.4);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.15);
}

.platforms-promo-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.platforms-promo-inner {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 28px 32px;
    position: relative;
}

.platforms-promo-icon {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 136, 0.15),
        rgba(102, 192, 244, 0.1)
    );
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.platforms-promo-text {
    flex: 1;
    min-width: 0;
}

.platforms-promo-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.platforms-promo-name {
    font-family: "Space Grotesk", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #00ff88, #66c0f4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.platforms-promo-badge {
    font-size: 0.65rem;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(0, 255, 136, 0.12);
    color: #00ff88;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

body.light-theme .platforms-promo-badge {
    color: #059669;
    background: rgba(5, 150, 105, 0.1);
}

.platforms-promo-desc {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.88rem;
    margin: 0;
}

body.light-theme .platforms-promo-desc {
    color: rgba(0, 0, 0, 0.5);
}

.platforms-promo-arrow {
    flex-shrink: 0;
    color: rgba(0, 255, 136, 0.6);
    font-size: 1.5rem;
}

/* ── Footer ── */
.footer {
    padding: 56px 0 32px;
    background: var(--surface-color);
    border-top: 1px solid var(--glass-border);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .footer-logo-link {
    font-size: 1.8rem;
    font-weight: 900;
    text-decoration: none;
}

.footer-tagline {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 10px;
    max-width: 260px;
}

.footer-h {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    font-size: 0.88rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent-primary);
}

.footer-socials {
    display: flex;
    gap: 10px;
}

.social-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.social-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    flex-wrap: wrap;
    gap: 8px;
}

.footer-bottom p {
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.footer-build .heart {
    color: var(--accent-primary);
}

/* Footer subscribe form */
.footer-subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-subscribe-input-wrap {
    display: flex;
    align-items: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.footer-subscribe-input-wrap:focus-within {
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

.footer-subscribe-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
}

.footer-subscribe-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.footer-subscribe-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin: 3px;
    transition: var(--transition);
    flex-shrink: 0;
}

.footer-subscribe-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--neon-glow);
}

.footer-subscribe-hint {
    font-size: 0.72rem;
    color: var(--text-secondary);
    opacity: 0.7;
    line-height: 1.4;
}

.footer-subscribe-hint span {
    color: var(--accent-primary);
    font-weight: 600;
}

/* =================== TRENDING BOTTOM SECTION =================== */
.trending-bottom-section {
    margin-top: 40px;
}
.trending-bottom-section .trending-section {
    margin-bottom: 0;
}

/* =================== NEWSLETTER SECTION =================== */
.newsletter-section {
    margin-top: 60px;
    margin-bottom: -40px;
}

.newsletter-card {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    padding: 48px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 12px;
}

.newsletter-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 440px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.newsletter-input {
    width: 280px;
    padding: 14px 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    transition: var(--transition);
}

.newsletter-input:focus {
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

.newsletter-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.newsletter-btn {
    padding: 14px 32px;
    background: var(--accent-primary);
    color: #000;
    border: none;
    border-radius: 50px;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.newsletter-btn:hover {
    transform: scale(1.03);
    box-shadow: var(--neon-glow);
}

/* Light theme */
body.light-theme .newsletter-card {
    background: var(--surface-color);
}

@media (max-width: 900px) {
    .newsletter-card {
        flex-direction: column;
        padding: 36px 28px;
        text-align: center;
        gap: 24px;
    }

    .newsletter-desc {
        max-width: none;
    }

    .newsletter-form {
        flex-direction: column;
        width: 100%;
    }

    .newsletter-input {
        width: 100%;
    }

    .newsletter-btn {
        width: 100%;
    }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 28px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .ticker-label {
        display: none;
    }

    .newsletter-section {
        margin-top: 40px;
    }
}

/* Mobile Bottom Navigation (Telegram/iOS Style) */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 450px;
    height: 75px;
    z-index: 1500;
    justify-content: space-around;
    align-items: center;
    padding: 0 15px;
    border-radius: 35px;
    background: rgba(15, 15, 15, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
        0 10px 40px rgba(0, 0, 0, 0.6),
        inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
}

.mobile-nav-item {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px;
    border-radius: 20px;
    width: 25%;
}

.mobile-nav-item svg {
    width: 26px;
    height: 26px;
    transition: transform 0.3s ease;
}

.mobile-nav-item span {
    font-size: 0.72rem;
    font-weight: 500;
    font-family: "Outfit", sans-serif;
    letter-spacing: 0.3px;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    color: var(--accent-primary);
}

.mobile-nav-item.active svg {
    transform: translateY(-2px);
    stroke-width: 2.5;
}

body.light-theme .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    color: var(--text-secondary);
}

body.light-theme .mobile-nav-item {
    color: rgba(0, 0, 0, 0.4);
}

body.light-theme .mobile-nav-item:hover,
body.light-theme .mobile-nav-item.active {
    color: var(--accent-primary);
}

@media (max-width: 1024px) {
    .dashboard-header {
        height: auto;
        flex-wrap: wrap;
        padding: 10px;
    }

    .header-segment-logo {
        min-width: 0;
        flex: 1;
    }

    .header-segment-nav {
        display: none;
    }

    .header-segment-search {
        flex-basis: 100%;
        order: 3;
        margin-top: 10px;
    }

    /* Keep right segment visible on tablets */
    .header-segment-right {
        min-width: 0;
        flex: 0 0 auto;
        justify-content: flex-end;
    }

    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 240px;
    }

    /* Slider + featured: full-width on tablet */
    .bento-slider-wrap,
    .bento-item.featured {
        grid-column: 1 / -1 !important;
        grid-row: span 2 !important;
    }

    /* Trending: 2 columns on tablet */
    .trending-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* Promo: 2 columns on tablet */
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hub promo: full-width on tablet */
    .bento-hub-promo-wrap {
        grid-column: 1 / -1 !important;
        grid-row: span 1 !important;
        display: flex !important;
        flex-direction: row !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        gap: 12px !important;
    }

    .bento-item.wide {
        grid-column: 1 / -1 !important;
    }
}

/* Floating Controls (Theme, Lang, Profile) */

.floating-controls:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.4);
}

.floating-controls .icon-btn,
.floating-controls .lang-switcher {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
}

.floating-controls .icon-btn:hover {
    background: var(--glass-border);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
}

.floating-controls .header-icons {
    display: flex;
    /* Ensure flex display */
    flex-direction: column;
    gap: 12px;
}

.floating-controls .lang-switcher {
    margin: 0;
    flex-direction: column;
}

.floating-controls .user-profile {
    display: flex;
    /* Ensure flex display */
    flex-direction: column;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
}

@media (max-width: 768px) {
    .floating-controls {
        display: flex;
        /* Show on Mobile */
        bottom: 40px;
        /* Above mobile bottom nav */
        background: rgba(15, 15, 15, 0.8) !important;
        flex-direction: row;
        /* Horizontal layout */
        align-items: center;
        padding: 8px 16px;
    }

    .floating-controls .header-icons {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        margin-left: 8px;
        padding-left: 8px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    .floating-controls .lang-switcher {
        flex-direction: row;
        margin: 0;
    }

    .floating-controls .user-profile {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        padding-top: 0;
        margin-left: 8px;
        padding-left: 8px;
        border-top: none;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Force Dark Theme for Floating Controls on Mobile */
    .floating-controls .icon-btn,
    .floating-controls .lang-switcher {
        background: transparent !important;
        border: none !important;
        color: rgba(255, 255, 255, 0.7) !important;
    }

    .floating-controls .icon-btn:hover,
    .floating-controls .lang-btn:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #fff !important;
    }

    .floating-controls .lang-btn {
        color: rgba(255, 255, 255, 0.5) !important;
    }

    .floating-controls .lang-btn.active {
        background: var(--accent-primary) !important;
        color: #000 !important;
        box-shadow: 0 0 10px rgba(0, 255, 136, 0.4) !important;
    }

    /* Ensure icons are white */
    .floating-controls svg {
        stroke: currentColor;
    }

    /* Style header right as a compact pill on mobile */
    .dashboard-header {
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 10px 12px !important;
        gap: 8px !important;
    }

    .header-segment-logo {
        flex: 1 !important;
        min-width: 0 !important;
        height: 48px !important;
        border-radius: 50px !important;
        padding: 0 20px !important;
        justify-content: center !important;
    }

    .header-segment-right {
        display: flex !important;
        flex: 1 !important;
        padding: 5px 6px !important;
        gap: 4px !important;
        height: 48px !important;
        border-radius: 50px !important;
        background: linear-gradient(
            135deg,
            #aaff00 0%,
            #00e5ff 100%
        ) !important;
        border: none !important;
        box-shadow: 0 0 15px rgba(170, 255, 0, 0.25) !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: visible !important;
    }

    .header-segment-right .header-icons {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .header-segment-right .icon-btn {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        background: rgba(0, 0, 0, 0.7) !important;
        border: none !important;
        border-radius: 50% !important;
        color: #fff !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .header-segment-right .icon-btn svg {
        stroke: #fff !important;
        width: 16px !important;
        height: 16px !important;
    }

    .header-segment-right .user-profile {
        display: none !important;
    }

    .header-segment-right .lang-switcher {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        padding: 0 2px !important;
        margin: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 2px !important;
    }

    .header-segment-right .lang-btn {
        padding: 4px 6px !important;
        font-size: 0.75rem !important;
        font-weight: 800 !important;
        color: rgba(0, 0, 0, 0.4) !important;
        background: transparent !important;
        border: none !important;
        border-radius: 8px !important;
        line-height: 1 !important;
    }

    .header-segment-right .lang-btn.active {
        background: rgba(0, 0, 0, 0.7) !important;
        color: #fff !important;
        border-radius: 10px !important;
        padding: 6px 10px !important;
        box-shadow: none !important;
    }
}

@media (max-width: 768px) {
    .nav {
        display: none;
        /* Hide navigation on mobile in favor of category search */
    }

    .profile-info {
        display: none;
        /* Hide profile name/role to save space */
    }

    .user-profile {
        border-left: none;
        padding-left: 0;
    }

    .search-modal {
        padding-top: 0;
    }

    .search-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: 100vh;
        border-radius: 0;
        padding: 16px;
    }

    .search-results {
        max-height: calc(100vh - 220px);
    }

    .search-result-img {
        width: 64px;
        height: 48px;
    }

    .header-segment-search {
        display: none !important;
    }

    .search-modal-header {
        margin-top: 20px;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    body {
        padding-bottom: 90px;
    }

    .mobile-categories {
        display: flex;
    }

    .shimmer-logo {
        font-size: 1.6rem;
    }

    .header-logo-actions {
        display: flex;
    }

    .category-ribbon-section {
        display: block;
    }
}

@media (max-width: 640px) {
    /* ── Grid: 2 equal columns, square-ish rows ── */
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 200px;
        gap: 12px;
    }

    /* ── Slider: always full-width, double-tall ── */
    .bento-slider-wrap,
    .bento-item.featured {
        grid-column: 1 / -1 !important;
        grid-row: span 2 !important;
    }

    /* ── Hub promo: full-width, single row ── */
    .bento-hub-promo-wrap {
        grid-column: 1 / -1 !important;
        grid-row: span 1 !important;
        display: flex !important;
        flex-direction: row !important;
        background: transparent !important;
        border: none !important;
        padding: 4px 0 !important;
        gap: 8px !important;
    }

    .bento-hub-mini {
        padding: 10px 12px;
    }

    .bento-hub-mini-icon {
        width: 32px;
        height: 32px;
        font-size: 1.2rem;
        border-radius: 8px;
    }

    .bento-hub-mini-title {
        font-size: 0.85rem;
    }

    .bento-hub-mini-badge {
        font-size: 0.5rem;
    }

    .bento-hub-mini-arrow {
        font-size: 1.1rem;
    }

    /* ── Wide cards: full-width, single-row ── */
    .bento-item.wide {
        grid-column: 1 / -1 !important;
        grid-row: span 1 !important;
    }

    /* ── Normal cards: 2 per row ── */
    .bento-item:not(.featured):not(.wide):not(.bento-slider-wrap):not(
            .bento-hub-promo-wrap
        ) {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
    }

    /* First item (idx 0) full width on mobile for hero effect */
    #bento-grid > .bento-item:first-of-type:not(.featured):not(.wide) {
        grid-column: 1 / -1 !important;
        grid-row: span 1 !important;
    }

    /* ── Trending section mobile ── */
    .trending-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .trend-card {
        padding: 14px;
    }

    .trend-num {
        font-size: 1.5rem;
        width: 26px;
    }

    .section-head {
        margin-bottom: 14px;
    }

    .section-head h2 {
        font-size: 1.25rem;
    }

    /* ── Promo section mobile ── */
    .promo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .promo-card-img {
        height: 100px;
    }

    .promo-card-body {
        padding: 10px;
    }

    .promo-card-body h4 {
        font-size: 0.82rem;
    }

    .promo-card-body p {
        font-size: 0.7rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    /* ── Content area — stronger gradient so text pops ── */
    .bento-content {
        padding: 16px;
        background: linear-gradient(
            to top,
            rgba(0, 0, 0, 0.97) 0%,
            rgba(0, 0, 0, 0.75) 55%,
            rgba(0, 0, 0, 0) 100%
        );
    }

    .bento-item {
        border-radius: 18px;
    }

    /* ── Slider / featured titles ── */
    .bento-item.featured h2,
    .bento-item.featured h3,
    .bento-slider-wrap h2 {
        font-size: 1.55rem !important;
        line-height: 1.2;
        margin-bottom: 6px;
    }

    /* ── Normal card titles: bigger & readable ── */
    .bento-item:not(.featured):not(.wide) h3 {
        font-size: 1.05rem !important;
        line-height: 1.3;
        margin-bottom: 6px;
        -webkit-line-clamp: 3;
        line-clamp: 3;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* ── Hide description on small cards — title is enough ── */
    .bento-item:not(.featured):not(.wide) p {
        display: none;
    }

    /* ── Wide cards: 1-line description ── */
    .bento-item.wide p {
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        line-clamp: 1 !important;
        font-size: 0.82rem;
    }

    /* ── Featured / slider description ── */
    .bento-item.featured p,
    .bento-slider-wrap p {
        font-size: 0.9rem;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }

    /* ── Read-time badge: compact ── */
    .bento-read-time-badge {
        font-size: 0.66rem;
        padding: 4px 9px;
        gap: 3px;
        top: 12px;
        right: 12px;
    }

    /* ── Category tag: compact ── */
    .bento-img .tag {
        font-size: 0.62rem;
        padding: 4px 9px;
        top: 12px;
        left: 12px;
    }

    /* ── "Read more" link ── */
    .learn-more,
    .featured-read-more {
        font-size: 0.78rem;
    }

    /* ── Header ── */
    .dashboard-header {
        gap: 6px;
    }

    .shimmer-logo {
        font-size: 1.5rem;
    }

    .profile-avatar {
        width: 40px;
        height: 40px;
    }
}

/* ── Mobile Categories Panel (bottom sheet) ── */
.mobile-categories-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}

.mobile-categories-panel.active {
    opacity: 1;
    visibility: visible;
}

.mobile-categories-panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
}

.mobile-categories-panel-sheet {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-color);
    border-radius: 24px 24px 0 0;
    padding: 24px 20px 40px;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 1px solid var(--glass-border);
}

.mobile-categories-panel.active .mobile-categories-panel-sheet {
    transform: translateY(0);
}

.mobile-categories-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.mobile-categories-panel-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.mobile-categories-panel-close {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.mobile-categories-panel-close:hover {
    color: var(--text-primary);
    background: var(--glass-border);
}

.mobile-categories-panel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border-radius: 16px;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    background: var(--glass-bg);
    border: 1px solid transparent;
}

.mobile-cat-item:hover {
    border-color: var(--glass-border);
    background: var(--glass-border);
}

.mobile-cat-item.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

.mobile-cat-icon {
    font-size: 1.4rem;
    width: 32px;
    text-align: center;
}

/* Loading State */
.loading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.loading::after {
    content: "";
    width: 24px;
    height: 24px;
    margin-left: 12px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Theme Toggle Icons */
.icon-btn .sun-icon,
.icon-btn .moon-icon {
    transition: var(--transition);
}

body.dark-theme .sun-icon {
    display: none;
}

body.dark-theme .moon-icon {
    display: block;
}

body.light-theme .sun-icon {
    display: block;
}

.lang-switcher {
    display: flex;
    gap: 4px;
    background: var(--glass-bg);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    margin: 0 8px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn.active {
    background: var(--accent-primary);
    color: #000;
    box-shadow: var(--neon-glow);
}

.lang-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--glass-border);
}

body.light-theme .moon-icon {
    display: none;
}

/* ══════════════════════════════════════════════════
   LIGHT THEME — BENTO CARDS
   ══════════════════════════════════════════════════ */

/* Cards with images: same clean dark gradient in both themes */
body.light-theme .bento-content {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.65) 55%,
        rgba(0, 0, 0, 0) 100%
    );
}

body.light-theme .bento-slider-wrap .bento-content,
body.light-theme .bento-item.featured .bento-content {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.96) 0%,
        rgba(0, 0, 0, 0.7) 50%,
        rgba(0, 0, 0, 0) 100%
    );
}

/* Card borders & shadows */
body.light-theme .bento-item {
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

body.light-theme .bento-item:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
}

/* Tags on light theme: white text */
body.light-theme .tag {
    color: #fff;
    font-weight: 800;
}

/* Read-time badge: light theme — dark bg, white text */
body.light-theme .bento-read-time-badge {
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
}

/* ══════════════════════════════════════════════════
   NO-IMAGE PLACEHOLDER — LIGHT THEME
   ══════════════════════════════════════════════════ */

/* Background: soft neutral gradient */
body.light-theme .bento-img.no-image-placeholder,
body.light-theme .bslide.no-image-placeholder {
    background: linear-gradient(145deg, #eef2f6 0%, #e4eaf2 40%, #dce3ed 100%);
}

body.light-theme .bento-img.no-image-placeholder::after {
    background:
        radial-gradient(
            ellipse at 25% 75%,
            rgba(34, 197, 94, 0.06) 0%,
            transparent 60%
        ),
        radial-gradient(
            ellipse at 75% 25%,
            rgba(99, 102, 241, 0.05) 0%,
            transparent 60%
        );
}

/* Text overlay: white-to-transparent gradient so dark text is readable */
body.light-theme .bento-img.no-image-placeholder + .bento-content {
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(248, 250, 255, 0.85) 50%,
        rgba(245, 248, 255, 0.4) 80%,
        transparent 100%
    );
}

body.light-theme .bslide.no-image-placeholder .bento-content {
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, 0.97) 0%,
        rgba(248, 250, 255, 0.85) 50%,
        rgba(245, 248, 255, 0.4) 80%,
        transparent 100%
    );
}

/* Dark text on no-image cards */
body.light-theme .bento-img.no-image-placeholder + .bento-content h3,
body.light-theme .bento-img.no-image-placeholder + .bento-content h2,
body.light-theme .bslide.no-image-placeholder .bento-content h2,
body.light-theme .bslide.no-image-placeholder .bento-content h3 {
    color: #111827 !important;
    text-shadow: none;
}

body.light-theme .bento-img.no-image-placeholder + .bento-content p,
body.light-theme .bslide.no-image-placeholder .bento-content p {
    color: #4b5563 !important;
    text-shadow: none;
    opacity: 1;
}

body.light-theme .bento-img.no-image-placeholder + .bento-content .learn-more,
body.light-theme
    .bslide.no-image-placeholder
    .bento-content
    .featured-read-more {
    color: #00855a;
}

body.light-theme .bslide.no-image-placeholder .bento-content .bslide-meta {
    color: #6b7280;
}

/* Badge on no-image cards */
body.light-theme .bento-img.no-image-placeholder .bento-read-time-badge {
    color: #4b5563;
    background: rgba(0, 0, 0, 0.07);
    backdrop-filter: none;
    box-shadow: none;
}

/* Tags on no-image cards stay bright */
body.light-theme .bento-img.no-image-placeholder .tag {
    background: var(--accent-primary);
    color: #fff;
}

/* ══════════════════════════════════════════════════
   NO-IMAGE PLACEHOLDER — DARK THEME
   ══════════════════════════════════════════════════ */
.bento-img.no-image-placeholder + .bento-content {
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.55) 55%,
        transparent 100%
    );
}

/* ── Category Ribbon: MOBILE ONLY ── */
.category-ribbon-section {
    display: none;
}

@media (max-width: 768px) {
    .category-ribbon-section {
        display: block;
    }
}

/* Article Detail Styles */
.article-detail {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 24px;
    animation: fadeIn 0.8s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.article-hero {
    position: relative;
    width: 100%;
    height: 500px;
    border-radius: 32px;
    overflow: hidden;
    margin-bottom: 40px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--glass-border);
}

.article-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.article-header h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.author-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface-color);
    padding: 8px 16px;
    border-radius: 50px;
    border: 1px solid var(--glass-border);
}

.author-chip img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.author-chip span {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.article-body {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
}

/* ── Reading Progress Bar ── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), #00e5ff);
    z-index: 9999;
    transition: width 0.1s linear;
    border-radius: 0 2px 2px 0;
}

/* ── Article Page Layout ── */
.article-page-container {
    padding: 40px 0 80px;
    min-height: 100vh;
}

.article-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    align-items: start;
}

.article-main {
    min-width: 0;
}

.article-sidebar {
    position: sticky;
    top: 120px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ── Back Button ── */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px 8px 14px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 28px;
    transition: var(--transition);
}

.back-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    transform: translateX(-4px);
}

/* ── Article Header ── */
.article-lead {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.article-reading-time {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* ── Author Bar ── */
.author-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    padding: 20px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-bottom: 36px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.author-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.author-role {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ── Share Buttons ── */
.article-share {
    display: flex;
    align-items: center;
    gap: 10px;
}

.share-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.share-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    box-shadow: var(--neon-glow);
}

.share-btn.copied {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: rgba(170, 255, 0, 0.12);
}

/* ── Article Body Typography ── */
.article-body h2 {
    font-size: 1.75rem;
    margin: 40px 0 16px;
    color: var(--text-primary);
    padding-left: 16px;
    position: relative;
}

.article-body h2::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-primary);
    border-radius: 4px;
}

.article-body p {
    margin-bottom: 24px;
    color: var(--text-secondary);
}

.article-body blockquote {
    border-left: 4px solid var(--accent-primary);
    padding: 20px 24px;
    margin: 32px 0;
    background: var(--glass-bg);
    border-radius: 0 16px 16px 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-primary);
}

.article-body blockquote small {
    display: block;
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--accent-primary);
    font-style: normal;
    font-weight: 600;
}

/* ── Article Tags ── */
.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 32px 0;
}

/* ── Telegram Comments ── */
.tg-comments-section {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
}

.tg-comments-wrap {
    margin-top: 20px;
    border-radius: 16px;
    overflow: hidden;
}

.tg-channel-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
}

.tg-channel-link:hover {
    opacity: 0.8;
}

/* ── Related News ── */
.related-news {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--glass-border);
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 20px;
}

.related-grid .bento-item {
    height: 220px;
}

/* ── Sidebar Widgets ── */
.sidebar-widget {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.trending-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trending-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.trending-list .num {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--accent-primary);
    line-height: 1;
    min-width: 18px;
}

.trending-list a {
    color: var(--text-primary);
    text-decoration: none;
    line-height: 1.35;
    transition: var(--transition);
}

.trending-list a:hover {
    color: var(--accent-primary);
}

.promo-widget h3 {
    font-size: 1rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.promo-widget p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.promo-buttons {
    display: flex;
    gap: 8px;
}

.promo-btn {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    transition: var(--transition);
}

.promo-btn.outline {
    background: transparent;
    border-color: var(--glass-border);
}

.promo-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sidebar-tag {
    padding: 5px 12px;
    border-radius: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.sidebar-tag:hover {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* ── Article page responsive ── */
@media (max-width: 900px) {
    .article-layout {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .article-page-container {
        padding: 20px 0 100px;
    }

    .article-sidebar {
        grid-template-columns: 1fr;
    }

    .article-header h1 {
        font-size: 1.9rem;
    }

    .article-hero {
        height: 260px;
        border-radius: 18px;
        margin-bottom: 24px;
    }

    .author-bar {
        padding: 14px 16px;
    }

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.35rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .related-grid .bento-item {
        height: 200px;
    }
}

/* ═══════════════════════════════════════════
   VIEW TOGGLE & COMPACT LIST VIEW
   ═══════════════════════════════════════════ */

/* ── View toggle buttons ── */
.view-toggle-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}

.view-toggle-btn {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.view-toggle-btn.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

.view-toggle-btn svg {
    width: 16px;
    height: 16px;
}

.view-toggle-label {
    display: none;
}

@media (max-width: 768px) {
    .view-toggle-label {
        display: inline;
    }
}

/* ── Category ribbon: flex row with toggle ── */
.category-ribbon {
    display: flex;
    align-items: center;
}

/* ── Compact List View ── */
.bento-grid.compact-view {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.bento-grid.compact-view .bento-slider-wrap {
    display: none !important;
}

.bento-grid.compact-view .bento-item:not(.bento-slider-wrap) {
    display: flex !important;
    flex-direction: row;
    height: 90px !important;
    border-radius: 14px;
    grid-column: unset !important;
    grid-row: unset !important;
}

.bento-grid.compact-view .bento-item.featured,
.bento-grid.compact-view .bento-item.wide {
    grid-column: unset !important;
    grid-row: unset !important;
    height: 90px !important;
}

.bento-grid.compact-view .bento-img {
    position: relative;
    width: 90px;
    min-width: 90px;
    height: 100%;
    border-radius: 14px 0 0 14px;
    flex-shrink: 0;
}

.bento-grid.compact-view .bento-img img {
    border-radius: 14px 0 0 14px;
}

.bento-grid.compact-view .bento-img .tag {
    top: 6px;
    left: 6px;
    font-size: 8px;
    padding: 2px 5px;
}

.bento-grid.compact-view .bento-read-time-badge {
    display: none;
}

.bento-grid.compact-view .bento-content {
    position: relative;
    background: none;
    padding: 10px 14px;
    height: auto;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.bento-grid.compact-view .bento-item h2,
.bento-grid.compact-view .bento-item h3 {
    font-size: 0.9rem !important;
    line-height: 1.3;
    margin-bottom: 4px;
    color: var(--text-primary) !important;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bento-grid.compact-view .bento-item p {
    display: none !important;
}

.bento-grid.compact-view .bento-footer {
    margin-top: 2px;
}

.bento-grid.compact-view .learn-more {
    font-size: 0.72rem;
}

/* ── Category multi-select filter pills ── */
.cat-filter-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 6px 10px 0;
}

.cat-pill {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.cat-pill.active {
    background: var(--accent-primary);
    color: #000;
    border-color: var(--accent-primary);
}

/* ── Latest news block header in compact view ── */
.compact-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0 6px;
}

.compact-section-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.compact-section-header .compact-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Mobile controls row (toggle + hub buttons) ── */
.mobile-controls-row {
    display: contents;
}

.mobile-hub-btns {
    display: none;
}

@media (max-width: 768px) {
    .mobile-categories .cat-btn {
        display: none;
    }

    .mobile-controls-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: 100%;
    }

    /* ── View toggle: pill container ── */
    .view-toggle-wrap {
        display: flex;
        align-items: center;
        gap: 0;
        margin-left: 0;
        background: var(--surface-color);
        border: 1px solid var(--glass-border);
        border-radius: 14px;
        padding: 4px;
        flex-shrink: 0;
    }

    .view-toggle-btn {
        width: 40px;
        height: 36px;
        border-radius: 10px;
        font-size: 0.75rem;
        font-weight: 600;
        gap: 4px;
        border: none;
        background: transparent;
        color: var(--text-secondary);
        flex: unset;
    }

    .view-toggle-btn.active {
        background: var(--accent-primary);
        color: #000;
        border: none;
        box-shadow: 0 2px 8px rgba(0, 184, 107, 0.3);
    }

    .view-toggle-btn svg {
        width: 16px;
        height: 16px;
    }

    .view-toggle-label {
        display: none !important;
    }

    /* ── Hub buttons: separate pills on the right ── */
    .mobile-hub-btns {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }

    .mobile-hub-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        height: 40px;
        padding: 0 16px;
        border-radius: 14px;
        font-size: 0.78rem;
        font-weight: 700;
        text-decoration: none;
        transition: all 0.2s;
        white-space: nowrap;
    }

    .gta-hub-btn {
        background: rgba(255, 160, 60, 0.12);
        color: #c67a00;
        border: 1px solid rgba(255, 160, 60, 0.25);
    }

    .gta-hub-btn:hover {
        background: rgba(255, 160, 60, 0.22);
        border-color: rgba(255, 160, 60, 0.5);
    }

    .plat-hub-btn {
        background: rgba(0, 180, 220, 0.1);
        color: #007aa3;
        border: 1px solid rgba(0, 180, 220, 0.22);
    }

    .plat-hub-btn:hover {
        background: rgba(0, 180, 220, 0.2);
        border-color: rgba(0, 180, 220, 0.45);
    }

    /* Dark theme hub buttons */
    body:not(.light-theme) .gta-hub-btn {
        background: rgba(255, 140, 40, 0.12);
        color: #ffa040;
        border-color: rgba(255, 140, 40, 0.2);
    }

    body:not(.light-theme) .plat-hub-btn {
        background: rgba(0, 200, 255, 0.1);
        color: #40d4ff;
        border-color: rgba(0, 200, 255, 0.18);
    }

    .cat-filter-pills {
        padding: 4px 0 0;
    }
}

/* ── Hide view toggle on desktop ── */
@media (min-width: 769px) {
    .view-toggle-wrap {
        display: none;
    }

    .cat-filter-pills {
        display: none;
    }
}
