:root {
    --hytale-green: #4ade80;
    --bg-dark: #020617;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --bg-card: #1e293b;
    --bg-surface: #0f172a;
    --danger: #ef4444; /* Color rojo para offline y alertas */
    --accent: #3b82f6;
    --gold: #facc15;
}

* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }

body { 
    background: var(--bg-dark); 
    background-image: radial-gradient(circle at top right, #0f172a 0%, #000 100%);
    color: var(--text-main); 
    font-family: 'Poppins', sans-serif; 
    overflow-x: hidden; 
    padding-bottom: 80px; 
}

/* Scrollbar Personalizada */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

/* === BOTONES MAESTROS === */
button { font-family: 'Poppins', sans-serif; border: none; cursor: pointer; transition: all 0.2s ease; font-weight: 600; }

.btn-primary { 
    background: var(--hytale-green); color: #000; padding: 10px 25px; 
    border-radius: 8px; box-shadow: 0 0 15px rgba(74, 222, 128, 0.3); 
    border: 1px solid transparent;
}
.btn-primary:hover { background: #22c55e; transform: translateY(-2px); }

.btn-cancel { background: transparent; border: 1px solid #334155 !important; color: #94a3b8 !important; padding: 10px 20px; border-radius: 8px; }
.btn-cancel:hover { border-color: #fff !important; color: #fff !important; }

.btn-dark { 
    background: #0f172a; border: 1px solid #334155; color: #94a3b8; width: 100%; padding: 12px; border-radius: 8px; font-weight: 600; 
}
.btn-dark:hover { background: #1e293b; color: #fff; border-color: #64748b; }

.action-buttons { display: flex; gap: 8px; margin-left: auto; align-self: center; }
.btn-mini { padding: 6px 12px; border-radius: 6px; font-size: 0.75rem; }
.btn-edit { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.btn-del { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }

.btn-back { 
    background: rgba(2, 6, 23, 0.8); color: var(--hytale-green); border: 1px solid rgba(74, 222, 128, 0.3); 
    padding: 8px 25px; border-radius: 50px; margin-bottom: 25px; display: inline-flex; gap: 8px; align-items: center;
}

/* HEADER */
.premium-header { background: rgba(2, 6, 23, 0.85); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255,255,255,0.05); padding: 15px 0; position: sticky; top: 0; z-index: 1000; }
.header-container { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.logo { font-size: 1.6rem; font-weight: 900; color: #fff; cursor: pointer; letter-spacing: -1px; }
.logo span { color: var(--hytale-green); text-shadow: 0 0 10px rgba(74, 222, 128, 0.3); }

.main-nav { display: flex; align-items: center; gap: 5px; background: rgba(255,255,255,0.03); padding: 5px; border-radius: 50px; border: 1px solid rgba(255,255,255,0.05); }
.nav-btn { background: transparent; color: var(--text-muted); font-size: 0.95rem; padding: 8px 20px; font-weight: 500; border-radius: 20px; }
.nav-btn:hover { color: #fff; background: rgba(255,255,255,0.1); }
.btn-member { background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.3); color: var(--hytale-green); padding: 6px 18px; border-radius: 20px; }
.btn-member:hover { background: var(--hytale-green); color: #000; }

/* === LOGIN MODAL === */
.auth-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: rgba(2, 6, 23, 0.95); backdrop-filter: blur(8px); z-index: 5000; animation: fadeIn 0.3s ease; }
.auth-box { width: 100%; max-width: 400px; padding: 40px; text-align: center; display: flex; flex-direction: column; gap: 15px; box-shadow: 0 0 60px rgba(0,0,0,0.8); }
.glass-card { background: #0f172a; border: 1px solid rgba(74, 222, 128, 0.2); border-radius: 24px; }

.login-logo { font-size: 2.5rem; font-weight: 900; letter-spacing: -1px; color: #fff; margin-bottom: 10px; }
.login-logo span { color: var(--hytale-green); }

.auth-box input { width: 100%; padding: 15px; background: #1e293b; color: white; border: 1px solid #334155; border-radius: 8px; transition: 0.2s; }
.auth-box input:focus { border-color: var(--hytale-green); box-shadow: 0 0 10px rgba(74, 222, 128, 0.1); }

/* === BOX IP ACTUALIZADA (INTUITIVA) === */
.server-ip-box { 
    background: rgba(15, 23, 42, 0.8); 
    border: 2px solid rgba(255,255,255,0.1); 
    padding: 12px 25px; 
    border-radius: 100px; 
    display: inline-flex; 
    align-items: center; 
    gap: 15px; 
    cursor: pointer; 
    transition: 0.3s;
    backdrop-filter: blur(10px);
}
.server-ip-box:hover { 
    border-color: var(--hytale-green); 
    transform: translateY(-5px); 
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.2); 
}
.ip-icon { font-size: 1.5rem; }
.ip-text-group { display: flex; flex-direction: column; align-items: flex-start; }
.ip-address { font-family: 'Fira Code', monospace; font-size: 1.4rem; color: #fff; font-weight: 700; line-height: 1; }
.copy-hint { font-size: 0.65rem; color: var(--hytale-green); font-weight: 800; letter-spacing: 1px; margin-top: 4px; }

/* === LISTA NOTICIAS & VIDEOS === */
.news-row { 
    display: flex; 
    align-items: flex-start; 
    padding: 25px 0; 
    background: transparent; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); 
    cursor: pointer; 
    transition: 0.2s; 
    position: relative;
}
.news-row:hover { background: rgba(255, 255, 255, 0.02); transform: translateX(5px); }
.news-row img { 
    width: 260px; 
    height: 146px; 
    object-fit: cover; 
    border-radius: 4px; 
    margin-right: 25px; 
    border: 2px solid #1e293b; 
    flex-shrink: 0;
}

.news-row-info { flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.news-row-info h3 { font-size: 1.2rem; color: var(--gold); margin: 0 0 8px 0; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.news-excerpt { font-size: 0.95rem; color: #cbd5e1; margin-bottom: 10px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { font-size: 0.8rem; color: #64748b; font-weight: 600; margin-top: auto; text-transform: uppercase; }

/* === VÍDEOS === */
.video-thumbnail { 
    position: relative; 
    width: 260px; 
    height: 146px; 
    border-radius: 4px; 
    overflow: hidden; 
    margin-right: 25px; 
    border: 2px solid #1e293b; 
    flex-shrink: 0; 
}
.video-thumbnail img { width: 100%; height: 100%; margin: 0; border: none; object-fit: cover; }
.play-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.4); display: flex; align-items: center; justify-content: center; font-size: 2rem; color: #fff; opacity: 0.8; transition: 0.2s; }
.video-list-title { font-size: 1rem !important; color: #fff !important; }

/* === HERO SECTION === */
.hero-section { min-height: 75vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px 20px; animation: fadeIn 0.5s ease; }

/* ESTADOS DEL SERVIDOR */
.status-badge { background: rgba(74, 222, 128, 0.1); color: var(--hytale-green); border: 1px solid var(--hytale-green); padding: 5px 15px; border-radius: 50px; font-weight: 700; margin-bottom: 20px; letter-spacing: 0.5px; }
.status-badge.offline { background: rgba(239, 68, 68, 0.15); color: var(--danger); border: 1px solid var(--danger); }

.hero-title { font-size: 4rem; font-weight: 900; line-height: 1.1; margin-bottom: 20px; color: #fff; }
.hero-title span { color: transparent; -webkit-text-stroke: 2px var(--hytale-green); }
.hero-stats { display: flex; gap: 40px; margin-top: 50px; border-top: 1px solid rgba(255,255,255,0.05); padding-top: 30px; }
.stat-item { display: flex; flex-direction: column; align-items: center; }
.stat-item b { font-size: 1.5rem; color: #fff; font-family: 'Fira Code', monospace; }

.content-viewport { max-width: 1000px; margin: 0 auto; padding: 20px; animation: fadeIn 0.5s ease; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; margin-top: 20px; }
.section-header h2 { font-size: 2rem; font-weight: 700; color: #fff; }

/* MODALES */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.9); z-index: 4000; align-items: center; justify-content: center; backdrop-filter: blur(5px); }
.modal-content { width: 95%; max-width: 800px; background: #0f172a; padding: 30px; border-radius: 20px; border: 1px solid #334155; max-height: 90vh; overflow-y: auto; }
.modal-content label { color: var(--hytale-green); font-size: 0.85rem; font-weight: 700; margin-top: 15px; display: block; margin-bottom: 5px; }
.modal-content input, .modal-content select, .modal-content textarea { width: 100%; padding: 12px; background: #1e293b; color: white; border: 1px solid #334155; border-radius: 8px; font-family: 'Poppins', sans-serif; }
.modal-buttons { margin-top: 25px; display: flex; gap: 15px; justify-content: flex-end; }

/* === FOOTER (CORREGIDO TOTAL) === */
.cyber-footer { 
    position: fixed; 
    bottom: 0; 
    left: 0; 
    width: 100%; 
    background: rgba(2, 6, 23, 0.98); 
    border-top: 1px solid rgba(255,255,255,0.05); 
    padding: 15px 0; 
    z-index: 2000; 
    backdrop-filter: blur(10px);
}

.footer-content { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    gap: 20px; 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px;
    font-size: 0.8rem; 
    color: #64748b;
    white-space: nowrap;
}

.footer-link { 
    color: #64748b; 
    text-decoration: none; 
    transition: 0.2s; 
    font-weight: 600; 
}

.footer-link:hover { 
    color: var(--hytale-green); 
}

/* FILTERS & PAGINATION */
.filter-bar { display: flex; gap: 10px; margin-bottom: 20px; overflow-x: auto; padding-bottom: 5px; }
.filter-pill { background: rgba(30, 41, 59, 0.5); border: 1px solid #334155; color: #94a3b8; padding: 5px 15px; border-radius: 50px; font-size: 0.8rem; font-weight: 500; white-space: nowrap; cursor: pointer; transition: 0.2s;}
.filter-pill.active { background: var(--hytale-green); color: #000; border-color: var(--hytale-green); }
.pagination-controls { display: flex; justify-content: center; align-items: center; gap: 15px; margin-top: 30px; }

/* MÓVIL */
@media (max-width: 768px) {
    .hero-title { font-size: 2.5rem; }
    .news-row { flex-direction: column; align-items: flex-start; }
    .news-row img, .video-thumbnail { width: 100%; height: auto; aspect-ratio: 16/9; margin: 0 0 15px 0; }
    .header-container { flex-direction: column; gap: 15px; text-align: center; }
    
    /* Footer en móvil: mantenemos línea pero quitamos divisores si los hay para que quepa */
    .footer-content { 
        gap: 12px; 
        font-size: 0.7rem; 
        flex-wrap: wrap;
    }
    /* Ocultamos las barras verticales del HTML usando selectores nth-child para mayor limpieza */
    .footer-content span:nth-of-type(2), 
    .footer-content span:nth-of-type(4) { 
        display: none; 
    }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }