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

/* ── 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;
}



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

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

.top-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 100px;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    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, border-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;
}

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

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

.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;
}

.hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 140px 20px 40px;
}

@media (max-width: 768px) {
    .hero {
        padding: 70px 15px 24px;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 70px 0 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0 0;
    }
}

.hero-article {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background-color: #1a1a1a;
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.hero-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    background-color: #2a2a2a;
}

@media (max-width: 768px) {
    .hero-image {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .hero-image {
        height: 250px;
    }
}

.hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 40px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
}

@media (max-width: 768px) {
    .hero-content {
        padding: 30px;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 20px;
    }
}

.hero-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    margin-bottom: 16px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
    color: #fff;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 22px;
        margin-bottom: 8px;
    }
}

.hero-description {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    max-width: 600px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero-description {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero-description {
        font-size: 13px;
        line-height: 1.5;
    }
}

.hero-source {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
}

.hero-source img {
    width: 20px;
    height: 20px;
    border-radius: 2px;
}

.hero-source span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

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;
    }
}

.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: 6px;
    }
}

.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);
}

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

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

/* 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-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;
}

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

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

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

@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: 3;
    -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;
    flex-wrap: wrap;
    gap: 4px;
    padding: 9px 16px 11px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

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

.card-stat-dot {
    font-size: 11px;
    color: rgba(255,255,255,0.15);
    line-height: 1;
    padding: 0 1px;
}

.card-stat-count {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255,255,255,0.25);
    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);
}

/* ── Post panel ──────────────────────────────────────────────────────────── */
.post-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 2500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.post-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 92vh;
    background-color: #111;
    border-radius: 20px 20px 0 0;
    z-index: 2600;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

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

.post-panel.open {
    transform: translateY(0);
}

/* Handle */
.post-panel-handle {
    display: flex;
    justify-content: center;
    padding: 12px 0 4px;
    flex-shrink: 0;
}

.post-panel-handle-bar {
    width: 36px;
    height: 4px;
    background-color: rgba(255,255,255,0.15);
    border-radius: 999px;
}

/* Header */
.post-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 16px;
    flex-shrink: 0;
}

.post-panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

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

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

/* Body */
.post-panel-body {
    overflow-y: auto;
    padding: 0 20px 40px;
    -webkit-overflow-scrolling: touch;
}

.post-form {
    max-width: 600px;
    margin: 0 auto;
}

/* URL input row */
.post-url-row {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    background-color: #1a1a1a;
    border-radius: 14px;
    padding: 6px 6px 6px 16px;
    align-items: center;
}

.post-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 15px;
    padding: 10px 0;
    font-family: inherit;
    min-width: 0;
}

.post-input::placeholder {
    color: rgba(255,255,255,0.25);
}

.post-input:focus {
    outline: none;
}

.post-preview-btn {
    background-color: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.post-preview-btn:hover:not(:disabled) {
    background-color: #e8e8e8;
}

.post-preview-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error */
.post-error {
    color: #ff6b6b;
    font-size: 13px;
    margin-bottom: 14px;
    padding: 0 4px;
}

/* Preview section */
.post-preview {
    margin-top: 4px;
}

/* No image state */
.post-preview-no-image[hidden],
.post-card-preview[hidden] {
    display: none !important;
}

.post-preview-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px 20px;
    margin-bottom: 16px;
    background-color: #1a1a1a;
    border-radius: 14px;
    color: #666;
    font-size: 13px;
    text-align: center;
    line-height: 1.5;
}

.post-preview-no-image strong {
    color: #fff;
    font-size: 15px;
}

.post-preview-no-image i {
    font-size: 26px;
    color: #333;
    margin-bottom: 4px;
}

/* Card preview */
.post-card-preview {
    background-color: #1a1a1a;
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}

.post-preview-image-wrap {
    position: relative;
    overflow: hidden;
    background-color: #222;
}

.post-preview-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.post-image-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    transition: background-color 0.2s ease;
}

.post-image-nav-btn[hidden] { display: none !important; }
.post-image-nav-btn:hover   { background-color: rgba(0,0,0,0.9); }
.post-image-prev-btn        { left: 10px; }
.post-image-next-btn        { right: 10px; }

.post-image-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(0,0,0,0.7);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 20px;
}

.post-image-counter[hidden] { display: none !important; }

/* Preview card content */
.post-card-preview-content {
    padding: 14px 16px 16px;
}

.post-preview-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    gap: 8px;
}

.post-preview-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
    margin-bottom: 6px;
}

.post-preview-desc {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Publish button */
.post-publish-btn {
    width: 100%;
    background-color: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 14px;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.post-publish-btn:hover:not(:disabled) {
    background-color: #efefef;
}

.post-publish-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .post-panel {
        border-radius: 16px 16px 0 0;
    }

    .post-panel-body {
        padding: 0 16px 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;
    }
}

/* ── 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);
}

/* ── Giveaway banner ─────────────────────────────────────────────────────── */
.giveaway-banner {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 8500;
    background: #111;
    border-radius: 18px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22,1,0.36,1);
    pointer-events: none;
}

.giveaway-banner.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.giveaway-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #1a1a1a;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    color: rgba(255,255,255,0.4);
    font-size: 11px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}

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

.giveaway-inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.giveaway-prize {
    font-size: 36px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    letter-spacing: -1px;
}

.giveaway-title {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}

.giveaway-sub {
    font-size: 12px;
    color: rgba(255,255,255,0.45);
    line-height: 1.6;
}

.giveaway-sub strong {
    color: rgba(255,255,255,0.75);
}

.giveaway-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #0a0a0a;
    border: none;
    border-radius: 10px;
    padding: 11px 18px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.15s ease;
    align-self: flex-start;
}

.giveaway-btn:hover {
    background: #e8e8e8;
    transform: scale(1.02);
}

@media (max-width: 600px) {
    .giveaway-banner {
        left: 12px;
        right: 12px;
        bottom: 16px;
        width: auto;
        border-radius: 16px;
    }
}

/* ── 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: 2px;
}

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

/* ── England World Cup ribbon ────────────────────────────────────────────── */
:root {
    --ribbon-h: 0px;
}

.eng-ribbon {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1100;
    background: #cf0921;
    background-image:
        linear-gradient(rgba(255,255,255,0.06) 0, rgba(255,255,255,0.06) 100%),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 48px,
            rgba(255,255,255,0.04) 48px,
            rgba(255,255,255,0.04) 52px
        ),
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 48px,
            rgba(255,255,255,0.04) 48px,
            rgba(255,255,255,0.04) 52px
        );
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
}

/* Push the nav bar down by the ribbon height */
.top-bar {
    top: var(--ribbon-h) !important;
}

/* ── Ribbon-aware page top offsets ──────────────────────────────────────── */
/* Any element that uses a fixed top offset to clear the nav needs to also   */
/* account for the ribbon. We do this by adding --ribbon-h to the base.      */
.hero {
    padding-top: calc(140px + var(--ribbon-h)) !important;
}

@media (max-width: 768px) {
    .hero { padding-top: calc(70px + var(--ribbon-h)) !important; }
}
@media (max-width: 600px) {
    .hero {
        display: none !important;
    }
}

main {
    padding-top: calc(0px + var(--ribbon-h));
}

.post-article {
    margin-top: calc(100px + var(--ribbon-h)) !important;
}

@media (max-width: 768px) {
    .post-article { margin-top: calc(70px + var(--ribbon-h)) !important; }
}
@media (max-width: 480px) {
    .post-article { margin-top: calc(60px + var(--ribbon-h)) !important; }
}

.search-bar-wrap {
    top: calc(100px + var(--ribbon-h)) !important;
}

@media (max-width: 768px) {
    .search-bar-wrap { top: calc(70px + var(--ribbon-h)) !important; }
}

.top-bar.shrink ~ .search-bar-wrap,
.top-bar.shrink + .search-bar-wrap {
    top: calc(70px + var(--ribbon-h)) !important;
}

.eng-ribbon-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eng-ribbon-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
    animation: ribbonWave 2.2s ease-in-out infinite;
    transform-origin: left center;
}

.eng-ribbon-flag:last-child {
    animation-delay: 0.4s;
}

@keyframes ribbonWave {
    0%, 100% { transform: skewY(0deg);   }
    30%       { transform: skewY(2deg);  }
    70%       { transform: skewY(-2deg); }
}

.eng-ribbon-text {
    font-size: 14px;
    font-weight: 700;
    color: rgba(255,255,255,0.95);
    letter-spacing: 0.3px;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .eng-ribbon-flag:last-child { display: none; }
    .eng-ribbon-text { font-size: 12px; }
}
