@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Outfit:wght@300;400;500;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-dark-900: #050508;
    --bg-dark-800: #0a0a0f;
    --bg-dark-700: #101017;
    --bg-dark-600: #181824;
    
    --accent-purple: #8b5cf6;
    --accent-purple-glow: rgba(139, 92, 246, 0.4);
    --accent-pink: #d946ef;
    --accent-cyan: #06b6d4;
    --accent-gold: #f59e0b;
    --accent-gold-glow: rgba(245, 158, 11, 0.3);
    
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --text-dark: #6b7280;
    
    /* Layout & Utilities */
    --header-height: 80px;
    --border-radius-sm: 6px;
    --border-radius-md: 12px;
    --border-radius-lg: 20px;
    --transition-smooth: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --glass-bg: rgba(10, 10, 15, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
}

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

body {
    background-color: var(--bg-dark-900);
    color: var(--text-main);
    font-family: 'Outfit', 'Noto Sans SC', sans-serif;
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark-900);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-dark-600);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-purple);
}

/* Typography Helpers */
a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

/* Header & Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    background: linear-gradient(to bottom, rgba(5, 5, 8, 0.9) 0%, rgba(5, 5, 8, 0) 100%);
    backdrop-filter: blur(0px);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    border-bottom: 1px solid transparent;
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    height: 70px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-area img {
    height: 40px;
    object-fit: contain;
    transition: var(--transition-smooth);
}

.logo-area span {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 1px;
    background: linear-gradient(45deg, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-muted);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-pink));
    transition: var(--transition-smooth);
    border-radius: 2px;
}

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

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 8px 16px 8px 36px;
    border-radius: 20px;
    color: var(--text-main);
    font-size: 0.85rem;
    width: 180px;
    outline: none;
    transition: var(--transition-smooth);
}

.search-box input:focus {
    width: 260px;
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

.search-box svg {
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    fill: var(--text-muted);
    transition: var(--transition-smooth);
}

.search-box input:focus + svg {
    fill: var(--accent-purple);
}

.lang-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    outline: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.lang-select:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-purple);
}

.lang-select option {
    background-color: var(--bg-dark-800);
    color: var(--text-main);
}

.btn-contact {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-contact:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* Hero banner: the game's own 1920 x 500 artwork, shown whole (it already carries the logo and the
   characters, so nothing is laid over it except a small play button). Clicking the banner starts the demo. */
.hero-billboard {
    position: relative;
    width: 100%;
    max-width: 1920px;
    margin: var(--header-height) auto 0;
    aspect-ratio: 1920 / 500;
    max-height: 520px;
    overflow: hidden;
    background-color: var(--bg-dark-900);
}

.hero-slides-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    cursor: pointer;
    transition: opacity 0.8s ease-in-out, visibility 0s linear 0.8s;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    transition: opacity 0.8s ease-in-out;
}

.hero-banner-img,
.hero-media-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-media-bg {
    pointer-events: none;
}

/* Soft fade into the page at the bottom edge only, so the artwork stays as drawn. */
.hero-slide::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 18%;
    background: linear-gradient(to top, rgba(5, 5, 8, 0.7), rgba(5, 5, 8, 0));
    pointer-events: none;
    z-index: 1;
}

/* .btn-play's own padding comes later in this file, so the hero size needs the extra class. */
.btn-play.hero-play {
    position: absolute;
    right: 40px;
    bottom: 28px;
    z-index: 4;
    padding: 10px 24px;
    font-size: 0.95rem;
}

.hero-play svg {
    width: 20px;
    height: 20px;
}

.hero-tag {
    display: inline-block;
    background: rgba(139, 92, 246, 0.2);
    border: 1px solid var(--accent-purple);
    color: #a78bfa;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

/* Specs a game does not have yet are hidden with the hidden attribute. */
.modal-feature-item[hidden], .meta-group[hidden], .modal-feature-grid[hidden], .modal-feature-title[hidden] {
    display: none !important;
}

/* Primary call to action: same purple-to-pink gradient as the header contact button and the card play buttons. */
.btn-play {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-play:hover {
    filter: brightness(1.12);
    transform: translateY(-2px);
    box-shadow: 0 10px 32px rgba(217, 70, 239, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-play:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

/* Secondary action: quiet glass pill so it does not compete with the play button. */
.btn-info {
    background: rgba(139, 92, 246, 0.12);
    color: #fff;
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(196, 181, 253, 0.35);
    cursor: pointer;
    transition: var(--transition-smooth);
}

.btn-info:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: rgba(196, 181, 253, 0.6);
    transform: translateY(-2px);
}

.btn-play:focus-visible,
.btn-info:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

/* Hero Carousel Arrow Controls */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(5, 5, 8, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: var(--transition-smooth);
    backdrop-filter: blur(5px);
}

.hero-arrow svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.hero-left-arrow {
    left: 20px;
}

.hero-right-arrow {
    right: 20px;
}

.hero-billboard:hover .hero-arrow {
    opacity: 1;
}

.hero-arrow:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple);
}

/* Hero Carousel Dots */
.hero-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-dot {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.hero-dot.active {
    background: #fff;
    width: 60px;
    box-shadow: 0 0 8px #fff;
}

/* Sound Indicator button like Netflix */
.hero-sound-toggle {
    position: absolute;
    bottom: 28px;
    left: 40px;
    width: 44px;
    height: 44px;
    background: rgba(5, 5, 8, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(5px);
    transition: var(--transition-smooth);
}

.hero-sound-toggle[hidden] {
    display: none;
}

.hero-sound-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
}

/* Category Sections / Carousels */
.main-content {
    position: relative;
    z-index: 5;
    margin-top: 8px;
    padding-bottom: 80px;
    background: linear-gradient(to bottom, transparent 0%, var(--bg-dark-900) 100px);
}

.carousel-section {
    padding: 30px 0 30px 60px;
    position: relative;
}

.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #f3f4f6;
}

.section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 24px;
    background: linear-gradient(to bottom, var(--accent-purple), var(--accent-pink));
    border-radius: 2px;
}

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

.carousel-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 20px 60px 20px 0;
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome/Safari */
}

/* Game Card: square art (the games' own 1:1 tiles) with the name and actions underneath. */
.game-card {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-dark-800);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: var(--transition-smooth);
}

.card-media-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #110e1a;
}

/* Only the card art itself, never the icons inside the buttons. */
.card-media-wrapper > img, .card-media-wrapper > svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
    display: block;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 14px 14px;
    background: linear-gradient(180deg, rgba(139, 92, 246, 0.08), rgba(5, 5, 8, 0) 70%);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Hover: lift the card and zoom the art a little. */
.game-card:hover {
    transform: translateY(-6px);
    z-index: 10;
    box-shadow: 0 12px 28px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.35);
}

.game-card:hover .card-media-wrapper > img, .game-card:hover .card-media-wrapper > svg {
    transform: scale(1.05);
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.card-rtp {
    color: var(--accent-gold);
    font-weight: 700;
    white-space: nowrap;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-tag {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Small version of the hero's .btn-play / .btn-info pills. */
.card-btn-play {
    flex: 1;
    min-width: 0;
    height: 34px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    border: none;
    padding: 0 14px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    transition: var(--transition-smooth);
}

.card-btn-play svg,
.card-btn-info svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.card-btn-play:hover {
    filter: brightness(1.12);
    box-shadow: 0 6px 20px rgba(217, 70, 239, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.card-btn-info {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    background: rgba(139, 92, 246, 0.12);
    border: 1px solid rgba(196, 181, 253, 0.35);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.card-btn-info:hover {
    background: rgba(139, 92, 246, 0.28);
    border-color: rgba(196, 181, 253, 0.6);
}

.card-btn-play:focus-visible,
.card-btn-info:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Slider Controls */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(10, 10, 15, 0.8);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 15;
    opacity: 0;
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
}

.carousel-btn svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.carousel-btn.left-btn {
    left: 10px;
}

.carousel-btn.right-btn {
    right: 40px;
}

.carousel-container:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background: var(--accent-purple);
    border-color: var(--accent-purple);
    box-shadow: 0 0 15px var(--accent-purple);
}

/* Search Grid Overlay */
.search-grid-overlay {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 100%;
    height: calc(100vh - var(--header-height));
    background-color: var(--bg-dark-900);
    z-index: 90;
    display: none;
    overflow-y: auto;
    padding: 40px 60px;
}

.search-grid-overlay.active {
    display: block;
    animation: fadeIn 0.4s var(--transition-smooth);
}

.search-results-info {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.search-results-info span {
    color: var(--accent-purple);
    font-weight: 700;
}

.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 30px;
}

/* Details Modal (Netflix styled popup) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(5, 5, 8, 0.85);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-window {
    width: 100%;
    max-width: 850px;
    height: 90vh;
    background-color: var(--bg-dark-800);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    border: 1px solid var(--glass-border);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
}

.modal-overlay.active .modal-window {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
}

.modal-close-btn:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: rotate(90deg);
}

.modal-banner {
    position: relative;
    height: 45%;
    width: 100%;
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    overflow: hidden;
}

/* Games without a banner: their square card art, blurred across the banner and shown sharp on the right. */
.modal-banner--card::before,
.modal-banner--card::after {
    content: "";
    position: absolute;
    background-image: var(--card-art);
    background-size: cover;
    background-position: center;
}

.modal-banner--card::before {
    inset: -40px;
    filter: blur(28px) brightness(0.55) saturate(1.2);
}

.modal-banner--card::after {
    z-index: 2;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    height: 78%;
    aspect-ratio: 1 / 1;
    border-radius: var(--border-radius-md);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.modal-banner-overlay {
    z-index: 1;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--bg-dark-800) 0%, rgba(10, 10, 15, 0.4) 60%, rgba(10, 10, 15, 0) 100%);
}

.modal-banner-content {
    z-index: 3;
    position: absolute;
    bottom: 30px;
    left: 40px;
    right: 40px;
}

.modal-game-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
}

.modal-banner-actions {
    display: flex;
    gap: 15px;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 30px 40px;
    display: flex;
    gap: 40px;
}

.modal-left {
    flex: 2;
}

.modal-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-left: 1px solid var(--glass-border);
    padding-left: 30px;
}

.modal-game-desc {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-feature-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: #fff;
}

.modal-feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.modal-feature-item {
    background-color: var(--bg-dark-700);
    padding: 12px;
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.modal-feature-name {
    font-size: 0.8rem;
    color: var(--text-dark);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.modal-feature-val {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
}

.meta-group {
    font-size: 0.9rem;
}

.meta-group {
    margin-bottom: 10px;
}

.meta-label {
    color: var(--text-dark);
    display: block;
    margin-bottom: 4px;
}

.meta-val {
    font-weight: 600;
}

.meta-val.rtp {
    color: var(--accent-gold);
    font-size: 1.1rem;
}

/* Immersive Theater Mode (Fullscreen play wrapper) */
.theater-mode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #030305;
    z-index: 3000;
    display: none;
    opacity: 0;
    transition: var(--transition-smooth);
}

.theater-mode-overlay.active {
    display: flex;
    opacity: 1;
}

.theater-sidebar {
    width: 320px;
    background-color: var(--bg-dark-800);
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.theater-sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.theater-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.1rem;
    font-weight: 800;
}

.theater-close {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theater-close:hover {
    background: #ff4757;
    border-color: #ff4757;
}

.theater-info-panel {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.theater-game-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.theater-game-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 25px;
}

.theater-control-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.theater-btn {
    background-color: var(--bg-dark-700);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition-smooth);
}

.theater-btn:hover {
    background-color: var(--bg-dark-600);
    border-color: var(--accent-purple);
    color: #fff;
}

.theater-btn-primary {
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.theater-btn-primary:hover {
    filter: brightness(1.1);
}

.theater-other-games-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-dark);
    text-transform: uppercase;
    margin-bottom: 15px;
}

.theater-small-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.theater-small-card {
    display: flex;
    gap: 12px;
    background-color: var(--bg-dark-700);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition-smooth);
}

.theater-small-card:hover {
    border-color: rgba(139, 92, 246, 0.4);
    background-color: var(--bg-dark-600);
}

.theater-small-card img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.theater-small-card-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.theater-small-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.theater-small-card-rtp {
    font-size: 0.75rem;
    color: var(--accent-gold);
    font-weight: 600;
}

.theater-viewport-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.theater-toolbar {
    height: 60px;
    background-color: var(--bg-dark-800);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}

.theater-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.theater-pulse {
    width: 8px;
    height: 8px;
    background-color: #2ed573;
    border-radius: 50%;
    box-shadow: 0 0 8px #2ed573;
    animation: pulse 1.5s infinite;
}

.theater-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theater-action-icon {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theater-action-icon:hover {
    color: #fff;
    transform: scale(1.1);
}

.theater-viewport {
    flex: 1;
    background-color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.theater-viewport iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Footer style */
footer {
    border-top: 1px solid var(--glass-border);
    background-color: var(--bg-dark-800);
    padding: 60px 40px 30px 40px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-purple);
}

.footer-col p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

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

.footer-col ul a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul a:hover {
    color: var(--accent-purple);
    padding-left: 5px;
}

.footer-bottom {
    max-width: 1400px;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.copyright {
    color: var(--text-dark);
    font-size: 0.85rem;
}

.footer-badges {
    display: flex;
    gap: 15px;
    align-items: center;
}

.footer-badges span {
    border: 1px solid var(--text-dark);
    color: var(--text-dark);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(0.95); opacity: 0.5; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(0.95); opacity: 0.5; }
}

/* Mobile Responsive */
@media(max-width: 1024px) {
    .carousel-section {
        padding-left: 40px;
    }
    .modal-body {
        flex-direction: column;
        gap: 30px;
    }
    .modal-right {
        border-left: none;
        border-top: 1px solid var(--glass-border);
        padding-left: 0;
        padding-top: 20px;
    }
}

@media(max-width: 768px) {
    header {
        height: 60px;
    }
    .header-container {
        padding: 0 20px;
    }
    .nav-links, .btn-contact {
        display: none; /* In production a mobile menu would be here */
    }
    .carousel-section {
        padding-left: 20px;
    }
    .carousel-btn {
        display: none; /* Swipe on mobile */
    }
    .theater-mode-overlay {
        flex-direction: column-reverse;
    }
    .theater-sidebar {
        width: 100%;
        height: 35%;
    }
    .theater-viewport-wrapper {
        height: 65%;
    }
}

/* ----------------------------------------------------
   Top 10 Ranked Section & Big Outlined Rank Numbers
---------------------------------------------------- */
.top10-item {
    display: flex;
    /* The rank number lines up with the card's square image, so both are about the same height. */
    align-items: flex-start;
    position: relative;
    margin-right: 15px;
    flex-shrink: 0;
}

.top10-number {
    --rank-size: 240px; /* = the card image height */
    font-size: calc(var(--rank-size) * 1.4);
    font-weight: 900;
    line-height: 0.715;
    height: var(--rank-size);
    display: flex;
    align-items: flex-end;
    letter-spacing: -0.06em;
    color: #050508;
    -webkit-text-stroke: 3px rgba(255, 255, 255, 0.4);
    text-stroke: 3px rgba(255, 255, 255, 0.4);
    font-family: 'Outfit', sans-serif;
    margin-right: -25px;
    z-index: 1;
    pointer-events: none;
    user-select: none;
}

/* Two digits: the second overlaps the first, like Netflix's "10", so it is no wider than the others. */
.top10-number-double {
    letter-spacing: -0.3em;
    padding-right: 0.3em;
}

.top10-item:nth-child(1) .top10-number,
.top10-item:nth-child(2) .top10-number,
.top10-item:nth-child(3) .top10-number {
    -webkit-text-stroke: 3px var(--accent-gold);
    color: rgba(255, 215, 0, 0.05);
}

.top10-card {
    position: relative;
    z-index: 2;
}

/* Red Tag Badge on Netflix Mobile Cards */
.card-badge-red {
    position: absolute;
    top: 8px;
    left: 8px;
    background: #e50914;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 5;
    text-transform: uppercase;
}

/* ----------------------------------------------------
   Mobile Category Pills Bar & Bottom Nav Base
---------------------------------------------------- */
.mobile-category-pills {
    display: none;
}

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

/* ----------------------------------------------------
   Netflix Mobile Portrait App View (max-width: 768px)
---------------------------------------------------- */
@media (max-width: 768px) {
    /* Mobile Header Layout Adjustments */
    .header-container {
        padding: 0 12px !important;
        gap: 8px !important;
        justify-content: space-between;
    }

    .logo img {
        height: 26px !important;
    }

    .header-actions {
        gap: 8px !important;
        flex-shrink: 1;
        min-width: 0;
    }

    .search-box input {
        width: 110px !important;
        padding: 6px 8px 6px 28px !important;
        font-size: 0.75rem !important;
    }

    .search-box input:focus {
        width: 135px !important;
    }

    .lang-select {
        padding: 5px 6px !important;
        font-size: 0.75rem !important;
        max-width: 85px !important;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }

    /* Mobile Category Pills */
    .mobile-category-pills {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 10px 15px;
        background: rgba(5, 5, 8, 0.95);
        backdrop-filter: blur(10px);
        position: sticky;
        top: 60px;
        /* Start below the fixed 60px header in the page flow too, or the banner slides under the pills. */
        margin-top: 60px;
        z-index: 90;
        scrollbar-width: none;
        border-bottom: 1px solid var(--glass-border);
    }
    
    .mobile-category-pills::-webkit-scrollbar {
        display: none;
    }

    .pill-btn {
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid var(--glass-border);
        color: var(--text-muted);
        padding: 6px 16px;
        border-radius: 20px;
        font-size: 0.8rem;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
    }

    .pill-btn.active {
        background: #fff;
        color: #000;
        font-weight: 700;
        border-color: #fff;
    }

    /* Floating Card Hero Billboard (Netflix Mobile Screenshot 1 Style) */
    .hero-billboard {
        /* Phones crop the outer sides of the 1920 x 500 art (logo, characters and reels sit in the middle). */
        aspect-ratio: 2.4 / 1;
        max-height: none;
        margin: 12px 12px 0;
        width: calc(100% - 24px);
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
        border: 1px solid rgba(255, 255, 255, 0.15);
    }

    /* On a phone the banner is small and the button would sit on the logo; tapping the banner starts the demo. */
    .hero-slide .btn-play.hero-play {
        display: none;
    }

    .btn-play, .btn-info {
        width: 100%;
        justify-content: center;
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .hero-dots {
        left: 50%;
        transform: translateX(-50%);
        bottom: 8px;
    }

    .hero-sound-toggle {
        left: 10px;
        bottom: 10px;
        width: 36px;
        height: 36px;
    }

    .hero-arrow {
        display: none !important;
    }

    .main-content {
        margin-top: 0;
        padding-bottom: 90px;
    }

    .carousel-section {
        padding: 20px 0 20px 15px;
    }

    .section-title {
        font-size: 1.2rem;
    }

    /* flex-basis, not width: the desktop rule's "flex: 0 0 240px" would otherwise win. */
    .game-card {
        flex: 0 0 140px;
        width: 140px;
    }

    .card-body {
        gap: 6px;
        padding: 8px 8px 10px;
    }

    .card-title {
        font-size: 0.8rem;
    }

    .card-meta {
        gap: 6px;
        font-size: 0.7rem;
    }

    .card-actions {
        gap: 6px;
    }

    .card-btn-play {
        height: 30px;
        padding: 0 8px;
        gap: 4px;
        font-size: 0.75rem;
    }

    /* Tapping the card already opens the game details, so the play button gets the full width. */
    .card-btn-info {
        display: none;
    }

    .top10-number {
        --rank-size: 140px;
        margin-right: -18px;
    }

    /* Fixed Mobile Bottom Nav Bar */
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 60px;
        background: rgba(5, 5, 8, 0.95);
        backdrop-filter: blur(15px);
        border-top: 1px solid var(--glass-border);
        z-index: 1000;
        justify-content: space-around;
        align-items: center;
    }

    .mobile-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 3px;
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 600;
    }

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

    footer {
        padding-bottom: 90px !important;
    }
}

/* ----------------------------------------------------
   About stats / contact form feedback (content managed in the admin portal)
   ---------------------------------------------------- */
.about-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.about-stat {
    background-color: var(--bg-dark-700);
    padding: 25px 40px;
    border-radius: var(--border-radius-md);
    border: 1px solid var(--glass-border);
    min-width: 200px;
}

.about-stat h3 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--accent-purple);
}

.about-stat:nth-child(4n + 2) h3 { color: var(--accent-pink); }
.about-stat:nth-child(4n + 3) h3 { color: var(--accent-cyan); }
.about-stat:nth-child(4n + 4) h3 { color: var(--accent-gold); }

.about-stat p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .about-stats { gap: 16px; }
    .about-stat { min-width: 0; flex: 1 1 140px; padding: 20px 16px; }
}

/* Honeypot field: kept out of sight and out of the tab order, but still submitted by bots. */
.contact-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.contact-form-status {
    min-height: 1.4em;
    margin: 0;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
}

.contact-form-status.is-ok { color: #34d399; }
.contact-form-status.is-error { color: #fb7185; }

#contact-form button[type="submit"]:disabled {
    opacity: 0.6;
    cursor: wait;
}

/* ----------------------------------------------------
   About / contact sections and footer logo (moved out of inline styles)
   ---------------------------------------------------- */

.info-section { padding: 100px 40px; }
.about-section { background-color: var(--bg-dark-800); border-top: 1px solid var(--glass-border); }
.contact-section { background-color: var(--bg-dark-900); }

.info-title { font-size: 2.5rem; font-weight: 800; margin-bottom: 30px; }

.about-inner { max-width: 1000px; margin: 0 auto; text-align: center; }
.about-section .hero-tag { margin-bottom: 20px; }
.about-desc { color: var(--text-muted); font-size: 1.1rem; line-height: 1.8; margin-bottom: 40px; }

.contact-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    background: linear-gradient(145deg, var(--bg-dark-800), var(--bg-dark-700));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}
.contact-head { text-align: center; margin-bottom: 40px; }
.contact-head .info-title { font-size: 2.2rem; margin-bottom: 10px; }
.contact-head p { color: var(--text-muted); }

.contact-form { display: flex; flex-direction: column; gap: 20px; }
.contact-row { display: flex; gap: 20px; flex-wrap: wrap; }
.contact-field { flex: 1; min-width: 250px; }
.contact-label { display: block; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }

.contact-input {
    width: 100%;
    padding: 12px;
    background: var(--bg-dark-900);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font: inherit;
    outline: none;
    transition: var(--transition-smooth);
}
textarea.contact-input { resize: vertical; min-height: 110px; }
.contact-input::placeholder { color: var(--text-dark, #6b7280); }
.contact-input:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.25);
}

.contact-submit {
    margin-top: 10px;
    padding: 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}
.contact-submit:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.contact-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.footer-logo { margin-bottom: 20px; }
.footer-logo img { height: 35px; }
.footer-logo span { font-size: 1.2rem; }

/* Shown in the lobby when no game is online or the catalog failed to load */
.catalog-notice { padding: 80px 24px; text-align: center; color: var(--text-muted); font-size: 1.05rem; }

@media (max-width: 768px) {
    .info-section { padding: 64px 16px; }
    .info-title { font-size: 1.9rem; }
    .contact-card { padding: 28px 20px; }
    .contact-field { min-width: 100%; }
}

/* ----------------------------------------------------
   Game detail modal / hero readability
   ---------------------------------------------------- */

/* With an odd number of feature cells the last one takes the full row instead of leaving a hole. */
.modal-feature-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.modal-banner-actions {
    flex-wrap: wrap;
}

/* Phones: the title fills the banner, so the sharp card would cover it; keep only the blurred art, a little brighter. */
@media (max-width: 768px) {
    .modal-banner--card::after {
        display: none;
    }

    .modal-banner--card::before {
        filter: blur(18px) brightness(0.7) saturate(1.2);
    }
}

/* One hero slide: no carousel controls */
.hero-billboard.single-slide .hero-arrow,
.hero-billboard.single-slide .hero-dots {
    display: none;
}
