/* templates/classic/css/main.css */

/* --- IMPORTACIÓN DE FUENTES --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');
/* Se asume que Cinzel ya está cargada globalmente o en el head */

/* --- 1. RESET Y BASE --- */
body {
    background-color: #f4f6f8 !important; /* Fondo gris claro general */
    color: #333;
    /* CAMBIO: Fuente Poppins para todo el cuerpo */
    font-family: 'Poppins', sans-serif !important;
    overflow-x: hidden;
    margin: 0; padding: 20;
}

a { text-decoration: none !important; transition: 0.2s; }

/* --- 2. NAVBAR --- */
.navbar {
    background-color: #111 !important; /* Fondo Negro/Oscuro */
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    padding-top: 15px !important; 
    padding-bottom: 15px !important;
    border-bottom: 2px solid #d32f2f; /* Un detalle rojo sutil abajo del menú */
}

.navbar-brand { 
    color: #fff !important; 
    font-weight: 700 !important; 
    text-transform: uppercase; 
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif !important; /* Aseguramos Poppins */
}

.nav-link { 
    color: #ccc !important; /* Gris claro */
    font-weight: 600 !important; 
    text-transform: uppercase; 
    font-size: 0.85rem;
    margin-left: 10px;
    font-family: 'Poppins', sans-serif !important;
}

.nav-link:hover, .nav-link.active { 
    color: #fff !important; /* Blanco al pasar el mouse */
}

/* --- 3. HERO SECTION --- */
.hero-container {
    margin-top: 80px; 
    padding-bottom: 60px;
    min-height: 60vh;
}
.hero-header { margin-bottom: 40px; }

/* TÍTULO PRINCIPAL CON EFECTO METAL (Cinzel) */
.title-main {
    font-family: 'Cinzel', serif !important;
    font-size: 3.5rem; 
    font-weight: 900; /* Bien grueso para el efecto */
    margin-bottom: 15px; 
    letter-spacing: -1px; 
    line-height: 1.1;
    text-transform: uppercase;

    /* Efecto Metal Oscuro */
    background: linear-gradient(
        135deg, 
        #444444 0%, 
        #000000 40%, 
        #222222 70%, 
        #555555 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    
    /* Sombra suave */
    filter: drop-shadow(0px 4px 3px rgba(0,0,0,0.2));
}

.description-text {
    font-size: 1.05rem; color: #666; line-height: 1.7; margin-bottom: 30px;
}

/* --- 4. WIDGETS --- */
.widget-title {
    /* Usamos Cinzel para los títulos de widgets también */
    font-family: 'Cinzel', serif !important;
    font-size: 1.3rem; 
    font-weight: 700; 
    color: #111;
    margin-bottom: 20px; 
    border-left: 4px solid #d32f2f;
    padding-left: 12px; 
    line-height: 1;
    text-transform: uppercase;
}

.server-status-widget { margin-bottom: 50px; }
.status-label { font-weight: 700; font-size: 0.9rem; display: block; margin-bottom: 8px; }
.status-label.on { color: #2e7d32; }
.status-label.off { color: #d32f2f; }
.progress-track {
    width: 100%; max-width: 280px; height: 6px;
    background: #e9ecef; border-radius: 3px; margin-bottom: 8px;
}
.progress-fill { height: 100%; background: #d32f2f; border-radius: 3px; }
.online-count { font-size: 0.8rem; color: #888; font-weight: 600; }

/* NOTICIAS */
.latest-news-widget { margin-top: 30px; }
.news-list-clean { display: flex; flex-direction: column; gap: 10px; }
.news-item-link {
    display: block; background: #fff; border: 1px solid #eee;
    padding: 12px 18px; border-radius: 6px; color: #444;
}
.news-item-link:hover { border-color: #d32f2f; transform: translateX(5px); color: #000; }
.news-row { display: flex; align-items: center; width: 100%; font-size: 0.9rem; }
.news-date { font-weight: 700; color: #111; min-width: 90px; }
.news-sep { margin: 0 10px; color: #ddd; }
.news-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 500; color: #555; }
.news-icon { margin-left: auto; font-size: 0.75rem; color: #ccc; }

/* IMAGEN FLOTANTE */
.hero-image-wrapper { position: absolute; right: 20%; top: 120px; z-index: 10; animation: floatHero 6s ease-in-out infinite; }
.hero-img {
    max-width: 100%; height: auto; max-height: 500px;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.15));
}
@keyframes floatHero {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- 5. RANKINGS --- */
.rankings-section { padding-top: 40px; padding-bottom: 80px; }

/* TÍTULO DE RANKING CON EFECTO METAL */
.rank-main-title { 
    font-family: 'Cinzel', serif !important;
    font-size: 2.8rem; 
    font-weight: 900; 
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: -1px;

    /* Efecto Metal Oscuro */
    background: linear-gradient(
        135deg, 
        #444444 0%, 
        #000000 40%, 
        #222222 70%, 
        #555555 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent !important;
    
    filter: drop-shadow(0px 4px 3px rgba(0,0,0,0.2));
}

.rank-subtitle { color: #777; margin-bottom: 40px; font-size: 1rem; }
.rank-card {
    background: #fff; border: 1px solid #eee; border-radius: 6px;
    overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.03); height: 100%; 
}
.rank-header-box {
    background-color: #000; color: #fff; padding: 12px 15px;
    display: flex; justify-content: space-between; align-items: center;
    font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px;
    /* Headers de tablas pequeños se quedan en Poppins para legibilidad */
    font-family: 'Poppins', sans-serif !important; 
}
.rank-list { background: #fff; padding: 0; }
.rank-row {
    display: flex; align-items: center; padding: 10px 15px;
    border-bottom: 1px solid #f9f9f9;
}
.rank-row:last-child { border-bottom: none; }
.r-num { width: 25px; font-weight: 700; color: #aaa; font-size: 0.9rem; }
.r-info { flex: 1; display: flex; align-items: center; gap: 10px; overflow: hidden; }
.r-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    object-fit: cover; background: #f4f4f4; border: 1px solid #eee; flex-shrink: 0;
}
.r-data { display: flex; flex-direction: column; justify-content: center; line-height: 1.1; overflow: hidden; }
.r-name { font-weight: 700; color: #222; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-val { font-weight: 700; color: #000; font-size: 0.9rem; text-align: right; min-width: 40px; }

/* --- 6. SUBPAGES --- */
.subpage-container { min-height: 60vh; }
.content-box-clean {
    background: #fff; padding: 40px; border-radius: 8px;
    border: 1px solid #eee; box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}

/* --- MARKETPLACE MODULE (Classic Dark Style) --- */

.market-section-classic {
    padding: 60px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: linear-gradient(to bottom, #0a0a0a 0%, #111 100%);
    position: relative;
}

.market-ticker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.market-empty-state {
    color: #666;
    font-family: 'Poppins', sans-serif;
    grid-column: 1 / -1;
    padding: 40px;
    border: 1px dashed #333;
    border-radius: 8px;
}

/* --- TARJETA DE ITEM (Home) --- */
.market-card-classic {
    background: rgba(25, 25, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.market-card-classic:hover {
    transform: translateY(-5px);
    border-color: #d32f2f; /* Rojo/Dorado al hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

.mc-img-box {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    margin-bottom: 10px;
}

.mc-name {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ccc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 5px;
}

.mc-price {
    font-family: 'Poppins', sans-serif;
    color: #ffd700;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.mc-btn-buy {
    background: #000;
    border: 1px solid #333;
    color: #fff;
    width: 100%;
    padding: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: 0.2s;
    cursor: pointer;
}
.market-card-classic:hover .mc-btn-buy {
    background: #d32f2f;
    border-color: #d32f2f;
}

/* --- BOTÓN VER TODO --- */
.btn-market-full {
    background: transparent;
    border: 1px solid #444;
    color: #fff;
    padding: 12px 30px;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: 0.3s;
    cursor: pointer;
}
.btn-market-full:hover {
    background: #fff;
    color: #000;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

/* --- MODAL (Dark Glass Overlay) --- */
.ws-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 9999;
    display: none; /* Oculto por defecto */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.ws-modal-content {
    background: #111;
    width: 100%; max-width: 1100px; height: 85vh;
    border: 1px solid #333;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    display: flex; flex-direction: column;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.btn-ws-close {
    position: absolute; top: 15px; right: 15px;
    background: transparent; border: none; color: #fff;
    font-size: 1.5rem; cursor: pointer; z-index: 10;
}

.ws-workspace {
    display: flex; height: 100%;
}

/* Sidebar */
.ws-sidebar-left {
    width: 250px;
    background: #080808;
    border-right: 1px solid #222;
    display: flex; flex-direction: column;
}

.cat-header {
    padding: 20px; font-family: 'Cinzel', serif; font-weight: 700;
    color: #ffd700; border-bottom: 1px solid #222;
    text-align: center; font-size: 1.1rem;
}

.cat-list-scroll {
    flex: 1; overflow-y: auto; padding: 10px;
}

.cat-btn {
    display: block; width: 100%; text-align: left;
    background: transparent; border: none;
    color: #888; padding: 12px 15px;
    font-family: 'Poppins', sans-serif; font-size: 0.9rem;
    transition: 0.2s; cursor: pointer; border-radius: 4px;
}
.cat-btn:hover, .cat-btn.active {
    background: #1a1a1a; color: #fff;
}
.cat-btn i { width: 25px; text-align: center; color: #d32f2f; }

/* Panel Central */
.ws-center-panel {
    flex: 1; display: flex; flex-direction: column; position: relative;
    background: url('../img/misc/register.jpg') no-repeat center center; /* Fondo sutil */
    background-size: cover;
}
.ws-center-panel::before {
    content:''; position: absolute; top:0; left:0; width:100%; height:100%;
    background: rgba(10,10,10,0.95); /* Oscurecer fondo */
}

.center-toolbar {
    padding: 15px; border-bottom: 1px solid #222;
    position: relative; z-index: 2;
    background: rgba(0,0,0,0.5);
}

.search-wrapper-market {
    position: relative; max-width: 400px;
}
.search-wrapper-market input {
    width: 100%; background: #000; border: 1px solid #333;
    color: #fff; padding: 10px 10px 10px 40px; border-radius: 4px;
    font-family: 'Poppins', sans-serif;
}
.search-wrapper-market i {
    position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #666;
}

.item-grid-container {
    flex: 1; overflow-y: auto; padding: 20px;
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px; position: relative; z-index: 2;
}

/* Placeholder cuando no hay cat seleccionada */
.market-placeholder {
    grid-column: 1 / -1; text-align: center; margin-top: 100px;
    color: #444;
}
.market-placeholder i { font-size: 4rem; margin-bottom: 20px; opacity: 0.3; }

/* Loader */
.loading-overlay {
    position: absolute; top:0; left:0; width:100%; height:100%;
    background: rgba(0,0,0,0.8); z-index: 5;
    display: none; justify-content: center; align-items: center;
}

/* --- ALERTAS Y CONFIRMACIÓN --- */
.alert-modal-overlay, .confirm-modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 10000;
    display: none; justify-content: center; align-items: center;
}

.alert-box-classic, .confirm-box-classic {
    background: #151515; border: 1px solid #333;
    padding: 30px; width: 400px; text-align: center;
    border-radius: 6px; box-shadow: 0 0 30px rgba(0,0,0,0.8);
}

.alert-box-classic h3, .confirm-title {
    font-family: 'Cinzel', serif; color: #d32f2f; margin-bottom: 15px;
}
.alert-box-classic p, .confirm-body {
    color: #ccc; font-family: 'Poppins', sans-serif; margin-bottom: 25px;
}

.btn-alert-ok, .btn-confirm-yes {
    background: #d32f2f; color: #fff; border: none;
    padding: 10px 25px; cursor: pointer; font-weight: 700;
}
.btn-confirm-no {
    background: transparent; color: #888; border: 1px solid #444;
    padding: 10px 25px; cursor: pointer; margin-right: 10px;
}

/* TOOLTIP GLOBAL (Si no existe) */
#global-tt {
    position: fixed; background: rgba(0,0,0,0.9); border: 1px solid #444;
    color: #fff; padding: 10px; z-index: 10002; display: none;
    pointer-events: none; font-size: 0.85rem; max-width: 300px;
}

/* --- ARREGLO DE BOTONES MODAL CONFIRMACIÓN --- */
        .confirm-btns {
            display: flex !important;           /* Activa modo flexible */
            flex-direction: row !important;     /* Fuerza dirección horizontal */
            justify-content: center !important; /* Centra los botones */
            align-items: center !important;
            gap: 20px !important;               /* Espacio entre botones */
            margin-top: 25px !important;
        }

        /* Ajuste para que los botones no ocupen todo el ancho y se vean parejos */
        .btn-confirm-yes, .btn-confirm-no {
            width: auto !important;             /* Ancho automático según texto */
            min-width: 140px !important;        /* Ancho mínimo para uniformidad */
            margin: 0 !important;               /* Quitamos márgenes viejos */
        }
        
        /* =========================================================
   STREAMERS WIDGET (ADAPTADO PARA CLASSIC)
   ========================================================= */

/* Contenedor Flotante del Botón */
#streamWidgetRoot {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Botón Flotante */
.stream-float-btn {
    background: #111; /* Negro sólido para contraste en tema claro */
    color: #fff;
    border: 1px solid #333;
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    font-size: 13px;
    text-transform: uppercase;
    font-family: 'Poppins', sans-serif;
}

.stream-float-btn:hover {
    background: #FF8A3B; /* Naranja Mu Online */
    border-color: #FF8A3B;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 138, 59, 0.3);
}

.stream-float-btn svg {
    width: 18px;
    height: 18px;
}

/* Panel Desplegable */
.stream-panel-container {
    display: none; /* Oculto por defecto, se activa con JS */
    flex-direction: column;
    width: 320px;
    max-height: 400px;
    background: #fff; /* Fondo blanco acorde al tema Classic */
    border: 1px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin-bottom: 10px; /* Separación del botón */
    animation: slideUpStream 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Animación de apertura */
@keyframes slideUpStream {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cabecera del Panel */
.stream-panel-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #eee;
    font-weight: 700;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Cinzel', serif; /* Mantener tipografía del template */
    font-size: 14px;
}

.stream-panel-header svg {
    color: #FF8A3B; /* Icono naranja */
}

/* Lista de Streamers */
.stream-list {
    padding: 10px;
    overflow-y: auto;
    background: #fff;
}

/* Item Individual de Streamer */
.stream-item {
    margin-bottom: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    background: #fafafa;
}

.stream-item:last-child {
    margin-bottom: 0;
}

/* Etiqueta de Usuario */
.stream-user-label {
    padding: 8px 12px;
    background: #fff;
    border-bottom: 1px solid #eee;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Contenedor del Iframe (Aspect Ratio) */
.stream-embed-responsive {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.stream-embed-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Ajuste Mobile */
@media (max-width: 768px) {
    #streamWidgetRoot {
        left: 10px;
        bottom: 10px;
        z-index: 99999; /* Asegurar que esté sobre todo en mobile */
    }
    .stream-panel-container {
        width: 280px; /* Un poco más angosto en móviles */
    }
}