/* ==========================================================================
   ARCADE HUB - juegos.testeomiweb.cl
   Design System & Premium Aesthetics
   ========================================================================== */

:root {
    --bg-dark: #070913;
    --bg-card: rgba(16, 22, 42, 0.75);
    --bg-card-hover: rgba(25, 34, 65, 0.9);
    --border-color: rgba(0, 229, 255, 0.2);
    --border-glow: rgba(0, 229, 255, 0.6);
    
    --primary: #00e5ff;
    --primary-glow: rgba(0, 229, 255, 0.4);
    --secondary: #ff0077;
    --secondary-glow: rgba(255, 0, 119, 0.4);
    --accent: #ffea00;
    --accent-glow: rgba(255, 234, 0, 0.4);
    --success: #00ff88;
    
    --text-main: #f0f4ff;
    --text-muted: #8a99ad;
    --font-heading: 'Orbitron', 'Rajdhani', sans-serif;
    --font-body: 'Rajdhani', sans-serif;
    --font-arcade: 'Press Start 2P', monospace;
}

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

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    min-height: 100vh;
    overflow-x: hidden;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 229, 255, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 85%, rgba(255, 0, 119, 0.08) 0%, transparent 40%),
        linear-gradient(rgba(7, 9, 19, 0.92), rgba(7, 9, 19, 0.96));
    background-attachment: fixed;
}

/* Background Cyber Grid Lines */
.cyber-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    background-size: 40px 40px;
    background-image: 
        linear-gradient(to right, rgba(0, 229, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(0, 229, 255, 0.03) 1px, transparent 1px);
}

.container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 2rem 1.5rem 5rem 1.5rem;
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Header & Hero Section
   ========================================================================== */

header {
    text-align: center;
    padding: 3rem 1rem 2.5rem 1rem;
    position: relative;
}

.brand-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--primary);
    border-radius: 50px;
    color: var(--primary);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    box-shadow: 0 0 15px var(--primary-glow);
    margin-bottom: 1.2rem;
    animation: pulseGlow 3s infinite alternate;
}

@keyframes pulseGlow {
    0% { box-shadow: 0 0 10px var(--primary-glow); }
    100% { box-shadow: 0 0 25px var(--primary-glow), 0 0 5px var(--primary); }
}

.main-title {
    font-family: var(--font-heading);
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    letter-spacing: 3px;
    text-transform: uppercase;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.3);
    margin-bottom: 0.8rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-weight: 500;
    max-width: 650px;
    margin: 0 auto 2rem auto;
}

/* Stats Counter Bar */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-item {
    background: rgba(16, 22, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.75rem 1.8rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.stat-num {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ==========================================================================
   Controls Section (Search & Filter Tabs)
   ========================================================================== */

.controls-wrapper {
    background: rgba(16, 22, 42, 0.5);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.25rem;
    backdrop-filter: blur(15px);
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.search-box {
    position: relative;
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 1rem 1.2rem 1rem 3rem;
    background: rgba(7, 9, 19, 0.8);
    border: 1px solid rgba(0, 229, 255, 0.3);
    border-radius: 10px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

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

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 1.2rem;
    pointer-events: none;
}

.filter-tabs {
    display: flex;
    gap: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.3rem;
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.tab-btn {
    padding: 0.6rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.tab-btn:hover {
    background: rgba(0, 229, 255, 0.15);
    color: #fff;
    border-color: rgba(0, 229, 255, 0.4);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary), #0099ff);
    color: #000;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

/* ==========================================================================
   Games Grid & Cards
   ========================================================================== */

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

.game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
}

.game-card:hover {
    transform: translateY(-8px) scale(1.02);
    background: var(--bg-card-hover);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 25px var(--primary-glow);
}

.card-banner {
    height: 180px;
    background: linear-gradient(135deg, rgba(10, 20, 45, 0.9), rgba(20, 10, 35, 0.9));
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.banner-icon-bg {
    font-size: 5rem;
    opacity: 0.85;
    filter: drop-shadow(0 0 15px rgba(0, 229, 255, 0.5));
    transition: transform 0.5s ease;
}

.game-card:hover .banner-icon-bg {
    transform: scale(1.15) rotate(5deg);
}

.card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-3d {
    background: rgba(255, 0, 119, 0.2);
    border: 1px solid var(--secondary);
    color: var(--secondary);
    box-shadow: 0 0 10px var(--secondary-glow);
}

.badge-classic {
    background: rgba(255, 234, 0, 0.2);
    border: 1px solid var(--accent);
    color: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.badge-python {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid var(--success);
    color: var(--success);
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.btn-python-play {
    background: linear-gradient(135deg, #10b981, #047857) !important;
    color: #fff !important;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3) !important;
}

.btn-python-play:hover {
    background: linear-gradient(135deg, #34d399, #059669) !important;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5) !important;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.game-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
}

.game-desc {
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1.25rem;
    flex-grow: 1;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
}

.tag {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    color: #b0c4de;
}

.card-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
}

.btn-play {
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, var(--primary), #0088ff);
    color: #000;
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-play:hover {
    background: linear-gradient(135deg, #00ffff, var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-icon {
    padding: 0.85rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-icon:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
    color: var(--primary);
}

/* Empty search results state */
.no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: 16px;
    color: var(--text-muted);
}

/* ==========================================================================
   Footer (Strict Rule: © 2026 Desarrollado por repositorIA)
   ========================================================================== */

footer {
    margin-top: 5rem;
    text-align: center;
    padding: 2.5rem 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(5, 7, 15, 0.95);
    position: relative;
    z-index: 1;
}

.footer-text {
    font-size: 1rem;
    color: var(--text-muted);
    letter-spacing: 1px;
}

.footer-domain {
    font-family: var(--font-heading);
    color: var(--primary);
    font-weight: 700;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .main-title {
        font-size: 2rem;
    }
    .games-grid {
        grid-template-columns: 1fr;
    }
    .stats-bar {
        gap: 1rem;
    }
    .stat-item {
        padding: 0.5rem 1rem;
    }
}
