[x-cloak] {
    display: none !important;
}

:root {
    --bg-primary: #121212;
    --bg-secondary: #1a1a1a;
    --bg-card: #262626;
    --accent: #6366f1;
    --accent-hover: #818cf8;
    --accent-secondary: #8b5cf6;
    --accent-secondary-hover: #a78bfa;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border: #404040;
}

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

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Hide Vite dev indicator only — do not blanket-hide fixed bottom bars (cookie consent) */
#vite-plugin-checker-notification-root,
[data-vite-dev-id] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

#cookie-consent-banner {
    pointer-events: auto;
}

/* Hide close button */
.close-btn {
    display: none !important;
}

/* Hide JSON output that might appear on page */
body > pre:only-child {
    display: none !important;
}

/* Header */
header {
    background: rgba(9, 9, 11, 0.65);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 0; /* Slightly larger padding */
    min-height: 95px; /* Slightly larger height */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    isolation: isolate;
}

.header-container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo span {
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo:hover {
    transform: scale(1.03);
}

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

nav ul.nav-links {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.header-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: transparent;
}

.header-nav-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.header-nav-btn svg {
    opacity: 0.75;
    transition: all 0.2s ease;
}

.header-nav-btn:hover svg {
    opacity: 1;
    transform: scale(1.1);
}


.search-bar {
    flex: 1;
    max-width: 320px;
    position: relative;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.7rem 2.8rem 0.7rem 1.4rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 25px;
    color: #ffffff;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(243, 156, 18, 0.6);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15);
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-btn:hover {
    color: #F39C12;
    background: rgba(255, 255, 255, 0.05);
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.btn-donate {
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.7rem 1.6rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.25);
    transition: all 0.3s ease;
}

.btn-donate:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4);
    filter: brightness(1.1);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-top: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1100;
}

.search-suggestions.active {
    display: block;
}

.suggestion-item {
    padding: 0.8rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
}

.suggestion-item:hover {
    background: var(--bg-secondary);
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.btn {
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    filter: brightness(1.05);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 1.4rem;
    border-radius: 20px;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
    margin: 0;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.06);
    color: inherit;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    z-index: 1100;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease;
}

.hamburger.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.is-open span:nth-child(2) {
    opacity: 0;
}

.hamburger.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 900px) {
    header {
        padding: 0.85rem 0;
        min-height: auto;
    }

    .hamburger {
        display: flex;
        order: 4;
    }

    .logo-section {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        position: relative;
        z-index: 2;
    }

    .header-actions {
        order: 2;
        z-index: 2;
        flex-shrink: 0;
    }

    .auth-buttons {
        order: 3;
        z-index: 2;
        flex-shrink: 0;
    }

    header nav,
    header .site-nav {
        display: none;
        width: 100%;
        order: 5;
        flex: 1 1 100%;
        position: relative;
        z-index: 1050;
        background: rgba(9, 9, 11, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 12px;
        margin-top: 0.5rem;
        padding: 0.5rem;
        box-sizing: border-box;
    }

    header nav.active,
    header .site-nav.active {
        display: block;
    }

    header .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
        padding: 0;
    }

    header .nav-links .header-nav-btn {
        width: 100%;
        padding: 0.85rem 1rem;
        min-height: 44px;
        box-sizing: border-box;
    }

    .header-container {
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 0.65rem;
    }

    .search-bar {
        order: 6;
        width: 100%;
        max-width: none;
        flex: 1 1 100%;
        position: relative;
        z-index: 1;
    }
}

body.nav-open {
    overflow: hidden;
}

/* Featured Slider */
.featured-slider {
    max-width: 1280px;
    width: 100%;
    margin: 2rem auto;
    padding: 0 4rem;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.slider-wrapper {
    overflow: hidden;
    border-radius: 12px;
}

.slider-container {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    display: flex;
    gap: 2rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 2rem;
    align-items: center;
    box-sizing: border-box;
}

/* Image Quality Improvements */
img {
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.slide-cover {
    width: 150px;
    height: 200px;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
    flex-shrink: 0;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
}

.slide-info {
    flex: 1;
}

.slide-info h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.rating {
    color: #fbbf24;
    font-weight: bold;
    margin-bottom: 1rem;
}

.genre-tags {
    display: flex;
    gap: 0.5rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.tag {
    background: var(--bg-card);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
}

.slider-controls {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 0.5rem;
}

.slider-btn {
    background: rgba(0,0,0,0.7);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
}

/* Section */
.section {
    max-width: 1280px;
    width: 100%;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.8rem;
    border-left: 4px solid var(--accent);
    padding-left: 1rem;
}

.view-all {
    color: var(--accent);
    text-decoration: none;
}

/* Grid */
.grid {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 2rem auto !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 2rem !important;
}

.card {
    background: var(--bg-secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

.card-cover,
.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center top;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    flex-shrink: 0;
}

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.type-badge {
    background: var(--accent);
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

/* Channels */
.channels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.channel-card {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    align-items: center;
}

.channel-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.channel-info h3 {
    margin-bottom: 0.5rem;
}

.channel-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Footer — jumbo site chrome */
.site-footer {
    background:
        radial-gradient(ellipse 80% 60% at 10% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 100%, rgba(139, 92, 246, 0.1), transparent 50%),
        linear-gradient(180deg, #0a0f1c 0%, #060912 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5.5rem 0 0;
    margin-top: 5rem;
    position: relative;
    z-index: 10;
}

.site-footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2.5rem 4rem;
    display: grid;
    grid-template-columns: minmax(240px, 1.6fr) repeat(4, minmax(0, 1fr));
    gap: 3rem 2.5rem;
    align-items: start;
}

.site-footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 360px;
}

.site-footer-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    text-decoration: none;
}

.site-footer-logo img {
    height: 64px;
    width: 64px;
    border-radius: 14px;
    box-shadow: 0 0 24px rgba(59, 130, 246, 0.45);
}

.site-footer-logo-text {
    font-size: 2.15rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.6px;
    line-height: 1.1;
}

.site-footer-logo-text span {
    background: linear-gradient(135deg, #60a5fa, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.site-footer-tagline {
    margin: 0;
    color: #94a3b8;
    font-size: 1rem;
    line-height: 1.7;
}

.site-footer-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.site-footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.site-footer-social a:hover {
    background: rgba(96, 165, 250, 0.15);
    border-color: rgba(96, 165, 250, 0.45);
    color: #93c5fd;
    transform: translateY(-2px);
}

.site-footer-social svg {
    width: 22px;
    height: 22px;
}

.site-footer-social svg.fill {
    fill: currentColor;
}

.site-footer-social svg.stroke {
    fill: none;
    stroke: currentColor;
}

.site-footer-col h3 {
    margin: 0 0 1.35rem;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.site-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.site-footer-col a,
.site-footer-col button.site-footer-link {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 500;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.site-footer-col a:hover,
.site-footer-col button.site-footer-link:hover {
    color: #60a5fa;
}

.site-footer-col a.accent-gold:hover { color: #fbbf24; }
.site-footer-col a.accent-red:hover { color: #f87171; }
.site-footer-col a.accent-green:hover { color: #34d399; }

.site-footer-bottom {
    background: rgba(0, 0, 0, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 1.75rem 2.5rem 2rem;
    text-align: center;
}

.site-footer-bottom p {
    margin: 0;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.65;
    max-width: 920px;
    margin-left: auto;
    margin-right: auto;
}

.site-footer-bottom .copy {
    margin-top: 0.65rem;
    color: #6b7280;
}

/* Legal / static content pages */
.legal-page {
    position: relative;
    z-index: 1;
    max-width: 920px;
    margin: 0 auto;
    padding: 4rem 1.5rem 5rem;
}

.legal-hero {
    text-align: center;
    margin-bottom: 3rem;
}

.legal-hero-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.35rem;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.legal-hero-icon svg {
    width: 34px;
    height: 34px;
}

.legal-hero h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.04em;
    margin: 0 0 0.75rem;
}

.legal-hero h1 span {
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.legal-hero .meta {
    color: #94a3b8;
    font-size: 1.05rem;
    margin: 0;
}

.legal-card {
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: clamp(1.75rem, 4vw, 3rem);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    color: #cbd5e1;
    line-height: 1.8;
}

.legal-card h2 {
    font-size: 1.35rem;
    color: #fff;
    font-weight: 700;
    margin: 0 0 0.85rem;
}

.legal-card p {
    margin: 0 0 1.75rem;
}

.legal-card p:last-child {
    margin-bottom: 0;
}

.legal-card a {
    color: #60a5fa;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.legal-card ul {
    margin: 0 0 1.75rem;
    padding: 0;
    list-style: none;
}

.legal-card li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.65rem;
    color: #94a3b8;
}

.legal-card li svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.legal-notice {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 14px;
    padding: 1.15rem 1.35rem;
    margin-bottom: 2rem;
    color: #fca5a5;
    font-size: 0.95rem;
}

.legal-notice svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #f87171;
    margin-top: 0.1rem;
}

.pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
}

.pay-badge svg {
    width: 18px;
    height: 18px;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-bottom: 0.75rem;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.check-row svg {
    width: 18px;
    height: 18px;
    color: #10b981;
    flex-shrink: 0;
    margin-top: 0.15rem;
}

/* OriginRealm custom HTTP error pages */
.or-error {
    position: relative;
    isolation: isolate;
    min-height: min(68vh, 720px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 1.25rem 5rem;
    overflow: hidden;
}

.or-error-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    filter: blur(8px);
}

.or-error-glow-a {
    width: min(520px, 80vw);
    height: min(520px, 80vw);
    top: -12%;
    left: 50%;
    transform: translateX(-55%);
    background: radial-gradient(circle, var(--or-error-glow, rgba(96, 165, 250, 0.22)) 0%, transparent 68%);
    animation: or-error-pulse 7s ease-in-out infinite;
}

.or-error-glow-b {
    width: min(380px, 70vw);
    height: min(380px, 70vw);
    bottom: -8%;
    right: 8%;
    background: radial-gradient(circle, rgba(15, 23, 42, 0.9) 0%, transparent 70%);
}

@keyframes or-error-pulse {
    0%, 100% { opacity: 0.75; transform: translateX(-55%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.06); }
}

.or-error-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 560px;
    text-align: center;
    padding: 2.75rem 2rem 2.5rem;
    border-radius: 24px;
    background:
        linear-gradient(180deg, rgba(22, 32, 52, 0.92), rgba(10, 15, 28, 0.94));
    border: 1px solid rgba(255, 255, 255, 0.09);
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.02) inset,
        0 28px 60px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: or-error-rise 0.55s ease-out;
}

@keyframes or-error-rise {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

.or-error-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.35rem;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--or-error-accent, #60a5fa);
    background: color-mix(in srgb, var(--or-error-accent, #60a5fa) 16%, transparent);
    border: 1px solid color-mix(in srgb, var(--or-error-accent, #60a5fa) 40%, transparent);
    box-shadow: 0 0 28px var(--or-error-glow, rgba(96, 165, 250, 0.22));
}

.or-error-icon svg {
    width: 34px;
    height: 34px;
}

.or-error-code {
    margin: 0 0 0.65rem;
    font-size: clamp(3.5rem, 10vw, 5.5rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.95;
    color: var(--or-error-accent, #60a5fa);
    text-shadow: 0 0 40px var(--or-error-glow, rgba(96, 165, 250, 0.35));
}

.or-error-title {
    margin: 0 0 0.85rem;
    font-size: clamp(1.55rem, 3.5vw, 2rem);
    font-weight: 800;
    color: #f8fafc;
    letter-spacing: -0.03em;
}

.or-error-message {
    margin: 0 auto 1.85rem;
    max-width: 38ch;
    color: #94a3b8;
    font-size: 1.05rem;
    line-height: 1.65;
}

.or-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    align-items: center;
}

.or-error-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 46px;
    padding: 0.7rem 1.35rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.or-error-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.or-error-btn-primary {
    color: #0b1220;
    background: linear-gradient(135deg, #93c5fd, #3b82f6);
    box-shadow: 0 10px 24px rgba(59, 130, 246, 0.28);
}

.or-error-btn-primary:hover {
    transform: translateY(-2px);
    color: #0b1220;
}

.or-error-btn-ghost {
    color: #cbd5e1;
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.12);
}

.or-error-btn-ghost:hover {
    color: #fff;
    border-color: color-mix(in srgb, var(--or-error-accent, #60a5fa) 55%, rgba(255,255,255,0.12));
    background: color-mix(in srgb, var(--or-error-accent, #60a5fa) 12%, transparent);
}

.or-error-extra {
    margin-top: 1.75rem;
    padding-top: 1.35rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.or-error-hint {
    margin: 0;
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.55;
}

.or-error-hint a {
    color: var(--or-error-accent, #60a5fa);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.or-error-search {
    display: flex;
    gap: 0.55rem;
    max-width: 360px;
    margin: 0.85rem auto 0;
}

.or-error-search input {
    flex: 1;
    min-width: 0;
    padding: 0.7rem 0.95rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.28);
    color: #e2e8f0;
    font-size: 0.92rem;
    font-family: inherit;
}

.or-error-search input::placeholder {
    color: #64748b;
}

.or-error-search input:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--or-error-accent, #60a5fa) 70%, transparent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--or-error-accent, #60a5fa) 18%, transparent);
}

.or-error-search button {
    width: 46px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    color: #0b1220;
    background: linear-gradient(135deg, #93c5fd, #3b82f6);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.or-error-search button svg {
    width: 18px;
    height: 18px;
}

@media (max-width: 560px) {
    .or-error {
        padding: 2.5rem 1rem 3.5rem;
        min-height: auto;
    }

    .or-error-panel {
        padding: 2.1rem 1.25rem 1.85rem;
    }

    .or-error-actions {
        flex-direction: column;
    }

    .or-error-btn {
        width: 100%;
    }
}

@media (max-width: 1100px) {
    .site-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem 2rem;
    }

    .site-footer-brand {
        grid-column: 1 / -1;
        max-width: 480px;
    }
}

@media (max-width: 640px) {
    .site-footer {
        padding-top: 3.5rem;
        margin-top: 3rem;
    }

    .site-footer-inner {
        grid-template-columns: 1fr;
        padding: 0 1.25rem 2.5rem;
        gap: 2rem;
    }

    .site-footer-logo img {
        height: 52px;
        width: 52px;
    }

    .site-footer-logo-text {
        font-size: 1.75rem;
    }

    .site-footer-bottom {
        padding: 1.35rem 1.25rem 1.75rem;
    }
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-card) 50%, var(--bg-secondary) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-card {
    height: 400px;
    border-radius: 8px;
}

/* Top 10 List */
.top-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.top-item {
    display: flex;
    gap: 1rem;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 8px;
    align-items: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.top-item:hover {
    transform: translateX(5px);
}

.rank-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--accent);
    min-width: 50px;
}

.top-item-cover {
    width: 80px;
    height: 100px;
    object-fit: cover;
    object-position: center;
    border-radius: 4px;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.top-item-info {
    flex: 1;
}

.top-item-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

/* User Profile */
.profile-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.profile-header {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.profile-stats {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Thread Detail */
.thread-container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.thread-content {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.thread-author {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-item {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 8px;
}

.post-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.reply-form {
    background: var(--bg-secondary);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 2rem;
}

.reply-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    resize: vertical;
    margin-bottom: 1rem;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

.spinner {
    border: 3px solid var(--bg-card);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notifications */
.notification {
    position: fixed;
    top: 80px;
    right: 2rem;
    background: var(--bg-secondary);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    z-index: 2000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.notification.success {
    border-left: 4px solid #27ae60;
}

.notification.error {
    border-left: 4px solid var(--accent);
}

/* Breadcrumb */
.breadcrumb {
    max-width: 1280px;
    width: 100%;
    margin: 1rem auto;
    padding: 0 2rem;
    display: flex;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-btn {
    padding: 0.6rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s;
}

.page-btn:hover, .page-btn.active {
    background: var(--accent);
    border-color: var(--accent);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.p-1 { padding: 1rem; }
.p-2 { padding: 2rem; }

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-card);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border);
}


/* Go Back Button */
.go-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.go-back-btn:hover {
    transform: translateX(-5px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.go-back-btn i {
    font-size: 1.2rem;
}

/* Statistics Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.stat-box {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #6366f1;
    transition: all 0.3s;
}

.stat-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.stat-box h3 {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.stat-box .value {
    font-size: 2.5rem;
    font-weight: bold;
    color: #6366f1;
}

.stat-box .label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}


/* Close Button (X) */
.close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.close-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.close-btn:active {
    transform: scale(0.95);
}

/* Modal/Overlay Close */
.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: transparent;
    border: none;
    color: var(--accent);
    font-size: 28px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: var(--accent-secondary);
    transform: rotate(90deg);
}

/* Detail Page Container with Close */
.detail-container {
    position: relative;
    padding-top: 60px;
}

.detail-container .close-btn {
    position: fixed;
}


/* Unified Series Grid Styles */
.series-grid {
    max-width: 1280px !important;
    width: 100% !important;
    margin: 2rem auto !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
    gap: 1.5rem !important;
    padding: 0 2rem !important;
}

.series-card {
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.series-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.series-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    object-fit: cover;
    object-position: center;
    flex-shrink: 0;
    image-rendering: crisp-edges;
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
}

.series-info {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.series-title {
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    line-height: 1.3;
}

.series-type {
    font-size: 0.85rem;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.series-status {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    background: var(--bg-secondary);
    margin-top: auto;
}

.filter-bar {
    max-width: 1280px;
    width: 100%;
    margin: 2rem auto;
    padding: 1rem 2rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-bar select {
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
}

.no-series {
    text-align: center;
    color: var(--text-secondary);
    padding: 2rem;
    max-width: 1400px;
    margin: 2rem auto;
}



/* Simple Profile Link */
.profile-link {
    display: inline-block;
    border-radius: 50%;
    padding: 2px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6); /* Changed to match theme colors */
    transition: all 0.3s ease;
}

.profile-link:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4);
}

/* Header profile avatar - must be 48px */
.auth-buttons .profile-avatar,
.profile-link .profile-avatar {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #0f172a; /* Use dark slate instead of secondary */
    transition: all 0.3s ease;
}

.profile-avatar-fallback {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e293b, #0f172a);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    border: 2px solid #0f172a;
}

/* TikTok-style Follow Button */
.tiktok-follow-btn {
    position: absolute;
    bottom: 80px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--accent);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tiktok-follow-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.5);
}

.tiktok-follow-btn.following {
    background: #10b981;
}

.tiktok-follow-btn .follow-icon {
    color: white;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
}

.channel-card {
    position: relative;
}


/* Promoted Series Section */
.promoted-section {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 140, 0, 0.1) 100%);
    border-radius: 12px;
    padding: 30px 20px;
    margin: 40px auto;
    max-width: 1280px;
}

.promoted-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.promoted-badge {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

/* @keyframes pulse-glow removed to fix lag */

.promoted-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    margin: 2rem auto;
    max-width: 1280px;
    padding: 0 2rem;
}

.promoted-grid .card {
    width: 100%;
    flex-shrink: 0;
}

.promoted-card {
    position: relative;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.promoted-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.4);
}

.promoted-card .card-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 2/3;
    object-fit: cover;
    object-position: center;
}

.promoted-card .card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.promoted-card .card-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.3;
}

.promoted-card .card-description {
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    line-height: 1.4;
    margin: 0.5rem 0 0 0;
}

.promoted-ribbon {
    position: absolute;
    top: 8px;
    right: -3px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 3px 10px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.5px;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.promoted-ribbon::before {
    content: '';
    position: absolute;
    bottom: -3px;
    right: 0;
    width: 0;
    height: 0;
    border-left: 3px solid transparent;
    border-right: 3px solid #CC8400;
    border-top: 3px solid #CC8400;
}

.promote-your-series-cta {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(255, 215, 0, 0.3);
}

.btn-promote {
    display: inline-block;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 18px;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.4);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-promote:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, #FFA500 0%, #FFD700 100%);
}

.promote-info {
    margin-top: 15px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .promoted-grid {
        gap: 0.75rem;
        padding: 0 0.75rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .promoted-grid .card {
        width: 100%;
        min-width: 0;
    }
    
    .btn-promote {
        padding: 12px 30px;
        font-size: 16px;
    }
}
