/*
 * RetroStuff - Premium Retro Game Catalogue
 * Theme: Dark Pink + Dark Teal + Metallic Chrome
 * 
 * CSS Architecture:
 * - Root variables (colors, spacing, typography)
 * - Base resets and typography
 * - Layout components (sidenav, main content)
 * - UI components (cards, carousels, badges)
 * - Animations and effects
 * - Responsive utilities
 */

/* ========================================
   ROOT VARIABLES
   ======================================== */
:root {
    /* Core Theme Colors */
    --color-pink: #c2185b;
    --color-pink-light: #fa5788;
    --color-pink-dark: #8c0032;
    --color-pink-glow: rgba(194, 24, 91, 0.4);

    --color-teal: #00695c;
    --color-teal-light: #439889;
    --color-teal-dark: #003d33;
    --color-teal-glow: rgba(0, 105, 92, 0.4);

    /* Metallic */
    --color-chrome: linear-gradient(135deg, #e8e8e8 0%, #b8b8b8 50%, #e8e8e8 100%);
    --color-silver: #c0c0c0;
    --color-gold: #cfb53b;
    --color-bronze: #cd7f32;

    /* Backgrounds */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-elevated: #1a1a25;
    --bg-card: rgba(26, 26, 37, 0.8);
    --bg-glass: rgba(18, 18, 26, 0.7);

    /* Text */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow-pink: 0 0 20px var(--color-pink-glow);
    --shadow-glow-teal: 0 0 20px var(--color-teal-glow);

    /* Z-index */
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-modal: 300;
    --z-nav: 400;

    /* Sidenav */
    --sidenav-width: 260px;
    --sidenav-collapsed: 72px;
}

/* ========================================
   BASE RESET & TYPOGRAPHY
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-pink);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-pink-light);
}

/* ========================================
   LAYOUT - MAIN STRUCTURE
   ======================================== */
.app-container {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidenav-width);
    transition: margin-left var(--transition-slow);
    position: relative;
}

.main-content--nav-collapsed {
    margin-left: var(--sidenav-collapsed);
}

@media (max-width: 1024px) {
    .main-content {
        margin-left: 0;
    }
}

/* ========================================
   SIDENAV - Floating Collapsible Navigation
   ======================================== */
.sidenav {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidenav-width);
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    z-index: var(--z-nav);
    display: flex;
    flex-direction: column;
    transition: width var(--transition-slow), transform var(--transition-slow);
    overflow: hidden;
}

.sidenav--collapsed {
    width: var(--sidenav-collapsed);
}

.sidenav--collapsed .sidenav__text,
.sidenav--collapsed .sidenav__logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidenav--collapsed .sidenav__header {
    justify-content: center;
}

@media (max-width: 1024px) {
    .sidenav {
        transform: translateX(-100%);
    }

    .sidenav--open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }
}

.sidenav__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidenav__logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-pink), var(--color-teal));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.sidenav__logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--color-pink-light), var(--color-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    white-space: nowrap;
    transition: opacity var(--transition-normal);
}

.sidenav__logo-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidenav__logo-img {
    width: 100%;
    max-width: 180px;
    height: auto;
    transition: all var(--transition-slow);
}

.sidenav--collapsed .sidenav__logo-img {
    max-width: 48px;
}

.sidenav--collapsed .sidenav__header {
    padding: var(--space-md);
}

.sidenav__toggle {
    position: absolute;
    top: var(--space-lg);
    right: calc(-1 * var(--space-lg));
    width: 32px;
    height: 32px;
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    z-index: 10;
}

.sidenav__toggle:hover {
    background: var(--color-pink);
    color: white;
    transform: scale(1.1);
}

.sidenav__section {
    padding: var(--space-md) 0;
}

.sidenav__section-title {
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.sidenav--collapsed .sidenav__section-title {
    display: none;
}

.sidenav__nav {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm) 0;
}

.sidenav__item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.sidenav--collapsed .sidenav__item {
    justify-content: center;
    padding: var(--space-md);
}

.sidenav__item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--color-pink);
    transform: scaleY(0);
    transition: transform var(--transition-fast);
}

.sidenav__item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.sidenav__item:hover::before {
    transform: scaleY(1);
}

.sidenav__item--active {
    background: rgba(194, 24, 91, 0.15);
    color: var(--color-pink-light);
}

.sidenav__item--active::before {
    transform: scaleY(1);
}

.sidenav__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
}

.sidenav__text {
    white-space: nowrap;
    transition: opacity var(--transition-normal), width var(--transition-normal);
}

.sidenav--collapsed .sidenav__text {
    display: none;
}

.sidenav__badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--color-pink);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.sidenav--collapsed .sidenav__badge {
    display: none;
}

.sidenav__platform-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.sidenav__icon--img {
    overflow: hidden;
}

/* Mobile toggle button */
.mobile-nav-toggle {
    display: none;
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    z-index: calc(var(--z-nav) + 1);
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1.5rem;
}

@media (max-width: 1024px) {
    .mobile-nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ========================================
   HERO SECTION - Parallax Video Background
   ======================================== */
.hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.hero__background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero__video,
.hero__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            var(--bg-primary) 0%,
            rgba(10, 10, 15, 0.8) 30%,
            rgba(10, 10, 15, 0.4) 60%,
            transparent 100%);
}

.hero__content {
    position: relative;
    z-index: 2;
    padding: var(--space-3xl) var(--space-xl);
    max-width: 600px;
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-md);
    background: var(--color-pink);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-md);
}

.hero__title {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero__description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.hero__meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.hero__actions {
    display: flex;
    gap: var(--space-md);
}

@media (max-width: 768px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero__title {
        font-size: 2rem;
    }

    .hero__content {
        padding: var(--space-xl);
    }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.btn--primary {
    background: var(--color-pink);
    color: white;
}

.btn--primary:hover {
    background: var(--color-pink-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-pink);
}

.btn--secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.btn--secondary:hover {
    background: rgba(255, 255, 255, 0.2);
}

.btn--icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: var(--radius-full);
}

.btn--sm {
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
}

.btn--lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

/* ========================================
   GAME CAROUSEL
   ======================================== */
.carousel-section {
    padding: var(--space-xl) 0;
}

.carousel-section__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-xl);
    margin-bottom: var(--space-md);
}

.carousel-section__title {
    font-size: 1.5rem;
    font-weight: 700;
}

.carousel-section__actions {
    display: flex;
    gap: var(--space-sm);
}

.carousel {
    position: relative;
    overflow: hidden;
}

.carousel__container {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-xl);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.carousel__container::-webkit-scrollbar {
    display: none;
}

.carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast);
}

.carousel:hover .carousel__arrow {
    opacity: 1;
}

.carousel__arrow:hover {
    background: var(--color-pink);
}

.carousel__arrow--left {
    left: var(--space-md);
}

.carousel__arrow--right {
    right: var(--space-md);
}

/* ========================================
   GAME CARD
   ======================================== */
.game-card {
    flex-shrink: 0;
    width: 200px;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
    cursor: pointer;
}

.game-card:hover {
    transform: scale(1.08) translateY(-8px);
    z-index: 10;
    box-shadow: var(--shadow-lg), var(--shadow-glow-pink);
}

.game-card__image-container {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
}

.game-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.game-card:hover .game-card__image {
    transform: scale(1.1);
}

.game-card__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.game-card:hover .game-card__video {
    opacity: 1;
}

.game-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.game-card:hover .game-card__overlay {
    opacity: 1;
}

.game-card__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-md);
    transform: translateY(100%);
    transition: transform var(--transition-slow);
}

.game-card:hover .game-card__content {
    transform: translateY(0);
}

.game-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.game-card__meta {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.game-card__badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 2px 8px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.game-card__rating {
    display: flex;
    align-items: center;
    gap: 2px;
    color: var(--color-gold);
}

.game-card__add-btn {
    position: absolute;
    bottom: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    background: var(--color-teal);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    opacity: 0;
    transform: scale(0.8);
    transition: all var(--transition-fast);
}

.game-card:hover .game-card__add-btn {
    opacity: 1;
    transform: scale(1);
}

.game-card__add-btn:hover {
    background: var(--color-teal-light);
    transform: scale(1.1);
}

/* Featured card (larger) */
.game-card--featured {
    width: 350px;
}

.game-card--featured .game-card__image-container {
    aspect-ratio: 16/9;
}

/* ========================================
   MY LIBRARY SECTION
   ======================================== */
.library-section {
    padding: var(--space-2xl) var(--space-xl);
}

.library-empty {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    border: 2px dashed rgba(255, 255, 255, 0.1);
}

.library-empty__icon {
    font-size: 4rem;
    margin-bottom: var(--space-md);
    opacity: 0.3;
}

.library-empty__title {
    font-size: 1.5rem;
    margin-bottom: var(--space-sm);
}

.library-empty__text {
    color: var(--text-muted);
    margin-bottom: var(--space-lg);
}

/* ========================================
   GAME DETAILS PAGE
   ======================================== */
.game-details {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.game-details__hero {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-2xl);
}

.game-details__backdrop {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.game-details__info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: var(--space-2xl);
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
}

.game-details__title {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

.game-details__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.game-details__meta-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.game-details__meta-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.game-details__meta-value {
    font-weight: 600;
    color: var(--color-pink-light);
}

.game-details__description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
}

.game-details__section {
    margin-bottom: var(--space-2xl);
}

.game-details__section-title {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* Tags */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.tag {
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    transition: all var(--transition-fast);
}

.tag:hover {
    background: var(--color-teal);
}

.tag--genre {
    background: rgba(194, 24, 91, 0.2);
    border: 1px solid var(--color-pink);
}

/* ========================================
   RATINGS & REVIEWS
   ======================================== */
.rating {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.rating__star {
    color: var(--color-gold);
    font-size: 1.25rem;
}

.rating__star--empty {
    color: rgba(255, 255, 255, 0.2);
}

.rating__value {
    font-weight: 700;
    margin-left: var(--space-sm);
}

.rating__count {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.review-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
}

.review-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.review-card__author {
    font-weight: 600;
}

.review-card__date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.review-card__content {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   BADGES
   ======================================== */
.platform-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.platform-badge--nes {
    border-left: 3px solid #e60012;
}

.platform-badge--snes {
    border-left: 3px solid #7b1fa2;
}

.platform-badge--megadrive {
    border-left: 3px solid #0d47a1;
}

.platform-badge--ps1 {
    border-left: 3px solid #3f51b5;
}

.platform-badge--ps2 {
    border-left: 3px solid #1565c0;
}

.platform-badge--dreamcast {
    border-left: 3px solid #ff5722;
}

.platform-badge--arcade {
    border-left: 3px solid #ffc107;
}

/* ========================================
   LOADING STATES
   ======================================== */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.skeleton {
    background: linear-gradient(90deg,
            var(--bg-card) 25%,
            var(--bg-elevated) 50%,
            var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease infinite;
    border-radius: var(--radius-md);
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.5s ease forwards;
}

/* Stagger animation children */
.stagger-children>* {
    animation: slideUp 0.5s ease forwards;
    opacity: 0;
}

.stagger-children>*:nth-child(1) {
    animation-delay: 0.05s;
}

.stagger-children>*:nth-child(2) {
    animation-delay: 0.1s;
}

.stagger-children>*:nth-child(3) {
    animation-delay: 0.15s;
}

.stagger-children>*:nth-child(4) {
    animation-delay: 0.2s;
}

.stagger-children>*:nth-child(5) {
    animation-delay: 0.25s;
}

.stagger-children>*:nth-child(6) {
    animation-delay: 0.3s;
}

.stagger-children>*:nth-child(7) {
    animation-delay: 0.35s;
}

.stagger-children>*:nth-child(8) {
    animation-delay: 0.4s;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-gradient {
    background: linear-gradient(90deg, var(--color-pink-light), var(--color-teal-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-metallic {
    background: var(--color-chrome);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.border-glow {
    border: 1px solid rgba(194, 24, 91, 0.3);
    box-shadow: inset 0 0 20px rgba(194, 24, 91, 0.1);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow-pink);
}

/* Scrollable sections */
.scroll-x {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.scroll-x::-webkit-scrollbar {
    display: none;
}

/* ========================================
   RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 768px) {
    .hero__actions {
        flex-direction: column;
    }

    .game-card {
        width: 150px;
    }

    .game-card--featured {
        width: 280px;
    }

    .carousel-section__header {
        padding: 0 var(--space-md);
    }

    .carousel__container {
        padding: var(--space-sm) var(--space-md);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .game-card {
        width: 120px;
    }

    .game-card--featured {
        width: 240px;
    }

    .game-details__title {
        font-size: 1.75rem;
    }

    .game-details__meta {
        gap: var(--space-md);
    }
}

/* Hide on mobile / desktop */
@media (max-width: 1024px) {
    .hide-mobile {
        display: none !important;
    }
}

@media (min-width: 1025px) {
    .hide-desktop {
        display: none !important;
    }
}

/* ========================================
   COMMENTS SYSTEM
   ======================================== */

/* Comment Card */
.comment-card {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.comment-card:hover {
    background: var(--bg-elevated);
}

.comment-card__avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--color-pink), var(--color-teal));
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
}

.comment-card__content {
    flex: 1;
    min-width: 0;
}

.comment-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-xs);
}

.comment-card__author {
    font-weight: 600;
    font-size: 0.875rem;
}

.comment-card__time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.comment-card__rating {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-xs);
    font-size: 0.75rem;
}

.comment-card__rating .star--filled {
    color: var(--color-gold);
}

.comment-card__rating .star--empty {
    color: var(--text-muted);
}

.comment-card__text {
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-secondary);
    margin-bottom: var(--space-sm);
}

.comment-card__actions {
    display: flex;
    gap: var(--space-md);
}

.comment-card__like-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.comment-card__like-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.comment-card__like-btn--active {
    background: rgba(194, 24, 91, 0.2);
    color: var(--color-pink-light);
}

/* Comments Preview (horizontal) */
.comments-preview {
    padding: var(--space-md) 0;
}

.comments-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-md);
}

.comments-preview__carousel {
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.comments-preview__carousel::-webkit-scrollbar {
    display: none;
}

.comments-preview__track {
    display: flex;
    gap: var(--space-md);
    padding-bottom: var(--space-sm);
}

.comments-preview__item {
    flex-shrink: 0;
    width: 320px;
}

.comments-preview__empty {
    padding: var(--space-xl);
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    border-radius: var(--radius-lg);
}

.comments-preview__add {
    margin-top: var(--space-md);
}

/* Comments Page */
.comments-page {
    padding: var(--space-xl);
    max-width: 800px;
    margin: 0 auto;
}

.comments-page__header {
    margin-bottom: var(--space-xl);
}

.comments-page__title {
    font-size: 2rem;
    margin: var(--space-md) 0;
}

.comments-page__count {
    color: var(--text-muted);
}

.comments-page__controls {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.sort-dropdown {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.sort-dropdown label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.sort-dropdown__select {
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.875rem;
    cursor: pointer;
}

.sort-dropdown__select:focus {
    outline: none;
    border-color: var(--color-pink);
}

.comments-page__add-form {
    background: var(--bg-card);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

.comments-page__add-form h3 {
    margin-bottom: var(--space-md);
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.comment-form__input,
.comment-form__textarea {
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.comment-form__input::placeholder,
.comment-form__textarea::placeholder {
    color: var(--text-muted);
}

.comment-form__input:focus,
.comment-form__textarea:focus {
    outline: none;
    border-color: var(--color-pink);
}

.comment-form__textarea {
    min-height: 100px;
    resize: vertical;
}

.comment-form__rating {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.star-btn {
    font-size: 1.5rem;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.star-btn:hover,
.star-btn--active {
    color: var(--color-gold);
}

.comments-page__list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.comments-page__empty {
    text-align: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.pagination__btn {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.pagination__btn:hover:not(:disabled) {
    background: var(--color-pink);
    border-color: var(--color-pink);
}

.pagination__btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination__info {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Screenshot img in carousel */
.screenshot-img {
    width: 300px;
    height: auto;
    border-radius: var(--radius-md);
    flex-shrink: 0;
}

.game-details__video {
    max-width: 100%;
    border-radius: var(--radius-md);
}

/* ========================================
   PLATFORM BANNERS
   ======================================== */

.platform-page {
    padding: 0;
}

.platform-banner {
    position: relative;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: var(--platform-color-1, var(--color-pink));
    background-image: linear-gradient(135deg,
            var(--platform-color-1, var(--color-pink)) 0%,
            var(--platform-color-2, var(--color-teal)) 100%);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.platform-banner__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            var(--bg-primary) 0%,
            rgba(15, 15, 26, 0.7) 50%,
            transparent 100%);
}

.platform-banner__content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-2xl);
    width: 100%;
}

.platform-banner__icon {
    width: 80px;
    height: 80px;
    object-fit: contain;
    background: var(--bg-elevated);
    padding: var(--space-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-heavy);
}

.platform-banner__title {
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.platform-banner__count {
    margin-left: auto;
    font-size: 1rem;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-full);
}

@media (max-width: 768px) {
    .platform-banner {
        height: 180px;
    }

    .platform-banner__content {
        padding: var(--space-lg);
        flex-wrap: wrap;
    }

    .platform-banner__icon {
        width: 50px;
        height: 50px;
        padding: var(--space-sm);
    }

    .platform-banner__title {
        font-size: 1.5rem;
    }

    .platform-banner__count {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

/* ========================================
   RETRO VISUAL EFFECTS
   ======================================== */

/* Retro background pattern */
.retro-bg {
    background-image: url('/images/backgrounds/retro-logos.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0.03;
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
}

/* CRT TV Preview Component */
.crt-preview {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1;
}

.crt-preview__shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 10;
    pointer-events: none;
}

.crt-preview__screen {
    position: absolute;
    top: 11%;
    left: 7%;
    width: 86%;
    height: 63%;
    overflow: hidden;
    background: #000;
    border-radius: 8px;
}

.crt-preview__video,
.crt-preview__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.crt-preview__static {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            #111 0%, #222 2%, #111 4%);
    background-size: 100% 4px;
    animation: crt-static 0.1s infinite;
}

@keyframes crt-static {
    0% {
        opacity: 0.8;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.8;
    }
}

.crt-preview__scanlines {
    position: absolute;
    inset: 0;
    background: url('/images/overlays/scanlines.png');
    background-size: cover;
    opacity: 0.15;
    pointer-events: none;
    z-index: 5;
}

/* Arcade Cabinet Preview Component */
.arcade-preview {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 1 / 1.2;
}

.arcade-preview__shell {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 10;
    pointer-events: none;
}

.arcade-preview__marquee {
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 8%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    background: linear-gradient(to bottom, #fff, #ccc);
    border-radius: 4px 4px 0 0;
}

.arcade-preview__marquee-text {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-pink);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.arcade-preview__screen {
    position: absolute;
    top: 25%;
    left: 15%;
    width: 70%;
    height: 45%;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
}

.arcade-preview__video,
.arcade-preview__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.arcade-preview__static {
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,
            #111 0%, #333 2%, #111 4%);
    background-size: 100% 4px;
    animation: crt-static 0.1s infinite;
}

.arcade-preview__scanlines {
    position: absolute;
    inset: 0;
    background: url('/images/overlays/scanlines.png');
    background-size: cover;
    opacity: 0.2;
    pointer-events: none;
    z-index: 5;
}

/* CRT Glow effect */
.crt-preview__screen::before,
.arcade-preview__screen::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow:
        inset 0 0 60px rgba(0, 255, 255, 0.1),
        inset 0 0 30px rgba(255, 0, 255, 0.05);
    pointer-events: none;
    z-index: 4;
}

/* Video hover effects */
.crt-preview:hover .crt-preview__video,
.arcade-preview:hover .arcade-preview__video {
    filter: brightness(1.1) saturate(1.2);
}

/* Preview container for game details */
.video-preview-container {
    display: flex;
    justify-content: center;
    padding: var(--space-xl) 0;
}

/* Responsive */
@media (max-width: 768px) {

    .crt-preview,
    .arcade-preview {
        max-width: 320px;
    }
}

/* ========================================
   ES-DE STYLE GAME DETAILS
   ======================================== */

.esde-page {
    min-height: 100vh;
}

/* Hero Section */
.esde-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.esde-hero__background {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.esde-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 10, 15, 0.95) 0%,
            rgba(10, 10, 15, 0.7) 50%,
            rgba(10, 10, 15, 0.85) 100%);
    z-index: 1;
}

.esde-hero__content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: minmax(320px, 450px) 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* Left: Video Preview */
.esde-hero__preview {
    display: flex;
    justify-content: center;
    align-items: center;
}

.esde-preview-container {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 500px;
}

.esde-hero__preview .crt-preview,
.esde-hero__preview .arcade-preview {
    max-width: 100%;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

/* Box Art Overlay - positioned at bottom-right of TV/cabinet */
.esde-boxart-overlay {
    position: absolute;
    bottom: -10px;
    right: -30px;
    z-index: 10;
    transform: perspective(800px) rotateY(-10deg) rotateX(5deg);
    animation: boxart-float 3s ease-in-out infinite;
}

/* Mobile: Position box art on left */
@media (max-width: 768px) {
    .esde-boxart-overlay {
        right: auto;
        left: -15px;
        bottom: -5px;
        transform: perspective(800px) rotateY(10deg) rotateX(5deg);
    }

    .esde-boxart-overlay__image {
        width: 90px;
        max-height: 120px;
    }

    @keyframes boxart-float {

        0%,
        100% {
            transform: perspective(800px) rotateY(10deg) rotateX(5deg) translateY(0);
        }

        50% {
            transform: perspective(800px) rotateY(10deg) rotateX(5deg) translateY(-8px);
        }
    }
}

.esde-boxart-overlay__image {
    width: 120px;
    max-height: 160px;
    object-fit: contain;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.esde-boxart-overlay:hover .esde-boxart-overlay__image {
    transform: scale(1.1) rotateY(-5deg);
}

@keyframes boxart-float {

    0%,
    100% {
        transform: perspective(800px) rotateY(-10deg) rotateX(5deg) translateY(0);
    }

    50% {
        transform: perspective(800px) rotateY(-10deg) rotateX(5deg) translateY(-8px);
    }
}

/* Right: Game Info */
.esde-hero__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: rgba(20, 20, 30, 0.6);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Wheel Logo */
.esde-hero__wheel {
    max-width: 350px;
    max-height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.8));
}

.esde-hero__title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--color-cyan), var(--color-pink));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin: 0;
}

/* Meta Tags */
.esde-hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-xs);
}

.esde-hero__tag {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.esde-hero__tag--genre {
    background: linear-gradient(135deg, var(--color-pink), var(--color-purple));
    color: white;
}

/* Rating */
.esde-hero__rating {
    margin: var(--space-sm) 0;
}

/* Description */
.esde-hero__description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Actions */
.esde-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.btn--lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn--ghost {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Credits */
.esde-hero__credits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-top: var(--space-sm);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.esde-hero__credits strong {
    color: var(--text-secondary);
}

/* Media Gallery */
.esde-gallery {
    padding: var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

.esde-gallery__title {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    color: var(--text-primary);
}

.esde-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.esde-gallery__item {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.esde-gallery__item:hover {
    transform: scale(1.02);
}

.esde-gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esde-gallery__item--boxart {
    aspect-ratio: 3 / 4;
}

/* Comments & Similar sections */
.esde-comments,
.esde-similar {
    padding: var(--space-lg) var(--space-xl);
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 1024px) {
    .esde-hero__content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .esde-hero__preview {
        order: -1;
    }

    .esde-hero__wheel {
        margin: 0 auto;
    }

    .esde-hero__meta {
        justify-content: center;
    }

    .esde-hero__actions {
        justify-content: center;
    }

    .esde-hero__credits {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .esde-hero {
        min-height: auto;
        padding: var(--space-lg) 0;
    }

    .esde-hero__content {
        padding: var(--space-md);
        gap: var(--space-lg);
    }

    .esde-hero__info {
        padding: var(--space-md);
    }

    .esde-hero__title {
        font-size: 1.75rem;
    }

    .esde-hero__wheel {
        max-width: 250px;
        max-height: 80px;
    }

    .esde-gallery {
        padding: var(--space-md);
    }

    .esde-gallery__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================
   BACK COVER MODAL
   ========================================== */
.backcover-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    animation: modal-fade-in 0.2s ease-out;
}

@keyframes modal-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.backcover-modal__content {
    position: relative;
    background: rgba(30, 30, 40, 0.95);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: var(--space-lg);
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    animation: modal-slide-in 0.3s ease-out;
}

@keyframes modal-slide-in {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.backcover-modal__close {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.backcover-modal__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.backcover-modal__title {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin: 0;
    text-align: center;
}

.backcover-modal__image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.backcover-modal__empty {
    color: var(--text-muted);
    text-align: center;
    padding: var(--space-xl);
}

/* ==========================================
   FEATURED HERO SECTION (Main Page)
   ========================================== */
.hero-featured {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: var(--space-xl) 0;
}

.hero-featured__background {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-featured__bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.5);
    transform: scale(1.02);
}

.hero-featured__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(15, 15, 25, 0.9) 0%,
            rgba(15, 15, 25, 0.7) 50%,
            rgba(15, 15, 25, 0.9) 100%);
}

.hero-featured__container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(200px, auto) 1fr;
    gap: var(--space-lg);
    width: 100%;
    max-width: min(1400px, 100vw - var(--space-lg) * 2);
    margin: 0 auto;
    padding: 0 var(--space-lg);
    align-items: center;
    box-sizing: border-box;
}

/* Box Art Display */
.hero-featured__boxart {
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1000px;
}

.hero-featured__boxart-image {
    max-height: 450px;
    max-width: 320px;
    object-fit: contain;
    border-radius: var(--radius-md);
    transform: rotateY(-5deg);
    transition: transform 0.4s ease;
    animation: hero-boxart-float 4s ease-in-out infinite;
}

.hero-featured__boxart-image--3d {
    transform: rotateY(-8deg) rotateX(2deg);
}

.hero-featured__boxart:hover .hero-featured__boxart-image {
    transform: rotateY(0deg) scale(1.02);
}

@keyframes hero-boxart-float {

    0%,
    100% {
        transform: rotateY(-5deg) translateY(0);
    }

    50% {
        transform: rotateY(-5deg) translateY(-10px);
    }
}

/* Video Preview */
.hero-featured__video {
    margin-top: var(--space-md);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.hero-featured__video-player {
    width: 100%;
    max-width: 320px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    background: #000;
}

/* Game Info */
.hero-featured__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    padding: var(--space-xl);
    background: rgba(20, 20, 35, 0.7);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: hero-info-slide-in 0.6s ease-out;
}

@keyframes hero-info-slide-in {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-featured__badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-full);
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-featured__wheel {
    max-width: 400px;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.hero-featured__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #fff 0%, #c0c0c0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.hero-featured__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.hero-featured__tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
    font-size: 0.875rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-featured__tag--platform {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    font-weight: 600;
}

.hero-featured__tag--genre {
    background: rgba(138, 43, 226, 0.3);
    color: #d8b4fe;
    border-color: rgba(138, 43, 226, 0.3);
}

.hero-featured__tag--rating {
    background: rgba(251, 191, 36, 0.2);
    color: #fcd34d;
    border-color: rgba(251, 191, 36, 0.3);
}

.hero-featured__description {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
}

.hero-featured__credits {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    color: var(--text-muted);
    font-size: 0.875rem;
}

.hero-featured__credits strong {
    color: var(--text-primary);
}

.hero-featured__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-top: var(--space-sm);
}

.hero-featured__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-xl);
}

/* Mobile Responsive */
@media (max-width: 900px) {
    .hero-featured {
        min-height: auto;
        padding: var(--space-lg) 0;
    }

    .hero-featured__container {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
        text-align: center;
    }

    .hero-featured__boxart-image {
        max-height: 300px;
        max-width: 220px;
    }

    .hero-featured__info {
        padding: var(--space-lg);
    }

    .hero-featured__meta {
        justify-content: center;
    }

    .hero-featured__credits {
        justify-content: center;
    }

    .hero-featured__actions {
        justify-content: center;
    }

    .hero-featured__wheel {
        max-width: 280px;
        margin: 0 auto;
    }
}

/* ==========================================
   SCREENSHOT GALLERY ENHANCEMENTS
   ========================================== */
.esde-gallery__item {
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    transition: transform 0.3s ease;
}

.esde-gallery__item:hover {
    transform: scale(1.02);
}

.esde-gallery__item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.esde-gallery__item:hover .esde-gallery__item-overlay {
    opacity: 1;
}

.esde-gallery__item-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

/* ==========================================
   LIGHTBOX (State-of-the-art Gallery Viewer)
   ========================================== */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lightbox-fade-in 0.2s ease-out;
    outline: none;
}

@keyframes lightbox-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.lightbox__close {
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
}

.lightbox__close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    max-width: 98vw;
    max-height: 98vh;
    width: 98vw;
    height: 98vh;
}

.lightbox__image {
    max-width: 100%;
    max-height: 95vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: lightbox-image-zoom 0.3s ease-out;
}

@keyframes lightbox-image-zoom {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* PDF Lightbox - Make manual pages fill the screen */
.lightbox--pdf .lightbox__content {
    width: 100%;
    height: 100%;
    max-width: 100vw;
    max-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox--pdf .lightbox__image {
    max-width: 100%;
    max-height: 98vh;
    width: auto;
    height: 98vh;
    object-fit: contain;
}

.lightbox__counter {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    font-weight: 500;
    padding: var(--space-xs) var(--space-md);
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-full);
}

.lightbox__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox__nav--prev {
    left: var(--space-lg);
}

.lightbox__nav--next {
    right: var(--space-lg);
}

.lightbox__thumbnails {
    position: absolute;
    bottom: var(--space-lg);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: rgba(0, 0, 0, 0.7);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(10px);
    max-width: 90vw;
    overflow-x: auto;
}

.lightbox__thumb {
    width: 60px;
    height: 45px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    flex-shrink: 0;
}

.lightbox__thumb:hover {
    opacity: 0.8;
}

.lightbox__thumb--active {
    opacity: 1;
    border-color: var(--accent-primary);
    transform: scale(1.1);
}

.lightbox__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mobile Lightbox */
@media (max-width: 768px) {
    .lightbox__nav {
        width: 44px;
        height: 44px;
        font-size: 1.25rem;
    }

    .lightbox__nav--prev {
        left: var(--space-sm);
    }

    .lightbox__nav--next {
        right: var(--space-sm);
    }

    .lightbox__close {
        top: var(--space-md);
        right: var(--space-md);
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .lightbox__thumbnails {
        bottom: var(--space-md);
    }

    .lightbox__thumb {
        width: 48px;
        height: 36px;
    }
}

/* ==========================================
   GUIDE/MANUAL VIEWER
   ========================================== */
.esde-guide {
    padding: var(--space-xl);
    background: rgba(15, 15, 25, 0.5);
    border-radius: var(--radius-lg);
    margin: var(--space-lg);
}

.esde-guide--no-margin {
    margin: 0;
}

.esde-guide__title {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin: 0 0 var(--space-lg) 0;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.esde-guide__viewer {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.esde-guide__pdf-container {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.esde-guide__pdf-iframe {
    width: 100%;
    height: 600px;
    border: none;
}

.esde-guide__download {
    align-self: flex-start;
}

.esde-guide__image-container {
    display: flex;
    justify-content: center;
}

.esde-guide__image {
    max-width: 100%;
    max-height: 800px;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .esde-guide {
        padding: var(--space-md);
        margin: var(--space-md);
    }

    .esde-guide__pdf-iframe {
        height: 400px;
    }
}

/* ==========================================
   MOBILE/TABLET LAYOUT FIXES (iPad, iOS)
   ========================================== */

/* Ensure main content area scrolls properly */
.main-content {
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

/* iPad Portrait (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
    .hero-featured__container {
        grid-template-columns: 1fr;
        text-align: center;
        max-width: 100%;
        padding: 0 var(--space-md);
    }

    .hero-featured__boxart {
        justify-content: center;
    }

    .hero-featured__boxart-image {
        max-height: 350px;
        max-width: 250px;
    }

    .hero-featured__info {
        max-width: 100%;
    }

    .hero-featured__meta,
    .hero-featured__credits,
    .hero-featured__actions {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* All Mobile Devices */
@media (max-width: 767px) {

    /* Remove any horizontal overflow */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
    }

    /* Hero container mobile */
    .hero-featured {
        padding: var(--space-md) 0;
    }

    .hero-featured__container {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 var(--space-sm);
        gap: var(--space-md);
    }

    .hero-featured__boxart-image {
        max-height: 280px;
        max-width: 200px;
    }

    .hero-featured__info {
        padding: var(--space-md);
    }

    .hero-featured__title {
        font-size: 1.5rem;
    }

    .hero-featured__wheel {
        max-width: 220px;
    }

    .hero-featured__meta,
    .hero-featured__credits,
    .hero-featured__actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero-featured__description {
        font-size: 0.9rem;
    }

    /* Game Details mobile */
    .esde-hero__content {
        padding: var(--space-sm);
    }

    .esde-preview-container {
        max-width: 100%;
    }

    /* Buttons mobile */
    .btn--lg {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* ==========================================
   PDF PAGE VIEWER STYLES
   ========================================== */
.pdf-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.pdf-page-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: var(--space-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-secondary);
}

.pdf-page-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--color-pink);
    transform: translateY(-2px);
}

.pdf-page-btn__icon {
    font-size: 1.5rem;
}

.pdf-page-btn__num {
    font-size: 0.75rem;
    font-weight: 500;
}

.pdf-page-thumb {
    position: relative;
    aspect-ratio: 3 / 4;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.pdf-page-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    border-color: var(--color-pink);
}

.pdf-page-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.pdf-page-thumb img[src]:not([src=""]):not([src="/images/loading-page.png"]) {
    opacity: 1;
}

.pdf-page-thumb__num {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    padding: 1rem 0.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.pdf-loading,
.pdf-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: var(--space-xl);
    color: var(--text-muted);
}

.pdf-error {
    color: #f87171;
}

.esde-guide__actions {
    margin-bottom: var(--space-md);
}

/* Lightbox loading state */
.lightbox__loading {
    color: #fff;
    font-size: 1.2rem;
    padding: var(--space-xl);
    text-align: center;
}

/* Mobile PDF grid */
@media (max-width: 768px) {
    .pdf-pages-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
        gap: var(--space-sm);
    }
}

/* ==========================================
   VIDEO UNMUTE BUTTON (Mobile Audio)
   ========================================== */
.video-unmute-btn {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-xl);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.2s;
    backdrop-filter: blur(5px);
}

.video-unmute-btn:hover {
    background: rgba(0, 0, 0, 0.85);
    border-color: var(--color-pink);
    transform: translateX(-50%) scale(1.05);
}

.crt-preview__screen,
.arcade-preview__screen {
    position: relative;
}

/* Mobile: larger touch target */
@media (max-width: 768px) {
    .video-unmute-btn {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
}