/* ═══════════════════════════════════════════════════════════════
   ARCADE VAULT - Premium Retro Gaming Experience
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
    --bg-primary: #0c0c14;
    --bg-secondary: #12121c;
    --bg-card: #16162299;
    --bg-card-hover: #1a1a28;
    
    --accent-primary: #00f0ff;
    --accent-secondary: #ff2d6a;
    --accent-tertiary: #b537f2;
    --accent-gold: #ffd93d;
    
    --text-bright: #ffffff;
    --text-primary: #e8e8f0;
    --text-muted: #8888a0;
    --text-dim: #555566;
    
    --glow-cyan: 0 0 20px rgba(0, 240, 255, 0.5), 0 0 40px rgba(0, 240, 255, 0.2);
    --glow-pink: 0 0 20px rgba(255, 45, 106, 0.5), 0 0 40px rgba(255, 45, 106, 0.2);
    
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 240, 255, 0.3);
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Rajdhani', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.5;
}

/* ═══════════════════════════════════════════════════════════════
   ATMOSPHERIC BACKGROUND
   ═══════════════════════════════════════════════════════════════ */

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(0, 240, 255, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(181, 55, 242, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 50% 30% at 50% 50%, rgba(255, 45, 106, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* Subtle grid overlay */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

/* Scanlines - very subtle */
.scanlines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    opacity: 0.5;
}

.crt-flicker {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════════════ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(180deg, var(--bg-primary) 0%, rgba(12, 12, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 2rem;
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: 1.4rem;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: var(--glow-cyan);
    animation: logo-pulse 3s ease-in-out infinite;
}

@keyframes logo-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(0, 240, 255, 0.4), 0 0 40px rgba(0, 240, 255, 0.2);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(0, 240, 255, 0.6), 0 0 60px rgba(0, 240, 255, 0.3);
        transform: scale(1.05);
    }
}

.nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
}

.nav-link:hover {
    color: var(--text-bright);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--accent-primary);
    background: rgba(0, 240, 255, 0.1);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent-primary);
    border-radius: 1px;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════════ */

.hero {
    padding: 5rem 2rem 4rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 900;
    font-size: clamp(2rem, 6vw, 4rem);
    margin-bottom: 1rem;
    letter-spacing: 4px;
}

.glitch {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 50%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.4));
    animation: text-shimmer 3s ease-in-out infinite;
}

@keyframes text-shimmer {
    0%, 100% { filter: drop-shadow(0 0 30px rgba(0, 240, 255, 0.4)); }
    50% { filter: drop-shadow(0 0 40px rgba(181, 55, 242, 0.5)); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    font-weight: 400;
    letter-spacing: 2px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.25rem 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    min-width: 120px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat:hover {
    border-color: var(--border-glow);
    transform: translateY(-2px);
}

.stat-value {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   MAIN & SECTIONS
   ═══════════════════════════════════════════════════════════════ */

.main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 1;
}

.section-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-bright);
    text-align: center;
    margin-bottom: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.title-decoration {
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 2px;
    box-shadow: 0 0 10px var(--accent-primary);
    animation: decoration-pulse 2s ease-in-out infinite;
    font-size: 0;
}

@keyframes decoration-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(0.8); }
}

.games-section,
.categories-section {
    margin-bottom: 5rem;
}

/* ═══════════════════════════════════════════════════════════════
   GAMES GRID
   ═══════════════════════════════════════════════════════════════ */

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

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    background: var(--bg-card);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    animation: float 4s ease-in-out infinite;
    filter: grayscale(0.3);
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-8px) rotate(-2deg); }
    75% { transform: translateY(-8px) rotate(2deg); }
}

.empty-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.empty-subtext {
    color: var(--text-dim);
    font-size: 1rem;
}

/* ═══════════════════════════════════════════════════════════════
   GAME CARD - Premium Design
   ═══════════════════════════════════════════════════════════════ */

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    backdrop-filter: blur(10px);
}

.game-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(0, 240, 255, 0.1) 0%, 
        transparent 50%, 
        rgba(181, 55, 242, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
    pointer-events: none;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--accent-primary);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(0, 240, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

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

.game-card-image {
    width: 100%;
    aspect-ratio: 16/12;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-primary));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.game-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.game-card:hover .game-card-image img {
    transform: scale(1.08);
}

.game-card-image .placeholder-icon {
    font-size: 3rem;
    opacity: 0.3;
}

.game-card-info {
    padding: 1rem 1.25rem;
    position: relative;
    z-index: 2;
}

.game-card-title {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-bright);
    margin-bottom: 0.25rem;
    line-height: 1.3;
}

.game-card-system {
    font-size: 0.8rem;
    color: var(--accent-primary);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.game-card-play {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    border-radius: var(--radius-md);
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    color: var(--bg-primary);
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 3;
}

.game-card-play .play-icon {
    font-size: 0.6rem;
}

.game-card:hover .game-card-play {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════
   CATEGORIES GRID
   ═══════════════════════════════════════════════════════════════ */

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

.category-card:hover::before {
    transform: scaleX(1);
}

.category-icon {
    font-size: 2rem;
    transition: transform 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.15);
}

.category-name {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.7rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.category-count {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--accent-primary);
}

/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */

.footer {
    border-top: 1px solid var(--border-subtle);
    padding: 3rem 2rem;
    text-align: center;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.3));
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer-text {
    font-family: 'Orbitron', sans-serif;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    letter-spacing: 2px;
}

.footer-subtext {
    font-size: 0.9rem;
    color: var(--text-dim);
    margin-bottom: 1.5rem;
}

.footer-decoration {
    display: flex;
    justify-content: center;
    gap: 4px;
}

.footer-decoration::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-primary), transparent);
    border-radius: 1px;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .hero {
        padding: 3rem 1rem 2rem;
    }
    
    .hero-stats {
        gap: 0.75rem;
    }
    
    .stat {
        padding: 1rem 1.25rem;
        min-width: 100px;
    }
    
    .stat-value {
        font-size: 1.4rem;
    }
    
    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }
    
    .game-card-play {
        display: none;
    }
    
    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.1rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */

.hidden {
    display: none !important;
}

.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Selection styling */
::selection {
    background: var(--accent-primary);
    color: var(--bg-primary);
}

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

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

::-webkit-scrollbar-thumb {
    background: var(--text-dim);
    border-radius: 4px;
}

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

/* ═══════════════════════════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════════════════════════ */

.search-container {
    max-width: 500px;
    margin: 0 auto 2rem auto;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

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

.search-input:focus {
    outline: none;
    border-color: var(--neon-cyan);
    box-shadow: 0 0 20px rgba(0, 245, 255, 0.3);
}
