﻿/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    --bg-dark: #0f0f13;
    --bg-card: #1a1a24;
    --primary: #7b2cbf;
    --primary-hover: #9d4edd;
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --border-color: #333333;
}

body.light-mode {
    --bg-dark: #f4f4f9;
    --bg-card: #ffffff;
    --text-main: #121212;
    --text-muted: #555555;
    --border-color: #dddddd;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Montserrat', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-dark) !important;
    color: var(--text-main) !important;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

/* =========================================
   HEADER Y NAVEGACIÓN (Estructura a prueba de fallos)
   ========================================= */
header {
    background-color: rgba(15, 15, 19, 0.95);
    padding: 1rem 5%;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}
body.light-mode header { background-color: rgba(244, 244, 249, 0.95); }

.logo a {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    font-weight: 900;
    color: var(--text-main) !important;
    text-decoration: none !important;
    letter-spacing: 1px;
}
.logo span { color: var(--primary) !important; }

nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--text-main) !important;
    text-decoration: none !important;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
    position: relative;
}

.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0;
    background-color: var(--primary); transition: width 0.3s;
}
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links a:hover { color: var(--primary) !important; }

.nav-actions { display: flex; align-items: center; gap: 1rem; }

.theme-btn {
    background: none; border: none; font-size: 1.5rem; cursor: pointer;
    transition: transform 0.3s;
}
.theme-btn:hover { transform: scale(1.2) rotate(15deg); }

/* Botón Hamburguesa (Oculto en PC) */
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    flex-direction: column; gap: 5px; z-index: 1001;
}
.hamburger span {
    display: block; width: 25px; height: 3px; background-color: var(--text-main);
    transition: all 0.3s ease;
}

/* =========================================
   CONTENIDO GENERAL
   ========================================= */
.hero {
    min-height: 80svh;
    display: flex; align-items: center; justify-content: center; text-align: center;
    background-size: cover; background-position: center; padding: 0 20px;
}
.hero-content { position: relative; z-index: 2; }
.hero h2 { font-size: clamp(2rem, 6vw, 3.5rem); font-weight: 900; margin-bottom: 1rem; text-transform: uppercase; color: #fff; text-shadow: 0 4px 10px rgba(0,0,0,0.8); }
.hero p { font-size: clamp(1rem, 2vw, 1.2rem); color: #ccc; margin-bottom: 2rem; }

.btn-primary {
    display: inline-block; background-color: var(--primary); color: white;
    padding: 1rem 2.5rem; text-decoration: none; font-weight: 700;
    border-radius: 5px; transition: all 0.3s; border: 2px solid transparent;
}
.btn-primary:hover { background-color: transparent; border-color: var(--primary); color: var(--primary); box-shadow: 0 0 15px var(--primary); transform: translateY(-3px); }

section { padding: clamp(3rem, 8vw, 5rem) 5%; }
.section-title { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: 2rem; border-left: 5px solid var(--primary); padding-left: 15px; }

/* Grids */
.games-grid, .streams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(clamp(250px, 100%, 300px), 1fr));
    gap: 1.5rem;
}

.game-card {
    height: clamp(300px, 40vh, 400px);
    border-radius: 10px; text-decoration: none; color: white;
    display: flex; align-items: flex-end; padding: 1.5rem;
    position: relative; overflow: hidden; transition: transform 0.3s;
}
.game-card:hover { transform: scale(1.02) translateY(-5px); }
.game-card::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.2));
    z-index: 1;
}
.card-content { position: relative; z-index: 2; }
.card-content h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); margin-bottom: 0.5rem; }
.card-content p { color: #ddd; margin-bottom: 1rem; font-size: 0.9rem; }

/* Fondos de tarjetas */
.bloodstrike-card { background: url('https://images.unsplash.com/photo-1538481199705-c710c4e965fc?auto=format&fit=crop&w=600&q=80') center/cover; }
.gtavi-card { background: url('https://images.unsplash.com/photo-1511512578047-dfb367046420?auto=format&fit=crop&w=600&q=80') center/cover; }
.cyberpunk-card { background: url('https://images.unsplash.com/photo-1605559911160-a3d95d213904?auto=format&fit=crop&w=600&q=80') center/cover; }
.valorant-card { background: url('https://images.unsplash.com/photo-1542751371-adc38448a05e?auto=format&fit=crop&w=600&q=80') center/cover; }

/* Streams */
.stream-card { background-color: var(--bg-card); border-radius: 8px; overflow: hidden; transition: transform 0.2s; cursor: pointer; }
.stream-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.3); }
.stream-thumbnail { width: 100%; height: 150px; }
.stream-info { padding: 1rem; display: flex; align-items: center; gap: 1rem; }
.avatar { width: 40px; height: 40px; border-radius: 50%; }
.stream-info h4 { font-size: 1rem; color: var(--text-main); }
.stream-info p { font-size: 0.8rem; color: var(--text-muted); }

footer { text-align: center; padding: 2rem; background-color: var(--bg-card); color: var(--text-muted); margin-top: 4rem; }

/* =========================================
   RESPONSIVE (Móvil)
   ========================================= */
@media (max-width: 850px) {
    .hamburger { display: flex; }
    
    .nav-links {
        position: fixed; top: 0; right: -100%; width: 70%; height: 100vh;
        background-color: var(--bg-dark) !important; flex-direction: column;
        justify-content: center; transition: right 0.4s ease;
        box-shadow: -5px 0 15px rgba(0,0,0,0.5); z-index: 999;
    }
    .nav-links.active { right: 0; }
    .nav-links a { margin: 1rem 0; font-size: 1.5rem; }

    /* Animación X */
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

