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

html {
    background-color: #0a0a0a;
}

/* ── Theme variables ─────────────────────────────────────────────────────── */
:root {
    --bg:           #0a0a0a;
    --bg-2:         #111;
    --bg-3:         #1a1a1a;
    --bg-4:         #222;
    --bg-5:         #2a2a2a;
    --border:       #1a1a1a;
    --border-2:     #1c1c1c;
    --text:         #ffffff;
    --text-2:       rgba(255,255,255,0.7);
    --text-3:       rgba(255,255,255,0.5);
    --text-4:       rgba(255,255,255,0.3);
    --text-5:       rgba(255,255,255,0.15);
    --card-shadow:  rgba(0,0,0,0.4);
    --logo-filter:  invert(1);
    --shimmer-1:    #1a1a1a;
    --shimmer-2:    #252525;
}



/* Page fade-in */
@keyframes pageIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    animation: pageIn 0.15s ease-out;
}

a {
    text-decoration: none;
    color: inherit;
}

.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100px;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    z-index: 1000;
    transition: height 0.3s ease, padding 0.3s ease, background-color 0.25s ease;
}

.top-bar.shrink {
    height: 70px;
    padding: 0 20px;
}

@media (max-width: 768px) {
    .top-bar {
        height: 70px;
        padding: 0 15px;
    }
    
    .top-bar.shrink {
        height: 60px;
        padding: 0 12px;
    }
}

.nav-left,
.nav-right {
    flex: 1;
    display: flex;
    align-items: center;
}

.nav-left {
    justify-content: flex-start;
    gap: 10px;
    column-gap: 10px;
}

.nav-right {
    justify-content: flex-end;
}

.nav-center {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.nav-icon {
    background-color: #1a1a1a;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #ffffff;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.top-bar.shrink .nav-icon {
    width: 40px;
    height: 40px;
}

@media (max-width: 768px) {
    .nav-icon {
        width: 44px;
        height: 44px;
    }

    .top-bar.shrink .nav-icon {
        width: 40px;
        height: 40px;
    }
}

.nav-icon:hover {
    background-color: #2a2a2a;
    transform: scale(1.05);
}

.nav-icon i {
    font-size: 18px;
}

.top-bar.shrink .nav-icon i {
    font-size: 17px;
}

@media (max-width: 768px) {
    .nav-icon i {
        font-size: 18px;
    }

    .top-bar.shrink .nav-icon i {
        font-size: 17px;
    }
}

.logo {
    max-width: 180px;
    height: auto;
    max-height: 50px;
    filter: invert(1);
    transition: max-height 0.3s ease, max-width 0.3s ease;
}

.top-bar.shrink .logo {
    max-height: 38px;
    max-width: 140px;
}

@media (max-width: 768px) {
    .logo {
        max-width: 150px;
        max-height: 44px;
    }
    
    .top-bar.shrink .logo {
        max-height: 34px;
        max-width: 110px;
    }
}

/* ── Side drawer menu ────────────────────────────────────────────────────── */
.menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background-color: #111;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    border-right: 1px solid #1c1c1c;
}

.side-menu.open {
    transform: translateX(0);
}

@media (max-width: 360px) {
    .side-menu { width: 280px; }
}

/* Top — logo + close */
.side-menu-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 20px 20px;
    border-bottom: 1px solid #1c1c1c;
    flex-shrink: 0;
}

.side-menu-logo {
    max-height: 32px;
    max-width: 130px;
    filter: invert(1);
    opacity: 0.9;
}

.close-menu {
    background-color: #1e1e1e;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: rgba(255,255,255,0.5);
    font-size: 13px;
    transition: background-color 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.close-menu:hover {
    background-color: #2a2a2a;
    color: #fff;
}

/* Scrollable body */
.side-menu-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 16px 16px;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Section labels */
.side-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.25);
    padding: 0 8px;
    margin-bottom: 6px;
}

/* Nav items */
.side-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 8px;
}

.side-nav-item {
    display: flex;
    align-items: center;
    padding: 11px 8px;
    border-radius: 0;
    color: rgba(255,255,255,0.4);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    border-left: 2px solid transparent;
}

.side-nav-item:hover {
    color: rgba(255,255,255,0.85);
    transform: translateX(3px);
}

.side-nav-item.active {
    color: #fff;
    border-left-color: #fff;
    padding-left: 12px;
}

.side-nav-icon {
    display: none;
}

.side-nav-label {
    font-size: 16px;
}

/* Divider */
.side-divider {
    height: 1px;
    background-color: #1c1c1c;
    margin: 10px 8px 16px;
}

/* About text */
.side-about {
    font-size: 13px;
    color: rgba(255,255,255,0.3);
    line-height: 1.7;
    padding: 0 8px;
}

/* Footer */
.side-menu-footer {
    padding: 16px 20px 28px;
    border-top: 1px solid #1c1c1c;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.side-footer-link {
    font-size: 12px;
    color: rgba(255,255,255,0.25);
    text-decoration: none;
    transition: color 0.2s ease;
}

.side-footer-link:hover {
    color: rgba(255,255,255,0.6);
}

.side-footer-dot {
    font-size: 12px;
    color: rgba(255,255,255,0.15);
}

.side-copyright {
    width: 100%;
    margin-top: 10px;
    font-size: 11px;
    color: rgba(255,255,255,0.15);
}

.side-social {
    width: 100%;
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.side-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1e1e1e;
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.side-social-btn:hover {
    background-color: #2a2a2a;
    color: rgba(255,255,255,0.8);
}

header {
    text-align: center;
    padding: 130px 20px 60px;
}

/* ── Featured ticker (3 items above grid) ────────────────────────────── */
.featured-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 24px;
}

@media (max-width: 768px) { .featured-section { padding: 80px 15px 20px; } }
@media (max-width: 600px) { .featured-section { display: none; } }

.featured-ticker {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #1a1a1a;
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    transition: background 0.2s ease;
}
.ticker-item:hover { background: #222; }

.ticker-favicon {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    flex-shrink: 0;
}

.ticker-thumb-wrap {
    position: relative;
    flex-shrink: 0;
}

.ticker-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: #222;
    display: block;
}

.ticker-headline {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticker-time {
    font-size: 11px;
    color: rgba(255,255,255,0.2);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .featured-ticker { grid-template-columns: 1fr; gap: 6px; }
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

@media (max-width: 768px) {
    main {
        padding: 0 15px 40px;
    }
}

@media (max-width: 600px) {
    main {
        padding: 0 0 40px;
    }
}

/* Hide featured dupes on desktop where the strip is visible */
.grid > .featured-dupe {
    display: none !important;
}
@media (max-width: 600px) {
    .grid > .featured-dupe {
        display: block !important;
    }
}

/* Mobile-only featured cards (hidden on desktop where strip shows them) */
.mobile-featured-cards {
    display: none;
}
@media (max-width: 600px) {
    .mobile-featured-cards {
        display: flex;
        flex-direction: column;
        gap: 0;
        padding-top: 64px;
    }
}

/* When welcome banner is showing, it handles the nav clearance */
@media (max-width: 600px) {
    .welcome-banner ~ .mobile-featured-cards {
        padding-top: 0;
    }
}

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

@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .grid .card-link + .card-link {
        border-top: 1px solid rgba(255,255,255,0.04);
    }
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    min-width: 0;
}

.card {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

/* On mobile, cards go full-bleed — no radius, no border (gap handles separation) */
@media (max-width: 600px) {
    .card {
        border-radius: 0;
    }
}

.card-link:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4);
}

.card-link:hover .card-image {
    opacity: 0.85;
}

.card-link:hover .card-title {
    color: #fff;
}

@media (max-width: 600px) {
    .card-link:hover .card {
        transform: none;
        box-shadow: none;
    }
    .card-link:hover .card-image {
        opacity: 1;
    }
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #2a2a2a;
    transition: opacity 0.2s ease;
}

/* Fade in images when loaded */
.card-image {
    opacity: 0;
    animation: imgFadeIn 0.3s ease-out forwards;
}

@keyframes imgFadeIn {
    to { opacity: 1; }
}

/* ── Region selector ─────────────────────────────────────────────────────── */
.region-btn {
    position: relative;
}

.region-dropdown {
    position: fixed;
    top: 70px;
    right: 20px;
    background: #111;
    border: 1px solid #1c1c1c;
    border-radius: 12px;
    padding: 6px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
    min-width: 180px;
}

.region-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.region-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    transition: background 0.15s ease, color 0.15s ease;
}

.region-option i {
    font-size: 14px;
    width: 20px;
    text-align: center;
    color: rgba(255,255,255,0.4);
}

.region-flag {
    width: 20px;
    height: 10px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.1);
}

.region-option:hover {
    background: #1a1a1a;
    color: #fff;
}

.region-option.active {
    background: #1a1a1a;
    color: #fff;
    font-weight: 700;
}

@media (max-width: 768px) {
    .region-dropdown { top: 60px; right: 12px; }
}

/* ── Index hero (desktop only) ────────────────────────────────────────── */
.index-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 110px 20px 0;
}

.index-hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    padding: 36px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.index-hero-text {
    text-align: center;
}

.index-hero-title {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
    letter-spacing: -0.5px;
    animation: heroFadeUp 0.8s ease-out both;
}

.index-hero-sub {
    font-size: 15px;
    color: rgba(255,255,255,0.3);
    line-height: 1.5;
    animation: heroFadeUp 0.8s 0.15s ease-out both;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.index-hero-sources {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.index-hero-marquee {
    display: flex;
    align-items: center;
    gap: 20px;
    animation: marqueeScroll 40s linear infinite;
    width: max-content;
}

.index-hero-marquee:hover {
    animation-play-state: paused;
}

.index-hero-marquee img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a1a1a;
    padding: 5px;
    opacity: 0.4;
    flex-shrink: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.index-hero-marquee img:hover {
    opacity: 1;
    transform: scale(1.25);
}

@keyframes marqueeScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Hero changes padding when present */
.index-hero + .welcome-banner {
    padding-top: 16px;
}

.index-hero ~ .featured-section {
    padding-top: 24px;
}

@media (max-width: 768px) {
    .index-hero { padding: 90px 15px 0; }
    .index-hero-title { font-size: 22px; }
}

@media (max-width: 600px) {
    .index-hero { display: none; }
}

/* ── Welcome banner ──────────────────────────────────────────────────────── */
.welcome-banner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 120px 20px 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.welcome-banner.dismissed {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.welcome-banner-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    background: #111;
    border-radius: 12px;
}

.welcome-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 16px;
    color: rgba(255,255,255,0.5);
}

.welcome-banner-text {
    flex: 1;
    min-width: 0;
}

.welcome-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
}

.welcome-banner-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    line-height: 1.5;
}

.welcome-banner-close {
    background: none;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    color: rgba(255,255,255,0.2);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.welcome-banner-close:hover {
    color: rgba(255,255,255,0.6);
}

/* When welcome banner is present, featured section doesn't need its own top padding */
.welcome-banner + .featured-section {
    padding-top: 24px;
}

@media (max-width: 768px) {
    .welcome-banner { padding: 80px 15px 0; }
    .welcome-banner + .featured-section { padding-top: 16px; }
}

@media (max-width: 600px) {
    .welcome-banner { padding: 68px 0 0; }
    .welcome-banner-inner { border-radius: 0; padding: 14px 16px; }
}

/* ── "NEW" badge on fresh cards ───────────────────────────────────────────── */
.card-new-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #0a0a0a;
    background: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    z-index: 2;
    opacity: 0.92;
}

.card {
    position: relative;
}

/* Full-bleed image on mobile */
@media (max-width: 600px) {
    .card-image {
        height: 220px;
        display: block;
    }
}

.card-content {
    padding: 20px;
}

@media (max-width: 600px) {
    .card-content {
        padding: 14px 16px 18px;
    }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
}

.card-tag {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    text-transform: uppercase;
    transition: color 0.2s ease, letter-spacing 0.2s ease;
}

.card-time {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.2);
    margin-top: 10px;
}

.card-link:hover .card-tag {
    color: rgba(255,255,255,0.7);
    letter-spacing: 1.5px;
}

.card-source {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    padding: 3px 6px 3px 3px;
    border-radius: 20px;
    margin: -3px -6px -3px -3px;
    transition: background 0.2s ease;
}

.card-source:hover {
    background: rgba(255,255,255,0.08);
}

.card-source-visit {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    max-width: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    transition: max-width 0.3s ease, opacity 0.2s ease, padding 0.3s ease;
    padding-left: 0;
    padding-right: 0;
}

.card-source:hover .card-source-visit {
    max-width: 200px;
    opacity: 1;
    padding-left: 6px;
    padding-right: 4px;
}

.card-source-name {
    display: none;
}

.source-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.cluster-icon {
    margin-left: -6px;
    border: 2px solid #1a1a1a;
    position: relative;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.2s ease;
}

@media (max-width: 600px) {
    .card-title {
        font-size: 16px;
        margin-bottom: 8px;
    }
}

.card-description {
    font-size: 14px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 600px) {
    .card-description {
        font-size: 13px;
        -webkit-line-clamp: 2;
    }
}

/* ── Card footer — pinned stats bar ─────────────────────────────────────── */
.card {
    display: flex;
    flex-direction: column;
}

.card-content {
    flex: 1;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px 12px;
    border-top: 1px solid rgba(255,255,255,0.04);
}

.card-stat-time {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.4);
    white-space: nowrap;
}

.card-stat-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    flex-shrink: 0;
    font-size: 0;
    overflow: hidden;
}

.card-stat-count {
    font-size: 11px;
    font-weight: 600;
    color: rgba(255,255,255,0.3);
    white-space: nowrap;
}

/* ── Post page meta line ─────────────────────────────────────────────────── */
.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.post-meta-stat {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
}

.post-meta-dot {
    font-size: 13px;
    color: rgba(255,255,255,0.2);
    padding: 0 2px;
}


.loading {
    text-align: center;
    padding: 60px;
    color: #666;
}

.error {
    text-align: center;
    padding: 60px;
    color: #ff6b6b;
}

#scroll-sentinel {
    width: 100%;
    height: 100px;
}

.loading-more {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 14px;
}

.loading-more::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}


/* ── Skeleton shimmer ─────────────────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: -600px 0; }
    100% { background-position: 600px 0; }
}

.skeleton {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 4px;
}

/* Skeleton card */
.card-skeleton {
    background-color: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
}

@media (max-width: 600px) {
    .card-skeleton {
        border-radius: 0;
    }
}

.card-skeleton-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

@media (max-width: 600px) {
    .card-skeleton-image { height: 220px; }
}

.card-skeleton-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (max-width: 600px) {
    .card-skeleton-body { padding: 14px 16px 18px; }
}

.card-skeleton-tag {
    width: 60px;
    height: 12px;
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 3px;
}

.card-skeleton-title {
    height: 18px;
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 3px;
}

.card-skeleton-title:nth-child(2) { width: 100%; }
.card-skeleton-title:nth-child(3) { width: 75%; }

.card-skeleton-desc {
    height: 13px;
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 3px;
}

.card-skeleton-desc:nth-child(4) { width: 100%; }
.card-skeleton-desc:nth-child(5) { width: 85%; }
.card-skeleton-desc:nth-child(6) { width: 60%; }

/* Hero skeleton */
.hero-skeleton {
    width: 100%;
    height: 500px;
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
    border-radius: 20px;
}

@media (max-width: 768px) { .hero-skeleton { height: 350px; } }
@media (max-width: 600px) { .hero-skeleton { height: 260px; border-radius: 0; } }
@media (max-width: 480px) { .hero-skeleton { height: 220px; } }

/* ── Card image shimmer while loading ────────────────────────────────────── */
.card-image {
    transition: opacity 0.3s ease;
}

.card-image.loading {
    background: linear-gradient(90deg, #1a1a1a 25%, #252525 50%, #1a1a1a 75%);
    background-size: 600px 100%;
    animation: shimmer 1.4s ease-in-out infinite;
}

/* ── Staggered card entrance ─────────────────────────────────────────────── */
@keyframes cardEnter {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.card-link {
    animation: cardEnter 0.4s ease both;
}

/* Delay each newly loaded card slightly */
.card-link:nth-child(3n+1) { animation-delay: 0ms; }
.card-link:nth-child(3n+2) { animation-delay: 60ms; }
.card-link:nth-child(3n+3) { animation-delay: 120ms; }

/* ── Top progress bar ────────────────────────────────────────────────────── */
#top-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: #fff;
    z-index: 9999;
    transition: width 0.3s ease, opacity 0.4s ease;
    opacity: 0;
    pointer-events: none;
}

#top-progress.active {
    opacity: 1;
}

/* ── Infinite scroll loader — pulsing dots ───────────────────────────────── */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: #888;
    font-size: 14px;
}

.dot-pulse {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 12px;
}

.dot-pulse span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #444;
    animation: dotPulse 1.2s ease-in-out infinite;
}

.dot-pulse span:nth-child(2) { animation-delay: 0.2s; }
.dot-pulse span:nth-child(3) { animation-delay: 0.4s; }

@keyframes dotPulse {
    0%, 80%, 100% { transform: scale(0.7); background: #333; }
    40%           { transform: scale(1);   background: #888; }
}

/* Post button */
.post-btn {
    background-color: #ffffff;
    color: #0a0a0a;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, padding 0.3s ease, font-size 0.3s ease;
}

.post-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.03);
}

.top-bar.shrink .post-btn {
    padding: 10px 18px;
    font-size: 14px;
}

@media (max-width: 768px) {
    .post-btn {
        padding: 10px 18px;
        font-size: 14px;
    }

    .top-bar.shrink .post-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
}

/* Stats pill button */
.nav-right {
    gap: 10px;
}

.stats-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    color: rgba(255, 255, 255, 0.7);
    border-radius: 999px;
    width: 44px;
    height: 44px;
    font-size: 15px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.stats-btn:hover {
    background-color: #2a2a2a;
    color: #fff;
    transform: scale(1.05);
}

.top-bar.shrink .stats-btn {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

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

/* ── Search bar (inline expand in top-bar) ───────────────────────────────── */
.search-bar-wrap {
    position: fixed;
    top: 100px;
    left: 0;
    right: 0;
    background-color: var(--bg-2);
    border-bottom: 1px solid var(--border);
    padding: 12px 30px;
    z-index: 999;
    display: flex;
    gap: 10px;
    align-items: center;
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s ease, top 0.3s ease;
}

.search-bar-wrap.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.top-bar.shrink ~ .search-bar-wrap,
.top-bar.shrink + .search-bar-wrap {
    top: 70px;
}

@media (max-width: 768px) {
    .search-bar-wrap {
        top: 70px;
        padding: 10px 15px;
    }
}

.search-bar-input {
    flex: 1;
    background: var(--bg-4);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 15px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s ease;
}

.search-bar-input:focus {
    border-color: rgba(255,255,255,0.25);
}

.search-bar-input::placeholder {
    color: var(--text-4);
}

.search-bar-close {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 18px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: color 0.2s ease;
    flex-shrink: 0;
}

.search-bar-close:hover {
    color: var(--text);
}

/* Suppress transition on initial page load to prevent flash */
.share-modal.no-transition,
.share-modal-overlay.no-transition,
.side-menu.no-transition {
    transition: none !important;
}

/* ── Back to top ──────────────────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    left: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1a1a1a;
    border: none;
    color: rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 800;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s ease, color 0.2s ease;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #222;
    color: #fff;
}

@media (max-width: 600px) {
    .back-to-top { bottom: 20px; left: 16px; width: 36px; height: 36px; }
}

/* ── Cookie consent ──────────────────────────────────────────────────────── */
.cookie-consent {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9000;
    background-color: #1a1a1a;
    border-radius: 16px;
    padding: 18px 20px;
    width: 300px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}

.cookie-consent.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-consent-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.cookie-consent-head i {
    font-size: 15px;
    color: rgba(255,255,255,0.5);
}

.cookie-consent-head span {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
}

.cookie-consent p {
    font-size: 12px;
    color: rgba(255,255,255,0.4);
    line-height: 1.6;
    margin-bottom: 16px;
}

.cookie-consent p a {
    color: rgba(255,255,255,0.6);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.15s ease;
}

.cookie-consent p a:hover {
    color: #fff;
}

.cookie-consent-actions {
    display: flex;
    gap: 8px;
}

.cookie-btn-accept {
    flex: 1;
    background-color: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.cookie-btn-accept:hover {
    background-color: #e8e8e8;
}

.cookie-btn-decline {
    background: none;
    border: none;
    color: rgba(255,255,255,0.35);
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.cookie-btn-decline:hover {
    color: rgba(255,255,255,0.6);
}

@media (max-width: 600px) {
    .cookie-consent {
        left: 12px;
        right: 12px;
        bottom: 16px;
        width: auto;
    }
}

/* ── PWA Install Banner ──────────────────────────────────────────────────── */
.pwa-banner {
    position: fixed;
    top: 108px;
    right: 20px;
    z-index: 1050;
    background: #111;
    border: 1px solid #1c1c1c;
    border-radius: 14px;
    width: 280px;
    display: none;
}

.pwa-banner.visible {
    display: block;
    animation: pwaDropIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes pwaDropIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pwa-banner-inner {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.pwa-banner-icon img {
    width: 36px;
    height: 36px;
    border-radius: 9px;
}

.pwa-banner-text {
    flex: 1;
}

.pwa-banner-title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 3px;
}

.pwa-banner-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.35);
    line-height: 1.4;
}

.pwa-banner-actions {
    display: flex;
    gap: 8px;
}

.pwa-btn-install {
    flex: 1;
    background: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 999px;
    padding: 9px 16px;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease;
}

.pwa-btn-install:hover {
    background: #e8e8e8;
}

.pwa-btn-dismiss {
    background: none;
    border: none;
    color: rgba(255,255,255,0.3);
    font-size: 12px;
    font-family: inherit;
    cursor: pointer;
    padding: 9px 12px;
    border-radius: 999px;
    transition: color 0.2s ease;
}

.pwa-btn-dismiss:hover {
    color: rgba(255,255,255,0.6);
}

@media (max-width: 768px) {
    .pwa-banner { top: 78px; right: 12px; width: 260px; }
}

@media (max-width: 600px) {
    .pwa-banner { top: 66px; left: 12px; right: 12px; width: auto; }
}

/* ── Hide nav post button on mobile, show FAB instead ───────────────────── */
@media (max-width: 768px) {
    .nav-post-btn {
        display: none !important;
    }
}

/* ── Floating Action Button (mobile post) ────────────────────────────────── */
.fab-post-btn {
    display: none; /* hidden on desktop */
    position: fixed;
    bottom: 28px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #ffffff;
    color: #0a0a0a;
    border: none;
    font-size: 22px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 900;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.fab-post-btn:hover {
    background-color: #f0f0f0;
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(0, 0, 0, 0.6);
}

.fab-post-btn:active {
    transform: scale(0.96);
}

@media (max-width: 768px) {
    .fab-post-btn {
        display: flex;
    }
}

/* ── Tribute banner ──────────────────────────────────────────────────────── */
.tribute-banner {
    position: relative;
    display: block;
    width: 100%;
    height: 520px;
    overflow: hidden;
    margin-top: 100px; /* clear fixed nav */
    text-decoration: none;
    color: inherit;
}

@media (max-width: 768px) {
    .tribute-banner {
        height: 380px;
        margin-top: 70px;
    }
}

@media (max-width: 480px) {
    .tribute-banner {
        height: 300px;
        margin-top: 60px;
    }
}

.tribute-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
    background-repeat: no-repeat;
    filter: blur(2px) brightness(0.55) saturate(0.7);
    transform: scale(1.04); /* hide blur edges */
    transition: filter 0.4s ease, transform 0.4s ease;
}

.tribute-banner:hover .tribute-bg {
    filter: blur(1px) brightness(0.65) saturate(0.8);
    transform: scale(1.06);
}

.tribute-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(10, 10, 10, 0.15) 0%,
        rgba(10, 10, 10, 0.55) 60%,
        rgba(10, 10, 10, 0.88) 100%
    );
}

.tribute-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 24px;
    gap: 12px;
}

.tribute-tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    display: block;
}

.tribute-name {
    font-size: 64px;
    font-weight: 800;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -1px;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .tribute-name {
        font-size: 44px;
    }
}

@media (max-width: 480px) {
    .tribute-name {
        font-size: 34px;
    }
}

.tribute-sub {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    font-style: italic;
}

@media (max-width: 480px) {
    .tribute-sub {
        font-size: 15px;
    }
}

.tribute-read {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.2s ease;
}

.tribute-banner:hover .tribute-read {
    color: rgba(255, 255, 255, 0.85);
}

/* ── Source tier badges ──────────────────────────────────────────────────────── */
.source-tier-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    height: 20px;
    padding: 0 7px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.2px;
    white-space: nowrap;
    flex-shrink: 0;
    box-sizing: border-box;
    line-height: 1;
    border: none;
}

.source-tier-badge .fa-circle-check,
.source-tier-badge .fa-star {
    font-size: 10px;
    line-height: 1;
}

.source-tier-badge.tier-verified {
    background: rgba(80, 180, 255, 0.15);
    color: #50b4ff;
}

.source-tier-badge.tier-premium {
    background: rgba(255, 195, 50, 0.15);
    color: #ffc83d;
}

/* Cards — same 20px height, slightly smaller text */
.card .source-tier-badge {
    height: 20px;
    font-size: 9px;
    padding: 0 6px;
    gap: 3px;
}

.card .source-tier-badge .fa-circle-check,
.card .source-tier-badge .fa-star {
    font-size: 9px;
}

/* Post page — slightly taller */
.post-source .source-tier-badge {
    height: 22px;
    font-size: 11px;
    padding: 0 9px;
}

.post-source .source-tier-badge .fa-circle-check,
.post-source .source-tier-badge .fa-star {
    font-size: 11px;
}

/* Premium card — subtle gold top border */
.card-link.card-premium .card {
    border-top: 2px solid rgba(255, 195, 50, 0.35);
}

/* Premium hero — subtle gold accent */
.hero-article.hero-premium {
    box-shadow: 0 0 0 2px rgba(255, 195, 50, 0.25);
}

/* ── Trending strip (inline mid-feed) ───────────────────────────────────── */
.trending-strip {
    grid-column: 1 / -1;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    margin: 8px 0;
}

@media (max-width: 600px) {
    .trending-strip {
        border-radius: 0;
        margin: 6px 0;
    }
}

.trending-strip-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #1a1a1a;
}

.trending-strip-label {
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.trending-strip-label i {
    color: #ff6b35;
    font-size: 14px;
}

.trending-strip-sub {
    font-size: 11px;
    color: rgba(255,255,255,0.25);
    margin-left: auto;
}

.trending-strip-grid {
    display: flex;
    flex-direction: column;
}

.trending-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid #161616;
    text-decoration: none;
    color: inherit;
    transition: background 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.trending-item:last-child {
    border-bottom: none;
}

.trending-item:hover {
    background: #161616;
}

.trending-img {
    width: 80px;
    height: 58px;
    object-fit: cover;
    border-radius: 8px;
    background: #1a1a1a;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .trending-img {
        width: 66px;
        height: 48px;
    }
}

.trending-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trending-cat {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
}

.trending-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

@media (max-width: 480px) {
    .trending-title { font-size: 14px; }
}

.trending-source {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: rgba(255,255,255,0.3);
}

.trending-source img {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.trending-arrow {
    color: rgba(255,255,255,0.15);
    font-size: 12px;
    flex-shrink: 0;
}


