/* ==========================================================================
   ArcadeX - Core Design System & Styling
   ========================================================================== */

:root {
    --bg-main: #070a12;
    --bg-surface: #0e1424;
    --bg-card: #131b30;
    --bg-card-hover: #1a2542;
    --primary: #00f0ff;      /* Neon Cyan */
    --primary-glow: rgba(0, 240, 255, 0.35);
    --secondary: #ff0055;    /* Neon Pink */
    --secondary-glow: rgba(255, 0, 85, 0.35);
    --accent: #ffd700;       /* Neon Gold */
    --success: #00ff66;      /* Neon Green */
    --text-light: #f8fafc;
    --text-muted: #94a3b8;
    --border-subtle: rgba(255, 255, 255, 0.07);
    --font-heading: 'Orbitron', -apple-system, sans-serif;
    --font-body: 'Poppins', -apple-system, sans-serif;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
    text-decoration: none;
    list-style: none;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-main);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    background-image: 
        radial-gradient(circle at 15% 20%, rgba(0, 240, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 85% 60%, rgba(255, 0, 85, 0.05) 0%, transparent 40%);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-card-hover);
    border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* --- Container Utility --- */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header / Navigation --- */
header {
    background: rgba(7, 10, 18, 0.85);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    transition: var(--transition);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
}

.logo i {
    color: var(--primary);
    font-size: 1.8rem;
    filter: drop-shadow(0 0 10px var(--primary));
}

.logo span {
    color: var(--primary);
    text-shadow: 0 0 12px var(--primary);
}

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

.search-bar {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    padding: 9px 18px;
    display: flex;
    align-items: center;
    width: 320px;
    transition: var(--transition);
}

.search-bar:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    background: rgba(255, 255, 255, 0.07);
}

.search-bar i {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.search-bar input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 100%;
    margin-left: 10px;
    font-size: 0.95rem;
}

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

.nav-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(0, 255, 102, 0.1);
    color: var(--success);
    border: 1px solid rgba(0, 255, 102, 0.25);
    padding: 6px 14px;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.nav-badge .pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--success);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.3); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.7; }
}

/* --- Hero Section --- */
.hero {
    margin-top: 85px;
    padding: 30px 20px 20px;
}

.featured-banner {
    position: relative;
    width: 100%;
    min-height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 50px;
    background: url('https://images.unsplash.com/photo-1542751371-adc38448a05e?q=80&w=2070&auto=format&fit=crop') center/cover no-repeat;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-subtle);
}

.featured-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, #070a12 0%, rgba(7, 10, 18, 0.85) 50%, rgba(7, 10, 18, 0.3) 100%);
}

.featured-content {
    position: relative;
    z-index: 10;
    max-width: 550px;
}

.badge {
    background: var(--success);
    color: #000;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 0 15px rgba(0, 255, 102, 0.4);
}

.featured-content h1 {
    font-family: var(--font-heading);
    font-size: 3.4rem;
    line-height: 1.1;
    margin-bottom: 16px;
    color: #fff;
    text-shadow: 0 0 25px rgba(0, 240, 255, 0.3);
}

.featured-content p {
    color: var(--text-muted);
    margin-bottom: 28px;
    font-size: 1.05rem;
    line-height: 1.6;
}

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

.play-btn {
    background: linear-gradient(45deg, var(--success), #00c94e);
    color: #000;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 800;
    padding: 14px 34px;
    border-radius: var(--radius-full);
    border: none;
    cursor: pointer;
    box-shadow: 0 0 25px rgba(0, 255, 102, 0.4);
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.play-btn:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 0 35px rgba(0, 255, 102, 0.7);
}

.info-pill {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--text-light);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* --- Quick Stats Bar --- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 25px auto;
}

.stat-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 16px 20px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: var(--transition);
}

.stat-item:hover {
    border-color: rgba(0, 240, 255, 0.3);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 240, 255, 0.1);
    color: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-info h4 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: #fff;
}

.stat-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Category Filters --- */
.categories-wrapper {
    margin: 30px auto 25px;
}

.categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: none;
}
.categories::-webkit-scrollbar { display: none; }

.cat-btn {
    background: var(--bg-surface);
    color: var(--text-light);
    border: 1px solid var(--border-subtle);
    padding: 10px 22px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cat-btn i {
    font-size: 0.85rem;
    color: var(--text-muted);
    transition: var(--transition);
}

.cat-btn.active, .cat-btn:hover {
    background: var(--primary);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 16px var(--primary-glow);
}

.cat-btn.active i, .cat-btn:hover i {
    color: #000;
}

/* --- Games Section --- */
.games-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
}

.section-title i {
    color: var(--secondary);
    filter: drop-shadow(0 0 8px var(--secondary));
}

.games-count {
    font-size: 0.9rem;
    color: var(--text-muted);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    padding: 6px 14px;
    border-radius: var(--radius-full);
}

.game-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

/* --- Game Card --- */
.game-card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    transition: var(--transition);
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px var(--primary-glow);
}

.card-media {
    position: relative;
    width: 100%;
    height: 175px;
    overflow: hidden;
    background: #000;
}

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

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

.card-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(7, 10, 18, 0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: var(--transition);
    backdrop-filter: blur(2px);
}

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

.play-icon {
    background: var(--primary);
    color: #000;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.35rem;
    padding-left: 4px;
    box-shadow: 0 0 20px var(--primary);
    transition: var(--transition);
}

.game-card:hover .play-icon {
    transform: scale(1.1);
}

.card-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--secondary);
    color: white;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    box-shadow: 0 0 10px var(--secondary-glow);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.card-badge.badge-new {
    background: var(--primary);
    color: #000;
    box-shadow: 0 0 10px var(--primary-glow);
}

.card-badge.badge-popular {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}

.game-info {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.game-info h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

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

.game-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-top: 1px solid var(--border-subtle);
    padding-top: 12px;
}

.game-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.game-meta .rating {
    color: var(--accent);
    font-weight: 700;
}

/* --- Empty Search State --- */
.empty-state {
    display: none;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px dashed var(--border-subtle);
}

.empty-state i {
    font-size: 3.5rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.empty-state h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* --- Footer --- */
footer {
    background: #05070e;
    border-top: 1px solid var(--border-subtle);
    padding: 40px 0 25px;
    margin-top: auto;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 25px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 6px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

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

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* --- Responsive Adjustments --- */
@media (max-width: 900px) {
    .featured-banner {
        padding: 30px;
        min-height: 350px;
    }
    .featured-content h1 {
        font-size: 2.6rem;
    }
    .search-bar {
        width: 240px;
    }
}

@media (max-width: 768px) {
    .nav-badge {
        display: none;
    }
    .search-bar {
        width: 180px;
        padding: 7px 14px;
    }
    .featured-banner {
        min-height: 320px;
        padding: 24px;
    }
    .featured-content h1 {
        font-size: 2.1rem;
    }
    .play-btn {
        padding: 12px 26px;
        font-size: 0.95rem;
    }
    .game-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 16px;
    }
    .footer-content {
        flex-direction: column;
        align-items: flex-start;
    }
}
