/* =========================================
   1. CONFIGURACIÓN BÁSICA Y VARIABLES
   ========================================= */
:root {
    --header-height: 70px;
    --color-bg-dark: #0b0b0b;      /* Fondo principal */
    --color-bg-card: #151b26;      /* Fondo de tarjetas y modales */
    --color-accent: #2AB8A6;       /* Turquesa Celestial */
    --color-accent-hover: #3edcd5; /* Turquesa más claro al pasar mouse */
    --color-text-main: #e0e0e0;
    --color-text-muted: #aaa;
    --font-main: 'Roboto Condensed', sans-serif;
    --font-title: 'Cinzel', serif; /* Fuente épica para títulos */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg-dark);
    color: var(--color-text-main);
    overflow-x: hidden; /* Evita scroll lateral indeseado */
}

a { text-decoration: none; color: inherit; transition: all 0.3s ease; }
ul { list-style: none; }

/* =========================================
   2. HEADER (BARRA DE NAVEGACIÓN)
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    
    /* === CAMBIO DE TRANSPARENCIA === */
    /* Antes era 0.9 (muy oscuro), ahora es 0.4 (más transparente) */
    background-color: rgba(0, 0, 0, 0.5); 
    
    /* El blur hace que lo que pase por detrás se vea borroso (efecto cristal) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    
    /* Borde inferior más sutil */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

/* Lado Izquierdo: Logo y Menú */
.header-left, .nav-container {
    display: flex;
    align-items: center;
    height: 100%;
}

.logo-nav {
    height: 40px;
    margin-right: 25px;
    filter: drop-shadow(0 0 5px rgba(42, 184, 166, 0.4));
    transition: transform 0.3s;
}
.logo-nav:hover { transform: scale(1.1); }

.nav-container nav ul {
    display: flex;
    gap: 25px;
}

.nav-container nav a {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ccc;
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-container nav a:hover {
    color: var(--color-accent);
    text-shadow: 0 0 8px rgba(42, 184, 166, 0.6);
}

.nav-container nav a i {
    font-size: 12px;
    transition: transform 0.3s;
}
.nav-container nav a:hover i { transform: rotate(-45deg); }

/* Lado Derecho: Botones */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Botón Discord */
.discord-btn {
    font-size: 26px;
    color: #7289da; /* Color oficial Discord antiguo */
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.05);
}
.discord-btn:hover {
    background-color: #5865F2; /* Color oficial Discord nuevo */
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 0 10px #5865F2;
}

/* Botón Descargar */
.btn-jugar {
    background-color: var(--color-accent);
    color: white;
    font-weight: 700;
    padding: 10px 24px;
    border-radius: 4px;
    text-transform: uppercase;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 0 15px rgba(42, 184, 166, 0.2);
    border: 1px solid transparent;
}

.btn-jugar:hover {
    background-color: var(--color-accent-hover);
    box-shadow: 0 0 20px rgba(42, 184, 166, 0.6);
    transform: scale(1.05);
}

/* =========================================
   3. HERO SECTION (PORTADA)
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: var(--header-height);
    overflow: hidden;
}

/* Video de fondo */
.video-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
}

.hero-video {
    width: 100%; height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, rgba(0,0,0,0.1) 100%);
}

/* Contenido Central */
.hero-content {
    position: relative;
    z-index: 2;
    padding-left: 10%;
    max-width: 800px;
}

.hero-logo img {
    max-width: 320px; /* Tamaño ajustado del logo */
    margin-bottom: 20px;
    filter: drop-shadow(0 0 20px rgba(42, 184, 166, 0.5));
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

.hero-title {
    font-family: var(--font-title);
    font-size: 52px;
    line-height: 1.1;
    color: #fff;
    text-transform: uppercase;
    margin-bottom: 30px;
    text-shadow: 3px 3px 0 #000;
    letter-spacing: 2px;
}

.btn-cta {
    background: linear-gradient(90deg, #2AB8A6 0%, #178073 100%);
    color: white;
    font-size: 20px;
    font-weight: 700;
    padding: 16px 45px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    border: 1px solid #4ffaf0;
    transition: all 0.3s;
    font-family: var(--font-main);
}

.btn-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 35px rgba(42, 184, 166, 0.8);
    background: linear-gradient(90deg, #3edcd5 0%, #2AB8A6 100%);
}

/* Indicador de Scroll */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.8;
    z-index: 10;
}
.scroll-indicator i {
    display: block;
    font-size: 20px;
    margin-top: 10px;
    animation: bounce 2s infinite;
}
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* =========================================
   4. SECCIÓN DE NOTICIAS (GRID)
   ========================================= */
.content-categories {
    padding: 80px 20px;
    background: radial-gradient(circle at top, #1a1a1a 0%, #0b0b0b 70%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    font-family: var(--font-title);
    font-size: 38px;
    text-align: center;
    color: white;
    margin-bottom: 50px;
    position: relative;
    letter-spacing: 2px;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px; 
    background: var(--color-accent); margin: 15px auto 0;
    box-shadow: 0 0 10px var(--color-accent);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: var(--color-bg-card);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
}
.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.card-img {
    height: 180px;
    overflow: hidden;
    background-color: #000;
    position: relative;
}
.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.card:hover .card-img img { transform: scale(1.1); }

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-family: var(--font-title);
    font-size: 20px;
    color: var(--color-accent);
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-content p {
    color: var(--color-text-muted);
    font-size: 13px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.read-more {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 5px;
}
.card:hover .read-more { color: var(--color-accent); }
.card:hover .read-more i { transform: translateX(5px); }

/* =========================================
   5. MODALES Y FORMULARIOS
   ========================================= */
/* Fondo oscuro general del modal */
.modal-overlay {
    display: none; /* Se activa con JS (display: flex) */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease-out;
}
@keyframes fadeIn { from {opacity:0;} to {opacity:1;} }

/* Caja del modal */
.modal-box {
    background: var(--color-bg-card);
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 500px;
    position: relative;
    border: 1px solid #333;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    max-height: 90vh;
    overflow-y: auto;
}

/* Botón cerrar (X) */
.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}
.modal-close:hover { color: var(--color-accent); }

/* --- Estilos Formulario Registro --- */
.register-title {
    text-align: center;
    color: var(--color-accent);
    margin-bottom: 20px;
    font-family: var(--font-title);
    font-size: 24px;
    text-transform: uppercase;
}

label {
    font-size: 13px;
    color: #ccc;
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.register-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    background: #0b0b0b;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    font-family: var(--font-main);
}

.register-input:focus {
    border-color: var(--color-accent);
    outline: none;
    box-shadow: 0 0 5px rgba(42, 184, 166, 0.3);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
}
.checkbox-container a {
    color: var(--color-accent);
    text-decoration: underline;
}

.register-btn {
    width: 100%;
    padding: 12px;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
    transition: 0.3s;
}
.register-btn:hover {
    background: var(--color-accent-hover);
    box-shadow: 0 0 15px rgba(42, 184, 166, 0.4);
}

/* --- Alertas PHP --- */
.alert {
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    line-height: 1.4;
}
.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid #dc3545;
    color: #ff868e;
}
.alert-success {
    background: rgba(25, 135, 84, 0.1);
    border: 1px solid #198754;
    color: #75b798;
}

/* --- Modal Noticias (Lectura) --- */
.news-modal-box {
    max-width: 800px; /* Más ancho para leer */
}
.modal-news-img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #333;
}
.modal-news-title {
    color: var(--color-accent);
    font-family: var(--font-title);
    font-size: 28px;
    margin-bottom: 10px;
    line-height: 1.2;
}
.modal-news-meta {
    color: #777;
    font-size: 13px;
    margin-bottom: 20px;
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}
.modal-news-content {
    line-height: 1.8;
    color: #ddd;
    font-size: 15px;
    text-align: justify;
}

/* =========================================
   6. RESPONSIVE (MÓVILES)
   ========================================= */
@media (max-width: 900px) {
    /* Header Simplificado */
    .nav-container nav { display: none; } /* Ocultar menú enlaces */
    
    .hero-content {
        padding: 0 20px;
        text-align: center;
        align-items: center;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-logo img {
        max-width: 220px;
    }
    
    .btn-cta {
        width: 100%;
        font-size: 18px;
        padding: 15px;
    }

    .header-right span {
        display: none; /* Ocultar texto de botones si es necesario */
    }
}