:root {
    --naranja: #FFAA00;
    --blanco: #FFFFFF;
    --oscuro-puro: #050505;
    --gris-suave: #aaaaaa;
    --fuente-titulo: 'Montserrat', sans-serif;
    --fuente-texto: 'Open Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--oscuro-puro);
    color: var(--blanco);
    font-family: var(--fuente-texto);
    overflow-x: hidden;
}

/* --- NAVBAR --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 9999;
}

.nav-left { display: flex; align-items: center; gap: 30px; }

.ip-widget {
    background: rgba(255, 170, 0, 0.05);
    border: 1px solid rgba(255, 170, 0, 0.2);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center; gap: 10px;
}

.ip-widget:hover {
    background: rgba(255, 170, 0, 0.15);
    box-shadow: 0 0 15px rgba(255, 170, 0, 0.2);
}

.status-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}

.nav-links { display: flex; gap: 20px; }
.nav-links a {
    color: var(--gris-suave);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: 0.3s;
    position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--naranja); }

/* --- BRANDING --- */
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--fuente-titulo); font-size: 1.2rem; }
.survify { color: var(--blanco); }
.labs { color: var(--naranja); }
.mini-logo { height: 30px; width: auto; }

/* --- HERO & BANNERS --- */
.hero-full {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('../assets/banners/main-banner.webp') no-repeat center center/cover;
    position: relative;
    padding: 0 20px;
}

.banner-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), var(--oscuro-puro));
    z-index: 1;
}

.hero-content { position: relative; z-index: 10; }
.hero-content h1 {
    font-family: var(--fuente-titulo);
    font-size: clamp(2.2rem, 8vw, 3.8rem);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

/* NUEVO: Indicador de Scroll Animado */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--gris-suave);
    font-size: 0.8rem;
    animation: bounce 2s infinite;
    z-index: 10;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translate(-50%, 0);}
    40% {transform: translate(-50%, -10px);}
    60% {transform: translate(-50%, -5px);}
}

/* --- BOTONES --- */
.social-links { margin-top: 30px; display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.social-btn {
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    display: flex;
    align-items: center; gap: 10px;
    transition: 0.3s ease;
    cursor: pointer;
    border: none;
}

.discord { background: #5865F2; color: white; }
.tiktok { background: #000; border: 1px solid #fff; color: white; }
.store { background: linear-gradient(45deg, var(--naranja), #ffcc00); color: #000 !important; }

.social-btn:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 8px 15px rgba(0,0,0,0.3); 
}

/* --- ESTRUCTURA DE PÁGINAS --- */
.container { 
    padding: 140px 10% 60px; 
    min-height: 100vh;
}

.page-header { text-align: center; margin-bottom: 50px; }
.page-title { 
    font-family: var(--fuente-titulo); 
    font-size: clamp(1.8rem, 5vw, 2.8rem); 
    text-transform: uppercase; 
    margin-bottom: 15px;
}

/* --- GLASS CARDS & GRID --- */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 15px;
    padding: 30px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px); 
    border-color: var(--naranja);
    background: rgba(255, 170, 0, 0.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
}

/* --- SECCIÓN NOTICIAS --- */
.news-card {
    padding: 0 !important; 
    display: flex; flex-direction: column; overflow: hidden;
}

.news-img {
    width: 100%; height: 190px; overflow: hidden;
    border-bottom: 1px solid rgba(255, 170, 0, 0.1);
}

.news-img img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.news-card:hover .news-img img { transform: scale(1.1); }

.news-info { padding: 22px; flex-grow: 1; display: flex; flex-direction: column; }

.news-meta {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
}

.news-date { font-size: 0.8rem; color: var(--gris-suave); }

.badge-news {
    padding: 3px 10px; border-radius: 5px; font-size: 0.65rem; font-weight: 800; text-transform: uppercase;
}

.badge-news.anuncio {
    background: rgba(255, 170, 0, 0.15); color: var(--naranja); border: 1px solid var(--naranja);
}

.badge-news.evento {
    background: rgba(85, 255, 255, 0.1); color: #55FFFF; border: 1px solid rgba(85, 255, 255, 0.3);
}

.btn-news {
    margin-top: auto; color: var(--naranja); text-decoration: none; font-weight: 700;
    font-size: 0.85rem; display: flex; align-items: center; gap: 6px; transition: 0.3s;
}

.btn-news:hover { gap: 12px; text-shadow: 0 0 8px rgba(255, 170, 0, 0.4); }

/* --- PORTAFOLIO: IMAGEN COMPLETA --- */
.project-card { 
    padding: 0 !important; 
    overflow: hidden; 
    display: flex; 
    flex-direction: column;
    height: 100%; /* Asegura que todas las cards tengan la misma base */
}

/* --- PORTAFOLIO: RELLENO TOTAL SIN ESPACIOS --- */
.project-img {
    width: 100%; 
    height: 200px; /* Altura fija para que todas las cards se vean iguales y ordenadas */
    overflow: hidden; 
    border-bottom: 1px solid rgba(255, 170, 0, 0.15);
    background: #000; 
}

.project-img img { 
    width: 100%; 
    height: 100%; 
    /* 'cover' estira la imagen hasta que no quede ni un solo hueco a los lados */
    object-fit: cover; 
    /* IMPORTANTE: Esto le dice al navegador que NO recorte la parte de arriba. 
       Así se verán siempre los títulos o la parte superior de tus diseños. */
    object-position: top center; 
    transition: transform 0.5s ease; 
}

.project-card:hover .project-img img { 
    transform: scale(1.08); /* Un pequeño zoom para dar elegancia */
}
.project-info { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.tag {
    background: rgba(255, 170, 0, 0.1); color: var(--naranja); font-size: 0.7rem; font-weight: 700;
    padding: 4px 10px; border-radius: 4px; border: 1px solid rgba(255, 170, 0, 0.2); text-transform: uppercase;
}
.btn-buy {
    margin-top: auto; background: #5865F2; color: white; text-decoration: none; text-align: center;
    padding: 12px; border-radius: 10px; font-weight: 700; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: 0.3s;
}
.btn-buy:hover { background: #4752c4; transform: translateY(-2px); box-shadow: 0 5px 15px rgba(88, 101, 242, 0.4); }

/* --- CHANGELOGS --- */
.log-container { display: flex; flex-direction: column; gap: 30px; max-width: 850px; margin: 0 auto; }
.log-entry { padding: 25px !important; border-left: 4px solid rgba(255, 170, 0, 0.2); }
.log-header {
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding-bottom: 15px; margin-bottom: 20px;
}
.log-version {
    background: var(--naranja); color: #000; padding: 5px 15px; border-radius: 8px;
    font-weight: 800; font-size: 0.9rem; box-shadow: 0 4px 10px rgba(255, 170, 0, 0.2);
}
.log-date { color: var(--gris-suave); font-size: 0.85rem; font-weight: 600; }
.log-items { list-style: none; }
.log-items li {
    margin-bottom: 15px; display: flex; align-items: flex-start; gap: 15px;
    line-height: 1.6; color: #f0f0f0; transition: 0.2s;
}
.log-items li:hover { transform: translateX(8px); color: var(--blanco); }
.log-items li i { font-size: 1.2rem; margin-top: 2px; }
.log-items li i.add { color: #55FF55; filter: drop-shadow(0 0 8px rgba(85, 255, 85, 0.5)); }
.log-items li i.fix { color: #FF5555; filter: drop-shadow(0 0 8px rgba(255, 85, 85, 0.5)); }
.log-items li i.imp { color: #55FFFF; filter: drop-shadow(0 0 8px rgba(85, 255, 255, 0.5)); }

/* --- SISTEMA DE JUGADORES --- */
.player-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 20px; margin-top: 30px;
}
.player-head {
    display: flex; flex-direction: column; align-items: center; background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05); padding: 20px 10px; border-radius: 12px; transition: 0.3s;
}
.player-head:hover { background: rgba(255, 170, 0, 0.1); transform: scale(1.05); border-color: var(--naranja); }
.player-head img {
    width: 48px; height: 48px; margin-bottom: 12px; image-rendering: pixelated;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,0.3));
}
.player-head span {
    font-size: 0.85rem; font-weight: 600; color: var(--blanco);
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* --- SECCIÓN SOCIAL --- */
.comment-system { margin-top: 40px; }
.comment-input-area {
    display: flex; flex-direction: column; gap: 15px; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 25px; margin-bottom: 25px;
}
.comment-input-area textarea {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 15px; color: white; resize: none;
    height: 120px; font-family: inherit; outline: none; transition: 0.3s;
}
.comment-input-area textarea:focus { border-color: var(--naranja); }

/* NUEVO: Alineación botón publicar */
.input-actions {
    display: flex;
    justify-content: flex-end;
}

.comment-item {
    background: rgba(255,255,255,0.02); padding: 18px; border-radius: 12px;
    margin-bottom: 15px; border: 1px solid rgba(255,255,255,0.05);
}
.comment-user { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.comment-user img { 
    border-radius: 4px; 
    width: 32px; height: 32px; 
    image-rendering: pixelated; 
}

/* NUEVO: Modal de Identidad */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    display: none; /* JS lo muestra */
    align-items: center; justify-content: center; z-index: 10000;
}

.modal-content {
    max-width: 400px; width: 90%; text-align: center;
    padding: 40px !important;
}

.nick-input-group {
    display: flex; align-items: center; gap: 15px; background: rgba(0,0,0,0.3);
    padding: 12px; border-radius: 12px; margin: 25px 0; border: 1px solid rgba(255,255,255,0.1);
}

.nick-input-group input {
    background: transparent; border: none; color: white; outline: none;
    width: 100%; font-family: inherit; font-size: 1rem;
}

#preview-head {
    width: 32px; height: 32px; image-rendering: pixelated; border-radius: 4px;
}

/* --- ANIMACIONES & OTROS --- */
.reveal { opacity: 0; transform: translateY(20px); transition: 0.8s ease-out; }
.reveal.visible { opacity: 1; transform: translateY(0); }

#bg-canvas {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none;
}

.player-count { 
    color: var(--naranja); font-family: 'Courier New', Courier, monospace; font-weight: bold; 
}



/* Estilos para el Leer Más */
.project-details {
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--gris-suave);
    transition: all 0.3s ease;
}

.project-details summary {
    list-style: none; /* Quita la flecha por defecto de HTML */
    cursor: pointer;
    font-weight: 600;
    color: var(--naranja);
    display: flex;
    align-items: center;
    gap: 5px;
    outline: none;
    user-select: none;
    margin-bottom: 10px;
}

/* Animación de la flechita */
.project-details i {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
}

.project-details[open] i {
    transform: rotate(180deg);
}

.details-content {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px;
    border-radius: 8px;
    border-left: 2px solid var(--naranja);
    animation: fadeIn 0.4s ease forwards;
}

.details-content p {
    margin-bottom: 8px;
    color: var(--blanco);
}

.details-content ul {
    list-style: none;
    padding-left: 5px;
}

.details-content li {
    margin-bottom: 5px;
    font-size: 0.85rem;
}

.details-content li strong {
    color: var(--naranja);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* =========================================
   MEDIA QUERIES - RESPONSIVE DESIGN
   ========================================= */

/* Móviles y Tablets verticales (Menos de 768px) */
@media (max-width: 768px) {
    .navbar {
        padding: 10px 15px;
        flex-direction: column; /* Apilamos logo y enlaces */
        gap: 15px;
        height: auto;
    }

    .nav-left {
        width: 100%;
        flex-direction: column; /* La IP arriba y los links abajo */
        align-items: center;
        gap: 15px;
    }

    .nav-links {
        display: flex; /* CAMBIO: Ahora sí se muestran */
        flex-wrap: wrap; /* Si son muchos, pasan a la siguiente línea */
        justify-content: center;
        gap: 12px;
    }

    .nav-links a {
        font-size: 0.8rem; /* Un poco más pequeños para que quepan */
    }

    .nav-right {
        width: 100%;
        display: flex;
        justify-content: center;
        order: -1; /* El logo de SurvifyLabs sube al principio */
    }

    /* Ajuste de IP Widget para que no ocupe toda la pantalla */
    .ip-widget {
        width: fit-content;
    }

    /* Hero */
    .hero-content h1 {
        font-size: 2rem;
    }

    /* Container: Aumentamos el padding superior porque el navbar ahora es más alto */
    .container {
        padding: 180px 15px 40px; 
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    /* Widget de usuario (Login) en la esquina inferior para que no moleste */
    #user-auth-widget {
        top: auto !important;
        bottom: 20px !important;
        right: 15px !important;
        left: 15px !important;
        text-align: center;
    }
}
