/* ==========================================================================
   CINEARCADE — Inspired directly by CineJoy Streaming UI (cinejoy.to / cinejoy.pk)
   Ultra-clean, dark cinematic streaming design with zero AI clichés.
   ========================================================================== */

:root {
    --bg-base: #07080b;
    --bg-surface: #0e1017;
    --bg-card: #12151f;
    --bg-card-hover: #191e2c;
    --bg-nav-glass: rgba(18, 20, 26, 0.78);
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-default: rgba(255, 255, 255, 0.12);
    --border-hover: rgba(255, 255, 255, 0.25);
    
    --accent-blue: #3b82f6;
    --accent-blue-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.35);
    --accent-gold: #fbbf24;
    --accent-emerald: #10b981;
    
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    
    --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    --shadow-card-hover: 0 18px 40px -10px rgba(0, 0, 0, 0.8), 0 0 28px -4px rgba(59, 130, 246, 0.35);
}

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

html {
    scroll-behavior: smooth;
    color-scheme: dark;
}

body.arcade-body.cine-theme {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-primary);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Minimalist Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-base);
}
::-webkit-scrollbar-thumb {
    background: #1b1e28;
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: #2b3040;
}

/* ==========================================================================
   CINEJOY FLOATING TOP NAVIGATION BAR
   ========================================================================== */

.cine-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 1.25rem 2.5rem;
    pointer-events: none;
    transition: background-color 0.3s ease, padding 0.3s ease;
}

body.in-game-stage .cine-header {
    display: none !important;
}

.cine-header.scrolled {
    background: rgba(7, 8, 11, 0.88);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.85rem 2.5rem;
}

.cine-nav-container {
    max-width: 1720px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    pointer-events: auto;
}

/* Logo */
.cine-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    flex-shrink: 0;
}

.cine-logo-glyph {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cine-logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.cine-logo-text span {
    color: var(--accent-blue);
}

/* CineJoy Floating Frosted Glass Pill Menu */
.cine-nav-pill-bar {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--bg-nav-glass);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 5px 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.cine-pill-item {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    padding: 0.45rem 1.05rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.cine-pill-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
}

.cine-pill-item.active {
    background: #000000;
    color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
}

.cine-pill-item .cine-badge {
    background: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    border-radius: var(--radius-full);
}

.cine-pill-divider {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 0.25rem;
}

.cine-icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cine-icon-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.08);
}

/* ==========================================================================
   BROWSE VIEW CONTAINER (Vertical Flow Guard)
   ========================================================================== */

.browse-view {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* ==========================================================================
   CINEJOY FULL-BLEED CINEMATIC HERO MARQUEE (~80vh)
   ========================================================================== */

.cine-hero-showcase {
    position: relative;
    width: 100%;
    height: 84vh;
    min-height: 580px;
    max-height: 860px;
    display: flex;
    align-items: flex-end;
    padding-bottom: 5.5rem;
    overflow: hidden;
}

.cine-hero-backdrop {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    transition: background-image 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s ease;
}

.cine-hero-showcase:hover .cine-hero-backdrop {
    transform: scale(1.015);
}

/* Multi-directional Cinematic Vignette Gradients */
.cine-hero-vignette-left {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, #07080b 0%, rgba(7, 8, 11, 0.94) 34%, rgba(7, 8, 11, 0.6) 60%, transparent 100%);
    pointer-events: none;
}

.cine-hero-vignette-bottom {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #07080b 0%, rgba(7, 8, 11, 0.92) 14%, rgba(7, 8, 11, 0.4) 35%, transparent 60%);
    pointer-events: none;
}

.cine-hero-vignette-top {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(7, 8, 11, 0.7) 0%, transparent 22%);
    pointer-events: none;
}

.cine-hero-content-wrap {
    position: relative;
    z-index: 5;
    max-width: 1720px;
    width: 100%;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.cine-hero-info {
    max-width: 780px;
}

.cine-hero-title {
    font-family: 'Outfit', sans-serif;
    font-size: 4.2rem;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: -0.035em;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.85);
}

.cine-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.meta-score {
    color: var(--accent-gold);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 800;
}

.meta-dot {
    color: rgba(255, 255, 255, 0.25);
}

.meta-genre {
    color: #93c5fd;
    font-weight: 800;
}

.meta-pill {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.16rem 0.55rem;
    border-radius: var(--radius-sm);
    font-size: 0.72rem;
    font-weight: 800;
    color: #ffffff;
}

.meta-zeroad {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

.cine-hero-synopsis {
    font-size: 0.95rem;
    line-height: 1.62;
    color: #94a3b8;
    margin-bottom: 1.6rem;
    max-width: 660px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* CineJoy Style Hero Actions */
.cine-hero-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.cine-btn-play {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    background: #ffffff;
    color: #000000;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.75rem 2.1rem;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.35);
}

.cine-btn-play .play-icon {
    font-size: 1.1rem;
}

.cine-btn-play:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.55);
}

.cine-btn-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(25, 29, 40, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s ease;
}

.cine-btn-circle:hover {
    transform: scale(1.1);
    background: rgba(45, 52, 70, 0.9);
    border-color: rgba(255, 255, 255, 0.3);
}

/* CineJoy Minimalist Pagination Dash / Dots */
.cine-hero-pagination {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding-bottom: 0.6rem;
}

.cine-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.cine-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.cine-dot.active {
    width: 26px;
    border-radius: var(--radius-full);
    background: #ffffff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
}

/* ==========================================================================
   STREAMING CONTENT SHELVES (CineJoy Horizontal Sliding Rows)
   ========================================================================== */

.cine-shelves-container {
    max-width: 1720px;
    width: 100%;
    margin: -3rem auto 4rem;
    padding: 0 2.5rem;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    position: relative;
    z-index: 10;
}

.cine-shelf {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.cine-shelf-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
}

.cine-shelf-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.cine-shelf-badge {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-blue-hover);
    background: rgba(59, 130, 246, 0.15);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}


.cine-shelf-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.cine-shelf-link {
    background: none;
    border: none;
    color: var(--accent-blue-hover);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.18s ease;
}

.cine-shelf-link:hover {
    color: #ffffff;
    text-decoration: underline;
}

.cine-carousel-wrapper {
    position: relative;
    width: 100%;
}

.cine-carousel-arrow {
    position: absolute;
    top: calc(50% - 10px);
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(14, 16, 23, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-size: 1.6rem;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 25;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    opacity: 0.65;
}

.cine-carousel-wrapper:hover .cine-carousel-arrow {
    opacity: 1;
}

.cine-carousel-arrow.left {
    left: -14px;
}

.cine-carousel-arrow.right {
    right: -14px;
}

.cine-carousel-arrow:hover {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    transform: translateY(-50%) scale(1.12);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.4);
    opacity: 1;
}

.cine-carousel-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

@media (max-width: 768px) {
    .cine-carousel-arrow {
        display: none;
    }
}

.cine-shelf-row {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 1.5rem 1.2rem;
    scroll-behavior: smooth;
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* IE / Edge */
    will-change: scroll-position;
    contain: layout style;
}

.cine-shelf-row::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* ==========================================================================
   CINEMATIC 16:9 LANDSCAPE GAME CARDS
   ========================================================================== */

.cine-card {
    position: relative;
    width: 250px;
    flex-shrink: 0;
    aspect-ratio: 16 / 9.6;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.32s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.25s ease;
    user-select: none;
}

.cine-card:hover {
    transform: translateY(-6px) scale(1.03);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
    z-index: 5;
}

.cine-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.3s ease;
}

.cine-card:hover .cine-card-img {
    transform: scale(1.08);
    filter: brightness(1.06);
}

/* Bottom Dark Gradient Overlay with Info */
.cine-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 8, 11, 0.95) 0%, rgba(7, 8, 11, 0.5) 45%, transparent 80%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 0.85rem 1rem;
    transition: opacity 0.2s ease;
}

.cine-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.2rem;
}

.cine-card-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.cine-card-genre {
    color: #93c5fd;
    font-weight: 700;
}

/* Play Badge on Card Hover */
.cine-card-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.95);
    color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}

.cine-card:hover .cine-card-play-icon {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* Card Favorite Star Button */
.cine-card-fav {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(7, 8, 11, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    z-index: 10;
}

.cine-card:hover .cine-card-fav,
.cine-card-fav.favorited {
    opacity: 1;
}

.cine-card-fav.favorited {
    color: var(--accent-gold);
    border-color: var(--accent-gold);
}

/* Playtime Progress Bar (CineJoy Continue Watching Style!) */
.cine-progress-track {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.18);
    overflow: hidden;
}

.cine-progress-fill {
    height: 100%;
    background: var(--accent-blue);
    border-radius: 0 2px 2px 0;
}

/* ==========================================================================
   GENRE QUICK BAR (CineJoy Capsule Filter Pills)
   ========================================================================== */

.cine-genres-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cine-genre-pills {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.cine-genre-pills::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

.cine-genre-pill {
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 0.48rem 1.15rem;
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
}

.cine-genre-pill:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.cine-genre-pill.active {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 800;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   MASTER GAMES CATALOG (16:9 Cinematic Landscape Grid)
   ========================================================================== */

.cine-catalog-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.cine-catalog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cine-catalog-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
}

.cine-catalog-count {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
}

.cine-games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.35rem;
}

.cine-games-grid .cine-card {
    width: 100%;
}

.scroll-sentinel {
    width: 100%;
    height: 50px;
    pointer-events: none;
}

/* ==========================================================================
   CINEJOY SEARCH MODAL OVERLAY (Ctrl+K or 🔍)
   ========================================================================== */

.cine-search-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 7vh 1.5rem 2rem;
    animation: fadeIn 0.2s ease;
}

.cine-search-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 11, 0.85);
    backdrop-filter: blur(28px) saturate(180%);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
}

.cine-search-dialog {
    position: relative;
    z-index: 5;
    max-width: 820px;
    width: 100%;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
}

.cine-search-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.1rem 1.4rem;
    border-bottom: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
}

.search-box-icon {
    stroke: var(--text-muted);
    flex-shrink: 0;
}

.cine-search-field {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 600;
}

.search-modal-clear {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem;
}
.search-modal-clear:hover { color: #ffffff; }

.search-modal-shortcut {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.06);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
}

.cine-search-results {
    padding: 1.25rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    max-height: 65vh;
}

.search-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   SERIES SAGA EPISODES POPUP MODAL (CineJoy / Netflix Chapters in Order)
   ========================================================================== */

.cine-series-modal {
    position: fixed;
    inset: 0;
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.cine-series-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 9, 0.88);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
}

.cine-series-dialog {
    position: relative;
    z-index: 10;
    max-width: 1080px;
    width: 100%;
    max-height: 88vh;
    background: #0e111a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-xl);
    box-shadow: 0 28px 70px rgba(0, 0, 0, 0.95), 0 0 50px -10px rgba(59, 130, 246, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.series-modal-header {
    padding: 1.5rem 2rem 1.25rem;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.series-modal-info {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.series-modal-pill {
    align-self: flex-start;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent-blue-hover);
    background: rgba(59, 130, 246, 0.16);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
}

.series-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.1;
}

.series-modal-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.series-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
    flex-shrink: 0;
}

.series-modal-close:hover {
    color: #ffffff;
    background: #ef4444;
    border-color: #ef4444;
    transform: scale(1.08);
}

.series-modal-back-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.2s ease;
    align-self: center;
    white-space: nowrap;
}

.series-modal-back-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: var(--border-hover);
    transform: translateX(-2px);
}

.series-modal-grid {
    padding: 1.75rem 2rem;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    grid-auto-rows: max-content;
    gap: 1.35rem;
    flex: 1;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: #232838 transparent;
}

.series-chapter-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-card);
    transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.28s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
}

.series-chapter-card:hover {
    transform: translateY(-5px) scale(1.03);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-card-hover);
}

.series-chapter-thumb {
    position: relative;
    width: 100%;
    height: 135px;
    min-height: 135px;
    aspect-ratio: 16 / 9.6;
    overflow: hidden;
    background: #0e121a;
    flex-shrink: 0;
}

.series-chapter-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.series-chapter-card:hover .series-chapter-thumb img {
    transform: scale(1.08);
}

.series-chapter-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(7, 8, 11, 0.88);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    z-index: 2;
}

.series-chapter-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    flex: 1;
}

.series-chapter-name {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.series-chapter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.74rem;
    color: var(--text-muted);
}

.series-chapter-btn {
    margin-top: 0.4rem;
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.45rem 0;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.2s ease;
}

.series-chapter-card:hover .series-chapter-btn {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.3);
}

/* ==========================================================================
   CINEJOY CINEMA GAME PLAYER (Theater Mode)
   ========================================================================== */

.cine-stage-view {
    min-height: 100vh;
    background: var(--bg-base);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.99); }
    to { opacity: 1; transform: scale(1); }
}

/* Minimalist Floating Cinema Topbar */
.cine-stage-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(7, 8, 11, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    height: 64px;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.stage-left-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.stage-back-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.45rem 1.05rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.stage-back-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateX(-2px);
}

.stage-game-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stage-genre-pill {
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(59, 130, 246, 0.18);
    color: #93c5fd;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.stage-series-pill {
    font-size: 0.7rem;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.1);
    color: #cbd5e1;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.stage-right-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.stage-action-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    padding: 0.42rem 0.95rem;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.18s ease;
}

.stage-action-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.stage-action-btn.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: var(--accent-blue);
    color: var(--accent-blue-hover);
}

.stage-action-btn.primary {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    font-weight: 800;
}

.stage-action-btn.primary:hover {
    background: #f1f5f9;
    transform: scale(1.03);
}

.stage-close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.18s ease;
}

.stage-close-btn:hover {
    color: #ffffff;
    background: #ef4444;
    border-color: #ef4444;
}

/* Dedicated Prominent Control Bar directly above Cinema Viewport */
.stage-dedicated-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
    padding: 0.65rem 1.15rem;
    background: rgba(14, 16, 23, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dedicated-left {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.active-pulse-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseGlow 2s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.35); opacity: 0.65; }
}

.active-status-text {
    font-size: 0.82rem;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.02em;
}

.dedicated-right {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dedicated-btn {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-subtle);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.86rem;
    font-weight: 800;
    padding: 0.48rem 1.1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.dedicated-btn:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}

.dedicated-btn.primary {
    background: #ffffff;
    color: #000000;
    border-color: #ffffff;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.28);
}

.dedicated-btn.primary:hover {
    background: #f1f5f9;
    box-shadow: 0 6px 24px rgba(255, 255, 255, 0.45);
    transform: translateY(-1px) scale(1.02);
}

.dedicated-btn.active {
    background: rgba(59, 130, 246, 0.25);
    border-color: var(--accent-blue);
    color: var(--accent-blue-hover);
}

/* Cinema Screen Canvas */
.cine-canvas-wrapper {
    width: 100%;
    max-width: 1540px;
    margin: 1.25rem auto 0;
    padding: 0 2rem;
    transition: max-width 0.25s cubic-bezier(0.16, 1, 0.3, 1), padding 0.25s ease;
}

/* Full Bleed Theater Mode */
.cine-canvas-wrapper.theater-mode {
    max-width: 100vw !important;
    width: 100vw !important;
    padding: 0 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.cine-canvas-screen {
    width: 100%;
    height: 78vh;
    min-height: 520px;
    max-height: 880px;
    background: #000000;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    box-shadow: 0 24px 60px -10px rgba(0, 0, 0, 0.9), 0 0 45px -8px rgba(59, 130, 246, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: height 0.25s ease;
}

.cine-canvas-wrapper.theater-mode .cine-canvas-screen {
    height: 88vh !important;
    max-height: none !important;
    border-radius: var(--radius-md);
    box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.95), 0 0 60px -5px rgba(59, 130, 246, 0.25);
}

/* ==========================================================================
   FULLSCREEN (100% Robust Cross-Browser + Escape UI)
   ========================================================================== */

#stage-viewport:fullscreen,
#stage-viewport:-webkit-full-screen,
#stage-viewport:-moz-full-screen,
#stage-viewport:-ms-fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border: none !important;
    border-radius: 0 !important;
    background: #000000 !important;
    z-index: 9999999 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
}

#stage-viewport:fullscreen iframe,
#stage-viewport:-webkit-full-screen iframe,
#stage-viewport:-moz-full-screen iframe,
#stage-viewport:-ms-fullscreen iframe {
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
    border-radius: 0 !important;
    display: block !important;
}

/* Pseudo-Fullscreen Fallback (when native fullscreen is constrained) */
#stage-viewport.is-pseudo-fullscreen {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    border: none !important;
    border-radius: 0 !important;
    z-index: 9999999 !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #000000 !important;
}

#stage-viewport.is-pseudo-fullscreen iframe {
    width: 100vw !important;
    height: 100vh !important;
    border: none !important;
}

/* Floating Exit Fullscreen Button */
.floating-exit-fullscreen {
    display: none;
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 10000000;
    background: rgba(10, 12, 18, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 800;
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.8);
    transition: all 0.2s ease;
    user-select: none;
}

#stage-viewport:fullscreen .floating-exit-fullscreen,
#stage-viewport:-webkit-full-screen .floating-exit-fullscreen,
#stage-viewport:-moz-full-screen .floating-exit-fullscreen,
#stage-viewport:-ms-fullscreen .floating-exit-fullscreen,
#stage-viewport.is-pseudo-fullscreen .floating-exit-fullscreen {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.floating-exit-fullscreen:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(239, 68, 68, 0.45);
}

/* Floating Instant Panic Button inside Game Screen (Reflex Trigger) */
.floating-viewport-panic {
    position: absolute;
    top: 14px;
    right: 18px;
    z-index: 10000000;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(220, 38, 38, 0.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    padding: 0.45rem 0.95rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.45);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
    pointer-events: auto;
}

.floating-viewport-panic:hover {
    background: #dc2626;
    transform: scale(1.06);
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.65);
}

.floating-viewport-panic .panic-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ffffff;
    animation: panicPulse 1.4s infinite ease-in-out;
}

@keyframes panicPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(0.75); }
}

/* Position in Fullscreen / Theater Modes */
#stage-viewport:fullscreen .floating-viewport-panic,
#stage-viewport:-webkit-full-screen .floating-viewport-panic,
#stage-viewport:-moz-full-screen .floating-viewport-panic,
#stage-viewport:-ms-fullscreen .floating-viewport-panic,
#stage-viewport.is-pseudo-fullscreen .floating-viewport-panic {
    top: 18px;
    left: 20px;
    right: auto;
    display: flex;
}

/* Invisible Top-Edge Focus & Panic Restorer Strip */
.viewport-focus-strip {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 12px;
    z-index: 9999999;
    cursor: pointer;
    background: transparent;
}

.stage-game-iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: #000000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stage-game-iframe.loaded {
    opacity: 1;
}

.cine-spinner {
    position: absolute;
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    pointer-events: none;
}

.cine-spinner.hidden {
    display: none;
}

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

.cine-stage-subbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 0.85rem;
    padding: 0 0.25rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cine-stage-shortcuts {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cine-stage-shortcuts span kbd {
    display: inline-block;
    padding: 0.12rem 0.45rem;
    font-size: 0.72rem;
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-weight: 700;
    color: #e2e8f0;
    background: #191c28;
    border: 1px solid var(--border-subtle);
    border-radius: 4px;
}

.cine-zeroad-indicator {
    color: #10b981;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(16, 185, 129, 0.1);
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    border: 1px solid rgba(16, 185, 129, 0.25);
}

/* Below-Player Content */
.cine-stage-details {
    max-width: 1540px;
    width: 100%;
    margin: 2rem auto 5rem;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 2.25rem;
}

.cine-stage-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.guide-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guide-card-icon {
    font-size: 1.25rem;
}

.guide-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #ffffff;
}

.guide-card-desc {
    font-size: 0.92rem;
    line-height: 1.65;
    color: var(--text-secondary);
}

/* ==========================================================================
   TOASTS, BACK-TO-TOP & FOOTER
   ========================================================================== */

.cine-toast-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    pointer-events: none;
}

.toast-item {
    background: #141722;
    border: 1px solid var(--border-default);
    color: #ffffff;
    padding: 0.85rem 1.35rem;
    border-radius: var(--radius-md);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    font-weight: 700;
    pointer-events: auto;
    transform: translateY(16px);
    opacity: 0;
    transition: transform 0.22s ease, opacity 0.22s ease;
}

.toast-item.show {
    transform: translateY(0);
    opacity: 1;
}

.cine-back-to-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: #ffffff;
    border-radius: 50%;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.cine-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.cine-back-to-top:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    transform: translateY(-2px);
}

.cine-footer {
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 0;
    margin-top: 3rem;
}

.cine-footer-content {
    max-width: 1720px;
    margin: 0 auto;
    padding: 0 2.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.cine-footer-brand strong {
    color: #ffffff;
}

.cine-footer-links {
    display: flex;
    gap: 1.5rem;
}

.cine-footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
}
.cine-footer-links a:hover { color: #ffffff; }

/* Responsive Adjustments */
@media (max-width: 960px) {
    .cine-header {
        padding: 0.85rem 1.25rem;
    }
    .cine-hero-showcase {
        height: 70vh;
        min-height: 480px;
    }
    .cine-hero-title {
        font-size: 2.8rem;
    }
    .cine-shelves-container {
        padding: 0 1.25rem;
    }
    .cine-stage-topbar {
        padding: 0 1rem;
    }
    .cine-canvas-wrapper {
        padding: 0 0.5rem;
    }
    .cine-canvas-screen {
        height: 60vh;
        min-height: 360px;
    }
}

/* ==========================================================================
   SCHOOL STEALTH SUITE & LIGHTSPEED EVASION STYLES
   ========================================================================== */

/* Navbar Stealth & Panic Buttons */
.stealth-nav-btn {
    background: rgba(59, 130, 246, 0.12) !important;
    border-color: rgba(59, 130, 246, 0.3) !important;
}
.stealth-nav-btn:hover {
    background: rgba(59, 130, 246, 0.25) !important;
    transform: scale(1.06);
}

.panic-nav-btn {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
}
.panic-nav-btn:hover {
    background: rgba(239, 68, 68, 0.28) !important;
    transform: scale(1.06);
}

/* Stage Panic Buttons */
.stage-action-btn.panic-action {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}
.stage-action-btn.panic-action:hover {
    background: rgba(239, 68, 68, 0.28);
    border-color: #ef4444;
    color: #ffffff;
}

.dedicated-btn.panic-btn {
    background: rgba(239, 68, 68, 0.18);
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecaca;
}
.dedicated-btn.panic-btn:hover {
    background: #ef4444;
    border-color: #ef4444;
    color: #ffffff;
}

/* Stage Slow-Loading / Timeout Fallback Bar */
.stage-fallback-bar {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(18, 20, 28, 0.95);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(251, 191, 36, 0.4);
    border-radius: var(--radius-md);
    padding: 0.85rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    z-index: 50;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.fallback-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: #fde68a;
    font-weight: 500;
}

.fallback-actions {
    display: flex;
    gap: 0.6rem;
}

.fallback-btn {
    background: #fbbf24;
    color: #1a1a1a;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0.4rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}
.fallback-btn:hover {
    background: #f59e0b;
    transform: translateY(-1px);
}

.fallback-btn.secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.fallback-btn.secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ==========================================================================
   STEALTH & TAB CLOAKING SETTINGS MODAL
   ========================================================================== */

.cine-stealth-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.cine-stealth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 9, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.cine-stealth-dialog {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 720px;
    max-height: 90vh;
    background: #0f121a;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px rgba(59, 130, 246, 0.15);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.stealth-modal-header {
    padding: 1.5rem 1.75rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.02);
}

.stealth-modal-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--accent-blue-hover);
    background: rgba(59, 130, 246, 0.12);
    border: 1px solid rgba(59, 130, 246, 0.25);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.5rem;
}

.stealth-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.stealth-modal-sub {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.stealth-modal-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 1rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}
.stealth-modal-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.stealth-modal-body {
    padding: 1.5rem 1.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Feature highlight card: about:blank */
.stealth-feature-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(30, 58, 138, 0.2));
    border: 1px solid rgba(59, 130, 246, 0.35);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
}

.feature-tag {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    background: #3b82f6;
    color: #ffffff;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    margin-right: 0.5rem;
}

.feature-card-title-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}

.feature-card-info h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #ffffff;
}

.feature-card-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.feature-card-info code {
    background: rgba(0, 0, 0, 0.4);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    color: #93c5fd;
}

.stealth-action-launch-btn {
    flex-shrink: 0;
    background: #3b82f6;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
    transition: all 0.2s ease;
}
.stealth-action-launch-btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.6);
}

/* Presets grid */
.stealth-section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.stealth-section-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}

.stealth-presets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.6rem;
}

.stealth-preset-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}
.stealth-preset-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-hover);
}
.stealth-preset-card.active {
    background: rgba(59, 130, 246, 0.15);
    border-color: var(--accent-blue);
    box-shadow: inset 0 0 0 1px var(--accent-blue);
}

.preset-icon {
    font-size: 1.4rem;
    flex-shrink: 0;
}

.preset-meta {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.preset-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
}

.preset-title-preview {
    font-size: 0.72rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Config Boxes */
.stealth-section-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stealth-config-box {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.stealth-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.2rem;
}

.stealth-subtext {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    line-height: 1.35;
}

.stealth-select {
    width: 100%;
    background: #090a0f;
    border: 1px solid var(--border-default);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.8rem;
    color: #ffffff;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
}
.stealth-select:focus {
    border-color: var(--accent-blue);
}

/* Toggles */
.stealth-toggles-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stealth-toggle-row {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    cursor: pointer;
}
.stealth-toggle-row:hover {
    background: rgba(255, 255, 255, 0.04);
}

.toggle-info {
    display: flex;
    flex-direction: column;
}

.toggle-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
}

.toggle-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.stealth-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
    cursor: pointer;
}

/* Modal Footer */
.stealth-modal-footer {
    padding: 1.25rem 1.75rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
}

.stealth-btn-test-panic {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 0.65rem 1.15rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.stealth-btn-test-panic:hover {
    background: rgba(239, 68, 68, 0.3);
    color: #ffffff;
}

.stealth-btn-done {
    background: #3b82f6;
    border: none;
    color: #ffffff;
    padding: 0.65rem 1.35rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.stealth-btn-done:hover {
    background: #2563eb;
}

/* ==========================================================================
   ULTRA-AUTHENTIC PANIC DISGUISE OVERLAY (FULL SCREEN BOSS SHIELD)
   ========================================================================== */

.panic-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483647; /* Highest integer z-index */
    background: #ffffff;
    color: #202124;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.disguise-view {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* --------------------------------------------------------------------------
   DISGUISE 1: GOOGLE DOCS
   -------------------------------------------------------------------------- */
.disguise-docs {
    background-color: #f8f9fa;
    color: #202124;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Google Docs Top Bar */
.gdocs-topbar {
    background: #ffffff;
    height: 64px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dadce0;
    flex-shrink: 0;
}

.gdocs-top-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gdocs-logo-icon {
    cursor: pointer;
    display: flex;
    align-items: center;
}

.gdocs-title-container {
    display: flex;
    flex-direction: column;
}

.gdocs-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gdocs-doc-title {
    font-size: 18px;
    color: #202124;
    font-weight: 500;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 2px 6px;
    background: transparent;
    outline: none;
    max-width: 440px;
}
.gdocs-doc-title:hover {
    border-color: #dadce0;
}
.gdocs-doc-title:focus {
    border-color: #1a73e8;
    background: #ffffff;
}

.gdocs-star-btn, .gdocs-move-btn {
    cursor: pointer;
    font-size: 15px;
    color: #5f6368;
    padding: 2px 4px;
}

.gdocs-cloud-status {
    font-size: 12px;
    color: #5f6368;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
}

.gdocs-menu-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: #202124;
    padding-left: 6px;
    cursor: pointer;
    user-select: none;
}
.gdocs-menu-row span:hover {
    background: #f1f3f4;
    border-radius: 4px;
}

.gdocs-top-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.gdocs-history-btn, .gdocs-comments-btn, .gdocs-meet-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: #5f6368;
    transition: background 0.2s ease;
}
.gdocs-history-btn:hover, .gdocs-comments-btn:hover, .gdocs-meet-btn:hover {
    background: #f1f3f4;
}

.gdocs-share-btn {
    background: #c2e7ff;
    color: #001d35;
    border: none;
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.gdocs-share-btn:hover {
    background: #b3dcf7;
}

.gdocs-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1a73e8;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Google Docs Ribbon Toolbar */
.gdocs-toolbar {
    background: #edf2fc;
    border-radius: 24px;
    height: 38px;
    margin: 8px 16px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    user-select: none;
    overflow-x: auto;
}

.gdt-btn {
    height: 28px;
    min-width: 28px;
    padding: 0 4px;
    border: none;
    background: transparent;
    border-radius: 4px;
    color: #444746;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gdt-btn:hover {
    background: rgba(68, 71, 70, 0.1);
}

.gdt-divider {
    width: 1px;
    height: 18px;
    background: #c4c7c5;
    margin: 0 4px;
}

.gdt-select {
    font-size: 13px;
    color: #444746;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}
.gdt-select:hover {
    background: rgba(68, 71, 70, 0.1);
}
.gdt-select.font-select {
    min-width: 70px;
}

.gdt-counter {
    display: flex;
    align-items: center;
    gap: 2px;
}
.gdt-btn-sm {
    width: 20px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: bold;
}
.gdt-size {
    font-size: 12px;
    padding: 0 4px;
}

/* Ruler */
.gdocs-ruler-bar {
    height: 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    flex-shrink: 0;
}

/* Canvas Sheet Area */
.gdocs-canvas-container {
    flex: 1;
    overflow-y: auto;
    background: #f8f9fa;
    padding: 24px 0 80px;
    display: flex;
    justify-content: center;
}

.gdocs-paper-sheet {
    width: 816px; /* Standard 8.5in at 96 DPI */
    min-height: 1056px; /* Standard 11in at 96 DPI */
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(60, 64, 67, 0.15), 0 2px 8px 2px rgba(60, 64, 67, 0.08);
    padding: 72px 96px;
    color: #000000;
    font-family: 'Times New Roman', Times, serif, 'Arial';
    font-size: 14.5px;
    line-height: 2.0;
    outline: none;
    cursor: text;
    user-select: text;
    -webkit-user-select: text;
}

.gdocs-doc-author, .gdocs-doc-meta {
    margin: 0;
    line-height: 1.5;
}

.gdocs-paper-title {
    font-size: 18px;
    font-weight: bold;
    text-align: center;
    margin: 16px 0;
    line-height: 1.4;
}

.gdocs-paragraph {
    text-indent: 48px;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   DISGUISE 2: GOOGLE CLASSROOM
   -------------------------------------------------------------------------- */
.disguise-classroom {
    background: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.gclass-header {
    background: #ffffff;
    height: 64px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #dadce0;
}

.gclass-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.gclass-menu-icon { font-size: 20px; color: #5f6368; cursor: pointer; }
.gclass-brand { font-size: 18px; font-weight: 500; color: #3c4043; }

.gclass-nav {
    display: flex;
    gap: 28px;
    font-size: 14px;
    font-weight: 500;
    color: #5f6368;
    cursor: pointer;
}
.gclass-nav-item.active {
    color: #137333;
    border-bottom: 3px solid #137333;
    padding: 20px 0 17px;
}

.gclass-right {
    display: flex;
    align-items: center;
    gap: 16px;
}
.gclass-apps-icon { font-size: 20px; color: #5f6368; cursor: pointer; }
.gclass-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #137333;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.gclass-container {
    max-width: 1000px;
    margin: 24px auto;
    padding: 0 16px;
    flex: 1;
    overflow-y: auto;
}

.gclass-hero-banner {
    background: #137333;
    background-image: linear-gradient(to right, #137333, #1e8e3e);
    border-radius: 8px;
    padding: 36px 32px;
    color: #ffffff;
    margin-bottom: 24px;
}
.gclass-title { font-size: 28px; font-weight: 500; }
.gclass-section { font-size: 14px; opacity: 0.9; margin-top: 4px; }

.gclass-content-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
}

.gclass-card {
    background: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 16px;
}

.upcoming-card h3 { font-size: 14px; color: #3c4043; margin-bottom: 12px; }
.upcoming-date { font-size: 12px; color: #137333; font-weight: 600; margin-bottom: 4px; }
.upcoming-task { font-size: 13px; color: #3c4043; line-height: 1.3; }
.gclass-link { font-size: 13px; color: #137333; text-decoration: none; font-weight: 600; display: inline-block; margin-top: 12px; }

.announce-box {
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 2px rgba(60,64,67,0.1);
}
.announce-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #137333;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.announce-input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    color: #5f6368;
    background: transparent;
}

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.post-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #5f6368;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}
.post-meta { display: flex; flex-direction: column; }
.post-author { font-size: 14px; font-weight: 600; color: #3c4043; }
.post-time { font-size: 12px; color: #5f6368; }
.post-body { font-size: 14px; color: #3c4043; line-height: 1.5; }

/* --------------------------------------------------------------------------
   DISGUISE 3: CANVAS LMS
   -------------------------------------------------------------------------- */
.disguise-canvas {
    background: #f5f5f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.canvas-layout {
    display: flex;
    height: 100%;
}
.canvas-sidebar {
    width: 84px;
    background: #2d3b45;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 18px;
    flex-shrink: 0;
}
.canvas-logo { font-size: 24px; margin-bottom: 8px; }
.canvas-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    gap: 4px;
    opacity: 0.8;
    cursor: pointer;
}
.canvas-nav-item.active { opacity: 1; color: #ffffff; font-weight: bold; }
.c-icon { font-size: 18px; }

.canvas-main {
    flex: 1;
    padding: 24px 36px;
    overflow-y: auto;
}
.canvas-topbar h2 { font-size: 24px; color: #2d3b45; margin-bottom: 24px; }
.canvas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.canvas-course-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}
.course-banner { height: 120px; }
.math-banner { background: #0077c8; }
.history-banner { background: #b2292e; }
.science-banner { background: #00875a; }
.english-banner { background: #6554c0; }
.course-body { padding: 16px; }
.course-body h4 { font-size: 15px; color: #2d3b45; margin-bottom: 4px; }
.course-body p { font-size: 12px; color: #6b778c; }

/* --------------------------------------------------------------------------
   DISGUISE 4: DESMOS GRAPHING CALCULATOR
   -------------------------------------------------------------------------- */
.disguise-desmos {
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
.desmos-topbar {
    background: #2d70b3;
    color: #ffffff;
    height: 48px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.desmos-logo-text { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; margin-right: 16px; }
.desmos-doc-name { font-size: 14px; opacity: 0.9; }
.desmos-share-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    border-radius: 4px;
    padding: 6px 14px;
    font-size: 13px;
    cursor: pointer;
}
.desmos-body {
    display: flex;
    flex: 1;
    height: calc(100% - 48px);
}
.desmos-keypad-panel {
    width: 320px;
    border-right: 1px solid #e0e0e0;
    background: #fafafa;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.desmos-expr {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.desmos-expr.active { border-color: #2d70b3; }
.expr-num { font-size: 12px; color: #888; width: 14px; }
.expr-color { width: 10px; height: 10px; border-radius: 50%; }
.green-dot { background: #388c46; }
.blue-dot { background: #2d70b3; }
.red-dot { background: #c74440; }
.expr-math { font-family: "Times New Roman", serif; font-style: italic; font-size: 15px; color: #333; }

.desmos-graph-canvas {
    flex: 1;
    position: relative;
    background: #fdfdfd;
    background-image: radial-gradient(#e0e0e0 1px, transparent 1px);
    background-size: 20px 20px;
}
.desmos-grid-line.x-axis {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #888888;
}
.desmos-grid-line.y-axis {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #888888;
}
.desmos-plot-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* --------------------------------------------------------------------------
   PANIC SECRET DOCK (ULTRA-SUBTLE BOTTOM RESTORE STRIP)
   -------------------------------------------------------------------------- */
.panic-secret-dock {
    position: fixed;
    bottom: 12px;
    left: 16px;
    z-index: 2147483648;
    background: rgba(30, 32, 40, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.35;
    transition: opacity 0.2s ease;
}
.panic-secret-dock:hover {
    opacity: 1;
    background: rgba(15, 17, 24, 0.95);
}

.panic-dock-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
}
.panic-dock-btn kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 11px;
}

.panic-dock-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.2);
}

.panic-dock-selector {
    font-size: 12px;
    color: #cbd5e1;
    display: flex;
    align-items: center;
    gap: 6px;
}
.panic-dock-selector select {
    background: #090a0f;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    cursor: pointer;
}

/* ==========================================================================
   AUTO ABOUT:BLANK STEALTH GATEWAY (Lightspeed & Filter Evasion)
   ========================================================================== */

.stealth-blank-gateway {
    position: fixed;
    inset: 0;
    z-index: 2147483645;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    overflow-y: auto;
    background: rgba(4, 5, 8, 0.92);
    backdrop-filter: blur(28px) saturate(160%);
    -webkit-backdrop-filter: blur(28px) saturate(160%);
    animation: fadeIn 0.25s ease;
}

.blank-gateway-card {
    position: relative;
    max-width: 580px;
    width: 100%;
    background: #0f121d;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 40px rgba(59, 130, 246, 0.15);
    overflow: hidden;
    cursor: default;
    animation: modalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gateway-header {
    padding: 2rem 2rem 1.5rem;
    background: linear-gradient(135deg, rgba(24, 40, 72, 0.7) 0%, rgba(15, 18, 29, 0.95) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.gateway-icon-badge {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(46, 164, 79, 0.15);
    border: 1px solid rgba(46, 164, 79, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
}

.gateway-title-wrap {
    flex: 1;
}

.gateway-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.25);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    margin-bottom: 0.5rem;
}

.gateway-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 0.4rem;
}

.gateway-sub {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.45;
    margin: 0;
}

.gateway-body {
    padding: 1.75rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.gateway-benefits {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.benefit-icon {
    font-size: 1.35rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.benefit-text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.benefit-text strong {
    font-size: 0.9rem;
    font-weight: 700;
    color: #ffffff;
}

.benefit-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.benefit-text code {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    font-size: 0.78rem;
}

.gateway-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
}

.gateway-btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
}

.gateway-btn-primary:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(37, 99, 235, 0.55);
}

.gateway-btn-secondary {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem;
    text-align: center;
    transition: color 0.18s ease;
}

.gateway-btn-secondary:hover {
    color: #ffffff;
    text-decoration: underline;
}


