/* ================================================
   ZENKERGAME - NEURAL ARCADE DESIGN SYSTEM
   ================================================ */

/* Import Unique Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ================================================
   DESIGN TOKENS
   ================================================ */
:root {
    /* Colors */
    --bg-primary: #030305;
    --bg-secondary: #0a0a0f;
    --bg-card: #0d0d11;
    --bg-card-hover: #121217;
    --bg-elevated: #15151c;

    /* Accent Colors */
    --accent-primary: #8b5cf6;
    --accent-secondary: #06b6d4;
    --accent-tertiary: #f43f5e;
    --accent-glow: rgba(139, 92, 246, 0.15);

    /* Text Colors */
    --text-primary: #f5f5f5;
    --text-secondary: #a0a0b0;
    --text-muted: #606070;

    /* Borders */
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-medium: rgba(255, 255, 255, 0.1);
    --border-accent: rgba(139, 92, 246, 0.3);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
}

/* ================================================
   BASE STYLES
   ================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Subtle scanline overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 9999;
}

/* ================================================
   TYPOGRAPHY
   ================================================ */
.font-display {
    font-family: 'Chakra Petch', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--text-secondary);
    margin-bottom: 1em;
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

/* ================================================
   LAYOUT
   ================================================ */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ================================================
   CARDS
   ================================================ */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    position: relative;
    overflow: hidden;
}

/* Subtle gradient accent on cards */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--accent-primary),
        transparent
    );
    opacity: 0.5;
}

.card-dark {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    transition: all var(--transition-normal);
}

.card-dark:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}

/* ================================================
   GAME CARDS
   ================================================ */
.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-subtle);
    position: relative;
}

.game-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--x, 50%) var(--y, 50%),
        var(--accent-glow),
        transparent 60%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
    pointer-events: none;
}

.game-card:hover::after {
    opacity: 1;
}

.game-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(139, 92, 246, 0.1);
}

.game-card a {
    display: block;
    color: inherit;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.game-thumbnail {
    aspect-ratio: 16/9;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-elevated));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.game-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.game-card:hover .game-thumbnail img {
    transform: scale(1.05);
}

.game-card .p-4 {
    padding: var(--space-md);
}

.game-card h3 {
    font-family: 'Chakra Petch', sans-serif;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}

.game-card p {
    color: var(--text-muted);
    font-size: 0.8125rem;
    margin-bottom: var(--space-sm);
}

/* ================================================
   GAME PREVIEW CARD
   ================================================ */
.game-preview-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: var(--space-xl);
    border: 1px solid var(--border-subtle);
}

.game-iframe-container {
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-primary);
    margin-bottom: var(--space-lg);
    position: relative;
    box-shadow:
        0 0 0 1px var(--border-subtle),
        0 40px 80px rgba(0, 0, 0, 0.5);
}

.game-iframe {
    display: block;
    width: 100%;
    border: none;
}

.game-actions {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    border: 1px solid var(--border-subtle);
}

/* ================================================
   BUTTONS
   ================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary), #7c3aed);
    color: #ffffff;
    box-shadow:
        0 4px 15px rgba(139, 92, 246, 0.3),
        0 0 20px rgba(139, 92, 246, 0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(139, 92, 246, 0.4),
        0 0 30px rgba(139, 92, 246, 0.15);
}

.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
}

/* ================================================
   GAME INFO TABLE
   ================================================ */
.game-info-table {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    border: 1px solid var(--border-subtle);
}

.game-info-table table {
    width: 100%;
    border-collapse: collapse;
}

.game-info-table td {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.game-info-table td:first-child {
    font-family: 'Chakra Petch', sans-serif;
    font-weight: 600;
    color: var(--text-muted);
    width: 140px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.game-info-table td:last-child {
    color: var(--text-primary);
}

.game-info-table tr:last-child td {
    border-bottom: none;
}

/* ================================================
   RATING STARS
   ================================================ */
.rating-stars {
    color: #fbbf24;
    font-size: 1.125rem;
    letter-spacing: 2px;
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.3);
}

/* ================================================
   FAQ SECTION
   ================================================ */
.faq-item {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-subtle);
    transition: all var(--transition-normal);
}

.faq-item:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}

.faq-item h3 {
    font-family: 'Chakra Petch', sans-serif;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
    font-size: 1.125rem;
}

.faq-item p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
    border: 1px solid var(--border-subtle);
}

.sidebar-section h3 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    margin-bottom: var(--space-md);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

/* ================================================
   MORE GAMES GRID
   ================================================ */
.more-games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
}

.more-game-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-subtle);
}

.more-game-item:hover {
    transform: translateY(-2px);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.more-game-item a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.more-game-item img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.more-game-item-title {
    padding: var(--space-sm);
    font-size: 0.75rem;
    color: var(--text-primary);
    text-align: center;
    font-family: 'Chakra Petch', sans-serif;
}

/* ================================================
   AD BANNER
   ================================================ */
.ad-banner {
    background: var(--bg-secondary);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    text-align: center;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.8125rem;
    font-family: 'Chakra Petch', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ================================================
   NAVIGATION
   ================================================ */
.nav-link {
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-elevated);
}

.nav-link.active {
    color: var(--accent-primary);
}

/* ================================================
   SEARCH
   ================================================ */
.search-container {
    display: flex;
    gap: var(--space-sm);
    align-items: center;
}

.search-input {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.625rem 1rem;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 0.875rem;
    width: 200px;
    transition: all var(--transition-normal);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.search-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.625rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.search-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
    border-color: var(--accent-primary);
}

/* ================================================
   HEADER & FOOTER
   ================================================ */
.header-glass {
    background: rgba(3, 3, 5, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.footer-glass {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-subtle);
    padding: var(--space-2xl) 0;
}

.footer-links {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-family: 'Chakra Petch', sans-serif;
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-disclaimer {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.75rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.text-muted {
    color: var(--text-muted);
}

.text-small {
    font-size: 0.875rem;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
    }
    50% {
        box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
    }
}

/* ================================================
   ACCESSIBILITY
   ================================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: var(--bg-elevated);
}

/* ================================================
   RESPONSIVE DESIGN
   ================================================ */
@media (max-width: 1024px) {
    :root {
        --space-xl: 1.5rem;
        --space-2xl: 2rem;
    }

    .search-input {
        width: 150px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .game-preview-card {
        padding: var(--space-md);
    }

    .game-actions {
        padding: var(--space-md);
    }

    .search-container {
        display: none;
    }

    .more-games-grid {
        grid-template-columns: 1fr;
    }

    .game-info-table td:first-child {
        width: auto;
    }

    .card {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    :root {
        --space-md: 0.75rem;
        --space-lg: 1rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
}

/* ================================================
   PREFERENCES
   ================================================ */
@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
    body {
        background: white;
        color: black;
    }

    body::before {
        display: none;
    }

    .card,
    .card-dark,
    .game-card {
        background: white;
        border: 1px solid #ccc;
        box-shadow: none;
    }
}
