/******************************************************************
*
*   Índice del Archivo CSS
*
*   Puedes usar la función de búsqueda (Ctrl+F o Cmd+F) con
*   los números de sección (ej. "3.5.") para navegar
*   rápidamente a la parte del código que desees.
*
*******************************************************************
*
*   1. CONFIGURACIÓN GLOBAL Y ESTILOS BASE
*      1.1. Importación de Fuentes
*      1.2. Variables CSS (Custom Properties)
*      1.3. Estilos Base del Body
*      1.4. Scrollbar Personalizado
*
*   2. ESTRUCTURA PRINCIPAL (LAYOUT)
*
*   3. COMPONENTES
*      3.1. Barra Superior y Reloj
*      3.2. Temporizadores Principales (Panel Izquierdo)
*      3.3. Barra de Estado (Inferior Izquierda)
*      3.4. Lista de Spawns (Panel Derecho)
*      3.5. Banners de Héroes
*      3.6. Lista de Eventos (Panel Derecho)
*      3.7. Botones e Iconos Interactivos
*      3.8. Modales (Estructura General)
*          3.8.1. Modal de Héroe
*          3.8.2. Modal de Información y 'Acerca de'
*          3.8.3. Modal de Sincronización
*          3.8.4. Modal de Configuración
*          3.8.5. Modal de Streams
*          3.8.6. Modal de Selección de Idioma
*          3.8.7. Modal de Configuración de Cuenta (NUEVO)
*                3.8.7.1 Estilos para la lista de suscripciones activas
*          3.8.8. MODAL: LOGIN REQUERIDO ---
*      3.9. Panel de Detalles de Evento (Lateral Derecho)
*      3.10. Botón Flotante (FAB) de Twitch
*      3.11. Estilos para el Widget de Usuario
*      3.12. Pantalla de Carga (Splash Screen)
*
*   4. CLASES DE UTILIDAD Y MODIFICADORES
*      4.1. Colores por Rareza (Texto y Fondo)
*      4.2. Colores por Elemento/Rol
*      4.3. Modificadores de Color de Texto
*
*   5. ANIMACIONES (KEYFRAMES)
*
*   6. DISEÑO ADAPTATIVO (MEDIA QUERIES)
*      6.1. Ajustes Generales de Layout Móvil
*      6.2. Componentes en Móvil
*      6.3. Estilos del Swiper (Específico para Móvil)
*
******************************************************************/

/* --- 1. CONFIGURACIÓN GLOBAL Y ESTILOS BASE --- */

/* --- 1.1. Importación de Fuentes --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap');

/* --- 1.2. Variables CSS (Custom Properties) --- */
:root {
    /* Paleta de Colores Principal */
    --bg-color: #1a1a1a;
    --box-bg-color: #242424;
    --border-color: #3a3a3a;
    --text-color: #e0e0e0;
    --text-muted-color: #888;

    /* Colores de Estado y Alertas */
    --color-urgent: #ff5252;
    --color-warning: #ffd740;
    --color-normal: #40c4ff;
    --color-primary: #bb86fc;
    --color-success: #69f0ae;
    --color-danger: #ff8a80;

    /* Colores por Rol/Elemento */
    --color-fire-role: #ff7043;
    --color-water-role: #29b6f6;
    --color-poison-role: #9ccc65;
    --color-lightning-role: #ffee58;
    --color-typeless-role: #78909c;
    --color-dark-role: #ab47bc;
    --color-default-role: #78909c;

    /* Colores por Rareza */
    --rarity1-color: #d500f9; /* Exalted - Morado */
    --rarity2-color: #536dfe; /* Revered - Azul Oscuro */
    --rarity3-color: #77bcdc; /* Famed - Azul Claro */

    --rarity1-bg-color: rgb(210, 21, 244);
    --rarity2-bg-color: rgb(42 62 177);
    --rarity3-bg-color: rgb(76, 193, 247);
    --color-exalted-gold: #ffd700;
    --color-primary-rgb: 187, 134, 252;


    /* Fondos para Modales por Rareza */
    --rarity1-modal-bg: rgba(210, 21, 244, 0.15);
    --rarity2-modal-bg: rgba(42, 62, 177, 0.15);
    --rarity3-modal-bg: rgba(76, 193, 247, 0.15);
    
}

/* --- 1.3. Estilos Base del Body --- */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
}

body {
    min-height: 100vh; /* vh = viewport height */
    display: flex;
    flex-direction: column;
}

/* Hacemos que el contenedor principal crezca para ocupar el espacio sobrante */
.main-wrapper {
    flex-grow: 1;
}

#mobile-header {
    display: none;
}

/* --- 1.4. Scrollbar Personalizado --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--box-bg-color);
}
::-webkit-scrollbar-thumb {
    background-color: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

/* --- FIN DE CONFIGURACIÓN GLOBAL Y ESTILOS BASE --- */


/* --- 2. ESTRUCTURA PRINCIPAL (LAYOUT) --- */

.app-container {
    display: flex;
    flex-direction: row;
    gap: 15px;
    align-items: flex-start;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-wrapper {
    display: flex;
    background-color: var(--box-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    height: 600px;
    transition: width 0.3s ease;
}

.primary-panel {
    width: 380px;
    padding: 25px 30px;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.secondary-panel {
    width: 480px;
    border-left: 1px solid var(--border-color);
    transition: opacity 0.3s ease, width 0.3s ease;
    display: flex;
    flex-direction: column;
}

.panel-subtitle {
    font-size: 1.2em;
    color: var(--color-primary);
    text-align: center;
    margin: 15px 0 10px 0;
}

.panel-subtitle-small {
    font-size: 1.0em;
    color: var(--color-primary);
    margin: 0;
    font-weight: 700;
}

/* --- FIN DE ESTRUCTURA PRINCIPAL --- */


/* --- 3. COMPONENTES --- */

/* --- 3.1. Barra Superior y Reloj --- */
.top-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.top-bar-left {
    justify-self: start;
}

.top-bar-center {
    justify-self: center;
}

.top-bar-right {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 15px;
}

#current-time {
    display: flex;
    justify-content: space-evenly;
    padding-left: 20px;
    align-items: center;
    width: 170px;
    min-height: 36px;
}

.datetime-stack {
    display: flex;
    flex-direction: column;
    text-align: center;
    line-height: 1.2;
    color: var(--text-muted-color);
    font-size: 0.9em;
}

#current-time .timezone-abbr {
    font-size: 1.1em;
    opacity: 0.7;
    color: var(--text-muted-color);
}

/* --- Switch de Formato de Hora --- */
.time-format-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8em;
    color: var(--text-muted-color);
}

.time-format-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 18px;
}

.time-format-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #3a3a3a;
    transition: .4s;
    border-radius: 18px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--color-normal);
}

input:checked+.slider:before {
    transform: translateX(16px);
}

/* --- 3.2. Temporizadores Principales (Panel Izquierdo) --- */
#primary-timers-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    margin-bottom: 50px; /* Espacio para la barra de estado */
}

.primary-timer-item {
    text-align: center;
    width: 100%;
}

.primary-timer-item .timer-image {
    margin: 0 auto 15px;
    border: 2px solid var(--border-color);
    background-color: #333;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.primary-timer-item .ticket-image {
    margin: 0 auto 15px;
    width: 50px;
    height: 50px;
    color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.primary-timer-item .timer-image img,
.primary-timer-item .timer-image svg,
.primary-timer-item .ticket-image img,
.primary-timer-item .ticket-image svg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timer-name-container,
.spawn-item-name-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-timer-item .timer-name,
.spawn-item-name {
    margin: 0;
}

.primary-timer-item .timer-countdown-container,
.spawn-item .countdown-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-timer-item .timer-name {
    font-weight: 700;
    margin: 0 0 8px 0;
    color: var(--text-color);
}

.timer-target-time {
    font-size: 0.7em;
    color: var(--text-muted-color);
    font-weight: normal;
}

.primary-timer-item .timer-desc {
    color: var(--text-muted-color);
    font-size: 0.9em;
    margin: 0 0 15px 0;
}

.primary-timer-item .timer-countdown {
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin: 0;
}

/* Modificador: Temporizador Principal Grande */
.primary-timer-item.main .timer-image {
    width: 100px;
    height: 100px;
    border-radius: 16px;
}
.primary-timer-item.main .timer-name {
    font-size: 1.8em;
}
.primary-timer-item.main .timer-name-container {
    margin-bottom: 8px;
}
.primary-timer-item.main .timer-countdown {
    font-size: 2.5em;
}

/* Modificador: Temporizador Secundario Pequeño */
.primary-timer-item.secondary {
    opacity: 0.8;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}
.primary-timer-item.secondary .timer-image,
.primary-timer-item.secondary .ticket-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 10px;
    border-width: 1px;
}
.primary-timer-item.secondary .timer-name {
    font-size: 1.1em;
}
.primary-timer-item.secondary .timer-name-container {
    margin-bottom: 8px;
}
.primary-timer-item.secondary .timer-countdown {
    font-size: 1.5em;
}
.primary-timer-item.secondary .timer-desc {
    font-size: 0.8em;
    margin-bottom: 10px;
}


/* --- 3.3. Barra de Estado (Inferior Izquierda) --- */
#status-bar {
    padding: 10px 20px;
    background-color: #1f1f1f;
    text-align: left;
    font-size: 0.8em;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 0 0 0 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
#status-bar span {
    color: var(--text-muted-color);
}


/* --- 3.4. Lista de Spawns (Panel Derecho) --- */
#timers-container {
    flex-grow: 1;
    overflow-y: auto;
}

.spawn-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid var(--border-color);
    transition: opacity 0.3s ease;
}

.spawn-item:last-child {
    border-bottom: none;
}

.spawn-item.disabled {
    opacity: 0.5;
}

.spawn-item-icon {
    width: 32px;
    height: 32px;
    margin-right: 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.spawn-item-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.spawn-item-info {
    flex-grow: 1;
}

.spawn-item-name-container {
    justify-content: flex-start;
}

.spawn-item-name {
    font-size: 1.1em;
    color: var(--text-color);
}

.spawn-item-time {
    font-size: 0.9em;
    color: var(--text-muted-color);
    margin: 0;
}

.spawn-item .countdown-container {
    justify-content: flex-end;
}

.countdown-timer {
    font-size: 1.0em;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

#sticky-ticket-container {
    padding: 0 18px; /* Coincide con el padding horizontal de los spawn-item */
}

#sticky-ticket-container .ticket-item {
    /* Ajusta el padding para que no se duplique y elimina el borde superior */
    padding-left: 0;
    padding-right: 0;
    /* Mantenemos el borde inferior para separarlo de la lista de jefes */
    border-bottom: 1px solid var(--border-color);
}

/* --- Ticket Items (Variación de Spawn Item) --- */
.ticket-item {
    border-bottom: 1px solid var(--border-color);
}

.ticket-item .item-icon {
    width: 24px;
    height: 24px;
    margin-right: 15px;
    border: none;
    color: var(--color-primary);
}


/* --- 3.5. Banners de Héroes --- */
#banners-container {
    display: flex;
    flex-direction: column;
    background-color: var(--box-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    min-height: 148px;
    box-sizing: border-box;
}

#banners-container.horizontal-layout {
    flex-direction: row;
}

.banner-section {
    flex: 1;
    text-align: center;
    padding: 15px;
}

.banner-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 10px;
    padding: 0 5px;
}

.banner-countdown {
    font-size: 0.8em;
    color: var(--color-warning);
}

.banner-box {
    position: relative;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    height: 120px;
    overflow: hidden;
    background-color: #333;
}

.banner-element-icon {
    display: none;
}

.banner-heroes {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-left: 0;
    z-index: 1;
}

.banner-hero-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.banner-hero-img-container {
    position: relative;
    width: 80px;
    height: 80px;
    cursor: pointer;
}

.banner-hero-img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: outline-color 0.2s ease;
    outline: 3px solid transparent;
    outline-offset: -3px;
}

.banner-hero-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-hero-img-container:hover .rarity-1 { outline-color: var(--rarity1-color); }
.banner-hero-img-container:hover .rarity-2 { outline-color: var(--rarity2-color); }
.banner-hero-img-container:hover .rarity-3 { outline-color: var(--rarity3-color); }

.banner-hero-name {
    font-size: 0.8em;
    color: var(--text-color);
    font-weight: 700;
}

.hero-role-icon {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    padding: 1px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.5);
}

.hero-role-icon img {
    width: 16px;
    height: 16px;
}

/* --- Fondos de Banner por Elemento --- */
.banner-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    z-index: 0;
}
.banner-bg-fire::before { background: radial-gradient(ellipse, transparent 20%, rgba(227, 63, 14, 0.25) 100%); }
.banner-bg-water::before { background: radial-gradient(ellipse, transparent 20%, rgba(41, 182, 246, 0.2) 100%); }
.banner-bg-poison::before { background: radial-gradient(ellipse, transparent 20%, rgba(156, 204, 101, 0.2) 100%); }
.banner-bg-lightning::before { background: radial-gradient(ellipse, transparent 20%, rgba(255, 238, 88, 0.2) 100%); }
.banner-bg-typeless::before { background: radial-gradient(ellipse, transparent 20%, rgba(120, 144, 156, 0.15) 100%); }
.banner-bg-dark::before { background: radial-gradient(ellipse, transparent 20%, rgba(171, 71, 188, 0.2) 100%); }


/* --- 3.6. Lista de Eventos (Panel Derecho) --- */
#events-container,
#weekly-container {
    padding: 2px 10px 2px;
    border-bottom: 1px solid var(--border-color);
}

#weekly-container {
    padding-top: 2px;
}

.event-item,
.weekly-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85em;
    transition: background-color 0.2s;
    cursor: pointer;
    padding: 8px 10px;
    margin: 0 -10px;
    border-radius: 6px;
}

.event-item:not(:last-child),
.weekly-item:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.event-item:hover,
.weekly-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.event-name,
.weekly-name {
    color: var(--text-color);
}

.event-countdown,
.weekly-countdown {
    color: var(--color-warning);
}

.weekly-item-info {
    display: flex;
    flex-direction: column;
}

.weekly-category {
    font-size: 0.8em;
    color: var(--text-muted-color);
}


.event-tip {
    background-color: var(--color-primary);
    color: var(--bg-color);
    font-size: 0.7em;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: bold;
    margin-left: 8px;
    vertical-align: middle;
}

.event-tip.small-tip {
    font-size: 0.6em;
    padding: 1px 5px;
    vertical-align: text-top; /* Alinea mejor con el texto */
}


/* --- 3.7. Botones e Iconos Interactivos --- */
.info-button,
.sync-button {
    cursor: pointer;
    color: var(--text-muted-color);
    width: 18px;
    height: 18px;
    transition: color 0.2s ease;
}

.info-button:hover,
.sync-button:hover {
    color: var(--color-normal);
}

.alert-toggle {
    cursor: pointer;
    margin-left: 20px;
    width: 24px;
    height: 24px;
    transition: color 0.2s ease, opacity 0.2s ease;
}

.alert-toggle.enabled {
    color: var(--color-normal);
}

.alert-toggle.disabled {
    color: var(--text-muted-color);
    opacity: 0.6;
}

#settings-button {
    width: 28px;
    height: 28px;
    color: var(--text-muted-color);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.3s ease;
}

#settings-button:hover {
    color: var(--text-color);
    transform: rotate(45deg);
}

#about-button {
    cursor: pointer;
    width: 24px;
    height: 24px;
    color: var(--text-muted-color);
    transition: color 0.2s ease, background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

#about-button:hover {
    color: var(--text-color);
    background-color: var(--border-color);
}

#about-button svg {
    width: 20px;
    height: 20px;
}


/* --- 3.8. Modales (Estructura General) --- */
#modal-overlay,
#info-modal-overlay,
#sync-modal-overlay,
#about-modal-overlay,
#hero-modal-overlay,
#streams-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#modal-overlay.visible,
#info-modal-overlay.visible,
#sync-modal-overlay.visible,
#about-modal-overlay.visible,
#hero-modal-overlay.visible,
#streams-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#settings-modal,
#info-modal,
#sync-modal,
#about-modal {
    background-color: var(--box-bg-color);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-muted-color);
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s ease;
}

.modal-close-btn:hover {
    color: var(--text-color);
}

#modal-overlay.visible #settings-modal,
#info-modal-overlay.visible #info-modal,
#sync-modal-overlay.visible #sync-modal,
#about-modal-overlay.visible #about-modal,
#streams-modal-overlay.visible #streams-modal {
    transform: scale(1);
    margin-left: 10px;
    margin-right: 10px;
}

#settings-modal h2,
#info-modal h2,
#sync-modal h2,
#about-modal h2 {
    margin-top: 0;
    color: var(--color-primary);
    text-align: center;

}

/* --- 3.8.1. Modal de Héroe --- */
#hero-modal-overlay {
    background-color: rgba(0, 0, 0, 0.85);
    cursor: default;
}

#hero-modal-content {
    position: relative; 
    max-width: 450px;
    max-height: 95vh; 
    padding: 10px;
    text-align: center;
    cursor: default;
    background-color: var(--box-bg-color);
    border-radius: 12px;
    border: 3px solid transparent;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.7);
    transition: border-color 0.3s ease;
}

#hero-modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
}
#hero-modal-close-btn:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}
#hero-modal-close-btn svg {
    width: 24px;
    height: 24px;
}

.hero-modal-nav-btn {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 10;
    background-color: rgba(20, 20, 20, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: none; 
    opacity: 0.7;
    transition: all 0.2s ease;
}
.hero-modal-nav-btn.visible {
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-modal-nav-btn:hover {
    opacity: 1;
    background-color: rgba(20, 20, 20, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.05);
}
.hero-modal-nav-btn svg {
    width: 28px;
    height: 28px;
}
.hero-modal-nav-btn.prev { left: 15px; }
.hero-modal-nav-btn.next { right: 15px; }

#hero-modal-image {
    display: block;
    width: auto; height: auto;
    max-width: 100%;
    max-height: calc(95vh - 220px); 
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#hero-modal-info {
    margin-top: 15px;
    padding: 10px 15px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

#hero-modal-tag {
    color: var(--color-normal);
    font-size: 1em;
    margin: 0 0 8px 0;
    font-weight: bold;
    display: none;
}
#hero-modal-tag.visible { display: block; }

#hero-modal-name {
    font-size: 1.5em;
    font-weight: 700;
    margin: 0 0 10px 0;
    transition: color 0.3s ease;
}

/* Contenedor principal de detalles */
#hero-modal-details-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px; /* Espacio entre las dos filas */
    margin: 10px 0;
}

/* Estilo para ambas filas */
.hero-modal-details-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

/* Estilo para los items de la primera fila */
.hero-modal-details-row > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-modal-details-row img {
    width: 28px;
    height: 28px;
}

.hero-modal-details-row span {
    font-weight: bold;
}

/* Estilos específicos para la segunda fila (solo texto) */
.secondary-details {
    font-size: 0.9em;
    color: var(--text-muted-color);
    gap: 15px;
}
.secondary-details span:not(:empty)::after {
    content: '•';
    margin-left: 15px;
    color: var(--border-color);
}
.secondary-details span:last-child::after {
    content: '';
    margin-left: 0;
}


#hero-modal-previews {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    flex-wrap: wrap; 
}
.hero-preview-item {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.hero-preview-item:hover { transform: scale(1.1); }
.hero-preview-item.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}
.hero-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#hero-modal-previews {
    display: flex;
    flex-direction: column; /* Apila las secciones verticalmente */
    gap: 15px; /* Espacio entre la sección de skins y la de héroes */
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.preview-section {
    width: 100%;
}

.preview-title {
    font-size: 0.9em;
    color: var(--text-muted-color);
    text-align: left;
    margin: 0 0 10px 5px;
    font-weight: 500;
}

.preview-list {
    display: flex;
    justify-content: center; /* <-- CAMBIA 'flex-start' de vuelta a 'center' */
    gap: 10px;
    flex-wrap: wrap;
}

.hero-preview-item {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s ease, transform 0.2s ease;
}
.hero-preview-item:hover { transform: scale(1.1); }
.hero-preview-item.active {
    border-color: var(--color-primary);
    box-shadow: 0 0 10px var(--color-primary);
}
.hero-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- 3.8.2. Modal de Información y 'Acerca de' --- */
#about-modal-overlay.visible #about-modal {
    transform: scale(1);
}

#about-modal {
    width: 90%;
    max-width: 850px;
    max-height: 85vh; /* Se mantiene la altura máxima */
    background-color: var(--box-bg-color);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    
    /* Convertimos el modal en un contenedor flex vertical */
    display: flex;
    flex-direction: column;
}

.about-modal-content {
    /* El nuevo div interno es el que ahora tiene el scroll */
    overflow-y: auto;
    /* Ajustes para que la barra de scroll no se pegue al contenido */
    padding-right: 15px;
    margin-right: -15px;
}

#about-modal h2 {
    margin-top: 0;
    margin-bottom: 25px;
    color: var(--color-primary);
    text-align: center; /* Aseguramos que el título siga centrado */
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px; /* Espacio entre las tarjetas */
    margin-bottom: 25px;
}

.info-card {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    /* --- INICIO DE LAS LÍNEAS A AÑADIR --- */
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* --- FIN DE LAS LÍNEAS A AÑADIR --- */
}

.info-card.full-width {
    grid-column: 1 / -1; /* Hace que esta tarjeta ocupe todo el ancho */
}

.info-card h3 {
    color: var(--text-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.info-card p {
    color: var(--text-muted-color);
    font-size: 0.9em;
    line-height: 1.6;
    margin: 0;
}

#about-modal hr {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 25px 0;
}

.contact-section {
    font-size: 0.95em;
}

.contact-section h3 {
    margin: 0 0 10px;
}

.contact-section p {
    color: var(--text-muted-color);
    margin: 0;
}

#about-modal a {
    color: var(--color-normal);
    text-decoration: none;
}
#about-modal a:hover { text-decoration: underline; }

#close-about-btn {
    display: block;
    margin: 25px auto 0 auto;
}

/* --- 3.8.3. Modal de Sincronización --- */
#sync-modal {
    width: 350px;
}

#sync-modal p {
    color: var(--text-muted-color);
    font-size: 0.9em;
    margin: 15px 0 25px 0;
}

.sync-inputs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.sync-input-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sync-input-group label {
    font-size: 0.8em;
    color: var(--text-muted-color);
    margin-bottom: 8px;
}

.sync-input-group input {
    width: 60px;
    text-align: center;
}

/* --- 3.8.4. Modal de Configuración --- */

/* --- INICIO DE LA CORRECCIÓN --- */
#settings-modal {
    background-color: var(--box-bg-color);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
    
    /* Convertimos en flexbox vertical y limitamos altura */
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.settings-content {
    overflow-y: auto;
    /* Pequeño padding para que la barra de scroll no se pegue al contenido */
    padding: 10px 15px 10px 0;
    margin-right: -15px;
    flex-grow: 1; /* Permite que este div ocupe el espacio disponible */
    text-align: left; /* Restablecemos la alineación del texto para el contenido */
}

.settings-section {
    margin-bottom: 25px;
    text-align: center;
    font-size: 0.9em;

}

.settings-section > label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-muted-color);
}

.settings-input {
    width: 100%;
    box-sizing: border-box;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px;
    border-radius: 8px;
    font-size: 1em;
}

.settings-input.small-input {
    width: 70px;
    text-align: center;
}

.settings-row-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-row .checkbox-label {
    flex-grow: 1;
}

select.settings-input {
    text-align-last: center;
}

select.settings-input option {
    background-color: var(--bg-color);
    color: var(--text-color);
}

.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: space-around;

}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9em;
}

.checkbox-label input {
    display: none; /* Oculta el checkbox nativo */
}


/* ===== INICIO DE LA CORRECCIÓN CLAVE ===== */

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    margin-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    flex-shrink: 0; /* Evita que el cuadrado se encoja */
}

/* Creamos la marca de "check" con un pseudo-elemento */
.checkbox-custom::before {
    content: '✓'; /* Puedes usar '✔' o '\2713' también */
    font-weight: bold;
    font-size: 14px;
    color: white;
    opacity: 0; /* Oculto por defecto */
    transition: opacity 0.2s ease;
}

/* Cuando el input está :checked, cambiamos el estilo del span que le sigue (.checkbox-custom) */
.checkbox-label input:checked + .checkbox-custom {
    background-color: var(--color-normal);
    border-color: var(--color-normal);
}

/* Y mostramos la marca de "check" */
.checkbox-label input:checked + .checkbox-custom::before {
    opacity: 1;
}

/* ===== FIN DE LA CORRECCIÓN CLAVE ===== */


#settings-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px; /* Añadimos un poco de espacio arriba */
    border-top: 1px solid var(--border-color); /* Separador visual */
}

.settings-btn {
    background-color: var(--color-normal);
    color: #1a1a1a;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
}

#test-notification-btn {
    background-color: var(--border-color);
    color: var(--text-color);
}


/* --- 3.8.5. Modal de Streams --- */
#streams-modal {
    background-color: var(--box-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 90%;
    max-width: 450px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.streams-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}
.streams-modal-header h2 {
    margin: 0;
    color: var(--color-primary);
    font-size: 1.4em;
}
#close-streams-modal {
    background: none; border: none;
    color: var(--text-muted-color);
    font-size: 2em;
    line-height: 1;
    cursor: pointer;
    padding: 0 5px;
    transition: color 0.2s ease;
}
#close-streams-modal:hover { color: var(--text-color); }
#streams-modal-content {
    padding: 25px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.modal-stream-item { text-align: center; }
.stream-thumbnail {
    width: 400px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    height: 200px;
}
.modal-stream-item .stream-image-link {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    color: white;
    text-decoration: none;
}
.modal-stream-item .stream-image-link:hover {
    transform: scale(1.02);
    transition: transform 0.2s ease;
}
.modal-stream-item .streamer-name {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 5px 0;
}
.modal-stream-item .stream-countdown,
.modal-stream-item .stream-is-live {
    font-family: 'Courier New', monospace;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--color-normal);
    margin: 0;
}
.modal-stream-item .stream-is-live { color: var(--color-urgent); }
.no-streams-message {
    color: var(--text-muted-color);
    text-align: center;
    padding: 40px 0;
}

.streams-modal-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--border-color);
    background-color: rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}
.streams-modal-footer h3 {
    margin: 0 0 15px 0;
    font-size: 1.1em;
    color: var(--text-muted-color);
    text-align: center;
}
.streams-modal-footer .checkbox-group { justify-content: space-around; }

.modal-stream-item .stream-info {
    margin-top: 15px;
    line-height: 1.3;
}
.modal-stream-item .stream-title {
    font-size: 1.2em;
    font-weight: 700;
    margin: 0 0 5px 0;
}
.modal-stream-item .streamer-name {
    font-size: 0.9em;
    color: var(--text-muted-color);
    margin: 0;
}
.modal-stream-item .stream-countdown {
    margin-top: 10px;
    font-size: 1.4em;
    font-weight: bold;
    color: var(--color-warning);
}


/* --- 3.8.6. Modal de Selección de Idioma --- */

#language-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 2000; /* Debe estar por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

#language-modal-overlay.hidden {
    opacity: 0;
    pointer-events: none; /* No se puede interactuar con él cuando está oculto */
}

#language-modal {
    background-color: var(--box-bg-color);
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

#language-modal h2 {
    margin-top: 0;
    color: var(--text-color);
    font-size: 1.5em;
}

#language-options {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.language-choice-btn {
    background-color: var(--border-color);
    color: var(--text-color);
    border: 2px solid transparent;
    padding: 15px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: background-color 0.2s, border-color 0.2s;
    min-width: 120px;
}

.language-choice-btn:hover {
    background-color: #4a4a4a;
    border-color: var(--color-primary);
}

.language-choice-btn .flag {
    font-size: 2.5em;
}

.language-modal-footer {
    font-size: 0.8em;
    color: var(--text-muted-color);
    margin: 0;
}

/* --- 3.8.7. Modal de Configuración de Cuenta (Estilo Pantalla Completa - FINAL) --- */
#account-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); /* Fondo oscuro semitransparente */
    z-index: 1200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
}

#account-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#account-modal {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 1000px;
    max-height: 80vh;
    background-color: #2f3136;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.4);
    transform: scale(0.95) translateY(10px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

#account-modal-overlay.visible #account-modal {
    transform: scale(1) translateY(0);
}

/* Columna Izquierda: Barra Lateral de Navegación */
.account-sidebar {
    width: 220px;
    background-color: #292b2f;
    flex-shrink: 0;
    padding: 20px 10px 20px 20px;
    display: flex;
    flex-direction: column;
}

.account-sidebar-scroller {
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    /* justify-content: space-between; <-- Esta línea puede ser útil si falla el flex-grow */
}

.sidebar-header {
    padding: 0 10px;
    margin-bottom: 20px;
}

.sidebar-header h3 {
    font-size: 0.8em;
    color: var(--text-muted-color);
    text-transform: uppercase;
    font-weight: 700;
}

/* AÑADE esta regla */
.sidebar-nav:first-of-type {
    flex-grow: 1; /* Solo el primer <nav> debe crecer y ocupar el espacio */
}
.secondary-nav .nav-divider { /* Estilo específico para el divisor del nav secundario */
    margin: 0 10px 10px 0; /* Ajustamos el margen */
}
.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 10px 10px 10px 0;
}

.nav-item {
    display: block;
    padding: 10px;
    margin-bottom: 4px;
    border-radius: 5px;
    color: var(--text-muted-color);
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-color);
}
.nav-item.active {
    background-color: rgba(255,255,255,0.08);
    color: #fff;
}

.sidebar-footer {
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.logout-button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: none;
    border: none;
    color: var(--color-danger);
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.2s ease;
}
.logout-button:hover {
    background-color: rgba(255, 138, 128, 0.1);
}
.logout-button svg { width: 20px; height: 20px; }

.login-button {
    color: var(--color-success); /* Color verde de éxito */
}
.login-button:hover {
    background-color: rgba(105, 240, 174, 0.1); /* Fondo verde claro al pasar el ratón */
}


/* Columna Derecha: Contenido Principal */
.account-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden; 
}

.account-content-scroller {
    padding: 60px 40px 40px;
    overflow-y: auto;
    flex-grow: 1; 
}

.content-section {
    display: none;
}
.content-section.active {
    display: block;
}
.content-section h2 {
    color: #fff;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.5em;
}

/* Botón de cierre (REDISEÑADO) */
.close-fullscreen-modal-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    cursor: pointer;
    color: var(--text-muted-color);
    background-color: transparent;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}
.close-fullscreen-modal-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.close-fullscreen-modal-btn svg { width: 24px; height: 24px; }


/* Estilos para la sección "Mi Cuenta" */
.user-profile-card {
    border-radius: 8px;
    overflow: hidden;
    background-color: var(--bg-color);
}
.user-profile-banner {
    height: 120px;
    background-color: var(--color-primary);
}
.user-profile-info {
    padding: 16px;
    padding-left: 140px;
    position: relative;
    min-height: 60px;
}
.user-profile-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 6px solid var(--bg-color);
    position: absolute;
    left: 20px;
    top: -48px;
}
.user-profile-name {
    font-size: 1.5em;
    font-weight: 700;
    color: #fff;
}

/* Estilos para la sección "Disclaimer" */
.disclaimer-subtitle {
    font-size: 1.1em;
    color: var(--color-primary);
    margin-top: 25px;
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 5px;
}
.disclaimer-subtitle:first-of-type {
    margin-top: 0;
}
.disclaimer-text {
    color: var(--text-muted-color);
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Estilos para la nueva sección "Apóyame" */
.support-text {
    color: var(--text-muted-color);
    font-size: 0.95em;
    line-height: 1.6;
    margin-bottom: 25px;
    text-align: center;
}
.support-methods {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}
.support-card {
    background-color: var(--bg-color);
    padding: 20px;
    border-radius: 8px;
    text-align: left; /* Alineamos el texto de las tarjetas a la izquierda */
}
.support-card h4 {
    margin: 0 0 15px;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2em;
}

.support-icon {
    width: 24px;
    height: 24px;
    fill: currentColor; /* El icono tomará el color del texto (var(--color-primary)) */
}

.support-card p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-muted-color);
    line-height: 1.5;
}

.support-code {
    display: block;
    background-color: #202225;
    padding: 10px 12px;
    border-radius: 4px;
    margin-top: 5px;
    font-family: monospace;
    word-break: break-all;
    font-size: 0.85em;
}

/* Estilos para la tarjeta de Binance */
.binance-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}
.binance-item .binance-label {
    font-size: 0.8em;
    color: var(--text-color);
    font-weight: 500;
}

/* Estilos para el enlace de Ko-fi */
.support-link {
    display: inline-block;
    margin-top: 15px;
    background-color: var(--color-normal);
    color: var(--bg-color);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.9em;
    transition: transform 0.2s;
}
.support-link:hover {
    transform: scale(1.05);
}

/* 3.8.7.1 Estilos para la lista de suscripciones activas */
/* Estilos para la lista de suscripciones activas (Versión con Iconos) */
#active-subscriptions-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.subscription-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-color);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.subscription-info {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Espacio entre el alias y los detalles */
}

.subscription-alias {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-color);
}

.subscription-details {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre los items de detalle */
    font-size: 0.9em;
    color: var(--text-muted-color);
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 6px; /* Espacio entre icono y texto */
}

.os-detail svg {
    width: 18px;
    height: 18px;
}

.browser-detail {
    font-weight: 500;
}

/* --- AÑADE ESTAS LÍNEAS --- */
.browser-icon {
    width: 18px;
    height: 18px;
}
/* --- FIN DE LÍNEAS A AÑADIR --- */

.os-detail svg {
    width: 18px;
    height: 18px;
}

.delete-subscription-btn {
    background: none;
    border: none;
    color: var(--text-muted-color);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: color 0.2s, background-color 0.2s;
}

.delete-subscription-btn:hover {
    color: var(--color-danger);
    background-color: rgba(255, 138, 128, 0.1);
}

.delete-subscription-btn svg {
    width: 24px;
    height: 24px;
}

.settings-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}
.settings-input.small-input {
    width: 60px;
    text-align: center;
}
#section-push-notifications .settings-section > label {
    text-align: left;
    margin-bottom: 15px;
    font-weight: bold;
    color: var(--text-color);
}
#section-push-notifications .checkbox-group {
    justify-content: flex-start;
}
.save-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}´
.add-new-device {
    border-style: dashed;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted-color);
}
.add-new-device span {
    font-weight: 500;
}
.add-new-device .settings-btn {
    font-size: 1.5em;
    line-height: 1;
    padding: 2px 10px;
}
/*  3.8.8. MODAL: LOGIN REQUERIDO --- */
#login-required-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1300; /* Un z-index alto para que aparezca sobre otros modales si es necesario */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
#login-required-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
#login-required-modal {
    background-color: var(--box-bg-color);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
#login-required-modal-overlay.visible #login-required-modal {
    transform: scale(1);
}
#login-required-modal h3 {
    margin-top: 0;
    color: var(--color-warning); /* Usamos el color de advertencia */
}
#login-required-modal p {
    color: var(--text-muted-color);
    margin: 15px 0 25px;
}
.login-required-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}
/* Estilo para el botón secundario (Cancelar) */
.settings-btn.secondary-btn {
    background-color: var(--border-color);
    color: var(--text-color);
}

/* --- 3.8.9. MODAL DE CONFIRMACIÓN --- */
#alert-modal-overlay, #prompt-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1350; /* Z-index alto */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}
#alert-modal-overlay.visible, #prompt-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

/* Estilos comunes para los modales simples */
#alert-modal, #prompt-modal {
    background-color: var(--box-bg-color);
    padding: 25px 30px;
    border-radius: 12px;
    text-align: center;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}
#alert-modal-overlay.visible #alert-modal, 
#prompt-modal-overlay.visible #prompt-modal {
    transform: scale(1);
}
#alert-modal h3, #prompt-modal h3 {
    margin: 0 0 10px;
    color: var(--text-color);
}
#alert-modal p, #prompt-modal p {
    color: var(--text-muted-color);
    margin: 0 0 25px;
    line-height: 1.5;
}

/* Botón del Alert Modal */
#alert-ok-btn {
    width: 100%;
}

/* Input y Botones del Prompt Modal */
#prompt-modal-input {
    margin-bottom: 25px;
}
.prompt-buttons {
    display: flex;
    justify-content: flex-end; /* Alinea los botones a la derecha */
    gap: 10px;
}

/* --- AJUSTE GLOBAL PARA BOTONES DE MODALES --- */
/* Centra los botones del modal de confirmación y login-required */
#confirmation-modal .confirmation-buttons,
#login-required-modal .login-required-buttons {
    justify-content: center; /* <-- CAMBIO A CENTER */
    width: 100%;
}
#confirmation-modal .confirmation-buttons .settings-btn,
#login-required-modal .login-required-buttons .settings-btn {
    flex-grow: 1; /* Hace que los botones ocupen el mismo espacio */
}

/* --- INICIO DE LA CORRECCIÓN: Estilos para el modal de confirmación --- */
#confirmation-modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1400; /* Z-index alto para estar sobre el modal de cuenta (1200) */
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
}
#confirmation-modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}
#confirmation-modal {
    background-color: var(--box-bg-color);
    padding: 25px 30px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-align: center;
    width: 90%;
    max-width: 400px;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}
#confirmation-modal-overlay.visible #confirmation-modal {
    transform: scale(1);
}
#confirmation-modal h3 {
    margin: 0 0 10px;
    color: var(--color-warning);
}
#confirmation-modal p {
    color: var(--text-muted-color);
    margin: 0 0 25px;
    line-height: 1.5;
}
.settings-btn.danger-btn {
    background-color: var(--color-danger);
    color: var(--bg-color);
}

/* --- 3.9. Panel de Detalles de Evento (Lateral Derecho) --- */
#event-details-panel,
#weekly-details-panel {
    background-color: var(--box-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    width: 0;
    opacity: 0;
    overflow: hidden;
    transition: width 0.4s ease, opacity 0.4s ease, padding 0.4s ease;
    height: calc(600px + 15px + 148px);
    display: flex;
    flex-direction: column;
}

#event-details-panel.visible
{
    width: 450px;
    opacity: 1;
    height: 827px;
}

#weekly-details-panel.visible {
    width: 450px;
    opacity: 1;
    height: 827px;
    margin-left: -17px
}

.details-header {
    padding: 20px 25px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.details-header h2 {
    margin: 0 0 5px 0;
    color: var(--color-primary);
    font-size: 1.5em;
    padding-right: 40px;
}

.details-header p {
    margin: 0;
    font-size: 0.8em;
    color: var(--text-muted-color);
}

.close-details-btn {
    position: absolute;
    top: 15px; right: 15px;
    cursor: pointer;
    width: 30px; height: 30px;
    color: var(--text-muted-color);
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, background-color 0.2s;
}

.close-details-btn:hover {
    color: var(--text-color);
    background-color: var(--border-color);
}

.details-content {
    padding: 0 25px 25px 25px;
    overflow-y: auto;
    flex-grow: 1;
}

.details-section h3 {
    font-size: 1.1em;
    color: var(--text-color);
    margin: 20px 0 10px 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 8px;
}

.details-summary {
    font-size: 0.95em;
    line-height: 1.6;
    color: var(--text-muted-color);
}

.details-extra {
    font-size: 0.9em;
    color: var(--text-muted-color);
    line-height: 1.6;
    margin-top: 10px;
    padding-left: 15px;
    border-left: 3px solid var(--border-color);
}

.details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.details-table th,
.details-table td {
    text-align: left;
    padding: 10px 5px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.details-table th {
    color: var(--text-muted-color);
    font-weight: normal;
}

.details-table td:last-child {
    text-align: right;
    color: var(--text-color);
}

.missions-table td:last-child {
    color: var(--color-warning);
    font-weight: bold;
}

.exchange-shop-table .item-to-buy {
    display: flex;
    align-items: center;
    gap: 15px;
}
.exchange-shop-table .item-to-buy .reward-item-wrapper {
    margin-top: 0;
    flex-shrink: 0;
}
.exchange-shop-table .item-info {
    display: flex;
    flex-direction: column;
}
.exchange-shop-table .item-name {
    font-weight: bold;
}
.exchange-shop-table .item-limit {
    font-size: 0.8em;
    color: var(--text-muted-color);
    margin-top: 4px;
}
.exchange-shop-table .item-cost {
    text-align: right;
    font-weight: bold;
    color: var(--color-warning);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}
.exchange-shop-table .currency-icon {
    width: 24px;
    height: 24px;
}

.details-table tr:last-child td {
    border-bottom: none;
}

.participation-reward {
    font-size: 0.9em;
    background-color: rgba(255, 255, 255, 0.04);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.participation-reward .reward-grid {
    flex-shrink: 0;
    margin: 0;
}

.participation-reward-text {
    color: var(--text-muted-color);
    line-height: 1.5;
}

.participation-reward-text strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* --- Cuadrícula para Recompensas de Rango y Acumulativas --- */
.details-reward-grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    padding: 10px 0;
}
.details-reward-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.details-reward-label {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--text-muted-color);
    text-align: center;
}

.reward-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
    justify-content: center;
}

.reward-item-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
}

.reward-grid-item {
    position: relative;
    width: 64px;
    height: 64px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.reward-grid-item.double-width {
    width: 64px;
}
.reward-grid-item .reward-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.reward-grid-item .reward-quantity {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 5px rgba(0,0,0,0.8);
}

.reward-probability {
    font-size: 11px;
    font-weight: bold;
    color: #fff;
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2px 5px;
    border-radius: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.details-reward-list {
    margin-top: 15px;
    padding: 0;
    list-style: none;
    font-size: 0.9em;
}
.details-reward-list-item {
    display: flex;
    align-items: center;
    padding: 6px 5px;
    border-bottom: 1px solid var(--border-color);
}
.details-reward-list-item:last-child {
    border-bottom: none;
}
.reward-name-part {
    flex-grow: 1;
}
.reward-quantity-part {
    flex-shrink: 0;
    width: 60px;
    text-align: right;
    color: var(--text-muted-color);
}
.reward-prob-part {
    flex-shrink: 0;
    width: 70px;
    text-align: right;
    font-weight: bold;
}

/* Colores de Probabilidad */
.prob-legendary { color: #ff8c00; }
.prob-epic { color: #9400d3; }
.prob-rare { color: #4169e1; }
.prob-uncommon { color: #2e8b57; }
.prob-common { color: var(--text-muted-color); }

/* Colores de Fondo por Rareza para Recompensas de Evento */
.reward-grid-item.rank-legendary { background-color: rgba(255, 140, 0, 0.3); border-color: #ff8c00; box-shadow: inset 0 0 12px rgba(255, 165, 0, 0.7); }
.reward-grid-item.rank-epic { background-color: rgba(148, 0, 211, 0.3); border-color: #9400d3; box-shadow: inset 0 0 12px rgba(153, 50, 204, 0.7); }
.reward-grid-item.rank-rare { background-color: rgba(65, 105, 225, 0.3); border-color: #4169e1; box-shadow: inset 0 0 12px rgba(100, 149, 237, 0.7); }
.reward-grid-item.rank-uncommon { background-color: rgba(46, 139, 87, 0.3); border-color: #2e8b57; box-shadow: inset 0 0 12px rgba(60, 179, 113, 0.7); }
.reward-grid-item.rank-common { background-color: rgba(112, 128, 144, 0.3); border-color: #708090; box-shadow: inset 0 0 12px rgba(119, 136, 153, 0.7); }

/* Estilos para el texto de recompensas minimalista */
.minimalist-reward-item {
    display: flex;
    align-items: center;
    gap: 12px;
    vertical-align: middle;
}
.minimalist-reward-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}
.minimalist-reward-name {
    font-weight: bold;
    line-height: 1.3;
}

/* Colores de texto por RAREZA */
.rarity-text-legendary { color: #ff8c00; }
.rarity-text-epic { color: #9400d3; }
.rarity-text-rare { color: #4169e1; }
.rarity-text-uncommon { color: #2e8b57; }
.rarity-text-common { color: var(--text-muted-color); }

/* --- NUEVO: Estilos para Pestañas y Misiones Diarias --- */
.tabs-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 15px;
    flex-wrap: wrap; /* Permite que las pestañas pasen a la siguiente línea en móvil */
}

.tab-link {
    background: none;
    border: none;
    color: var(--text-muted-color);
    padding: 10px 15px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: bold;
    position: relative;
    top: 2px;
    border-bottom: 2px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-link:hover {
    color: var(--text-color);
}

.tab-link.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.daily-missions-table th,
.missions-table th {
    font-size: 0.8em;
    text-transform: uppercase;
}

.daily-missions-table .count-col {
    text-align: center;
    width: 60px;
}

.missions-table .points-col {
    text-align: right;
    width: 80px;
    font-weight: bold;
    color: var(--color-warning);
}

.mission-reward-item {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: flex-end;
}

.mission-reward-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.mission-reward-cell {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px; /* Espacio entre múltiples ítems de recompensa */
    flex-wrap: wrap;
}

.puzzle-rewards-container {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Espacio entre cada bloque de recompensa */
    margin-top: 10px;
}

.puzzle-item {
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.puzzle-item:last-child {
    border-bottom: none; /* Quitamos el borde del último elemento */
    padding-bottom: 5px;
}

.puzzle-description {
    margin: 0 0 12px 0; /* Espacio entre el texto y los iconos */
    font-size: 0.95em;
    color: var(--text-color);
}

.puzzle-rewards-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px; /* Espacio entre los iconos de recompensa */
}


/* --- 3.9.1. Panel de Detalles Semanal (Weekly) --- */

.weekly-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}
.weekly-details-table th,
.weekly-details-table td {
    text-align: left;
    padding: 8px 5px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.weekly-details-table th {
    color: var(--text-muted-color);
    font-weight: normal;
}
.weekly-details-table tr:last-child td {
    border-bottom: none;
}
.weekly-details-table td:last-child {
    text-align: right;
    color: var(--text-color);
}
.weekly-progression-table td:last-child {
    text-align: right;
    color: var(--text-color);
}
.weekly-progression-table td:nth-child(2) {
    display: flex;
    align-items: center;
    gap: 5px;
}

.weekly-buff-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.9em;
}
.weekly-buff-item img {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}
.weekly-buff-item strong {
    color: var(--text-color);
    font-weight: bold;
}
.weekly-buff-item p {
    color: var(--text-muted-color);
    margin: 5px 0 0 0;
    font-size: 0.9em;
}

.weekly-buff-separator {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 15px 0;
}

.weekly-recommendation-box {
    background-color: rgba(64, 196, 255, 0.1);
    border-left: 3px solid var(--color-normal);
    padding: 12px 15px;
    margin: 15px 0;
    font-size: 0.9em;
    color: #cceeff;
}
.weekly-recommendation-box p { margin: 0; }

.weekly-stage-item {
    padding: 0;
    background-color: transparent;
    margin-bottom: 0;
}
.weekly-stage-title {
    margin: 0 0 10px 0;
    color: var(--text-color);
    font-size: 1.2em;
}
.weekly-stage-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.04);
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 10px;
}
.weekly-stage-info-item { text-align: center; }
.weekly-stage-info-label {
    font-size: 0.75em;
    color: var(--text-muted-color);
    display: block;
    margin-bottom: 5px;
}
.weekly-stage-info-value {
    font-size: 0.9em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.weekly-combat-power-icon { width: 16px; height: 16px; }
.weekly-elemental-weakness { display: flex; gap: 4px; }
.weekly-element-icon { width: 25px; height: 25px; }

.weekly-stage-rewards p {
    font-size: 0.9em;
    margin: 8px 0;
    color: var(--text-muted-color);
}
.weekly-stage-rewards p strong { color: var(--color-normal); }

.weekly-reward-tier { margin-bottom: 10px; }
.weekly-reward-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}
.weekly-reward-grid-item {
    position: relative;
    width: 64px;
    height: 64px;
    background-color: rgba(0,0,0,0.3);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.weekly-reward-grid-item .weekly-reward-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.weekly-reward-grid-item .weekly-reward-quantity {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 5px rgba(0,0,0,0.8);
}
.weekly-reward-grid-item.double-width {
    width: 64px;
}

.weekly-reward-grid-item.rank-legendary { background-color: rgba(255, 140, 0, 0.3); border-color: #ff8c00; }
.weekly-reward-grid-item.rank-epic { background-color: rgba(148, 0, 211, 0.3); border-color: #9400d3; }
.weekly-reward-grid-item.rank-rare { background-color: rgba(65, 105, 225, 0.3); border-color: #4169e1; }
.weekly-reward-grid-item.rank-uncommon { background-color: rgba(46, 139, 87, 0.3); border-color: #2e8b57; }
.weekly-reward-grid-item.rank-common { background-color: rgba(112, 128, 144, 0.3); border-color: #708090; }

.weekly-boss-info-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}
.weekly-boss-info-header img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}
.weekly-boss-info-header h4 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: var(--color-urgent);
}

.weekly-recommended-heroes-tag-group { margin-bottom: 15px; }
.weekly-recommended-heroes-tag { font-size: 1em; color: var(--color-normal); margin: 0 0 10px 0; }
.weekly-recommended-heroes .banner-heroes { justify-content: flex-start; }
.weekly-recommended-heroes .banner-hero-wrapper { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.weekly-recommended-heroes .banner-hero-img-container { position: relative; width: 80px; height: 80px; cursor: pointer; }
.weekly-recommended-heroes .banner-hero-img { width: 100%; height: 100%; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3); outline: 3px solid transparent; outline-offset: -3px; }
.weekly-recommended-heroes .banner-hero-name { font-size: 0.8em; color: var(--text-color); font-weight: 700; }

.weekly-difficulty-tier { margin-bottom: 20px; }
.weekly-difficulty-tier h4 { font-size: 1.3em; color: var(--color-warning); margin: 0 0 10px 0; text-align: center; }
.weekly-modifier-item { background-color: rgba(255,255,255,0.04); padding: 8px 12px; border-radius: 6px; margin-bottom: 8px; }
.weekly-modifier-item strong { font-size: 0.9em; color: var(--text-color); }
.weekly-modifier-item p { font-size: 0.8em; color: var(--text-muted-color); margin: 4px 0 0 0; }

.weekly-tips-list { font-size: 0.9em; color: var(--text-muted-color); padding-left: 20px; line-height: 1.6; }

/* --- NUEVO: Layout para la cuadrícula de Recompensas por Puntuación --- */
.weekly-score-rewards-grid {
    display: flex;
    justify-content: space-around; /* O 'flex-start' si prefieres alineado a la izq */
    gap: 15px;
    padding: 10px 0;
}
.weekly-score-reward-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.weekly-score-reward-points {
    font-size: 0.9em;
    font-weight: bold;
    color: var(--text-muted-color);
}
.weekly-score-reward-item {
    position: relative;
    width: 64px; /* Icono más grande */
    height: 64px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}
.weekly-score-reward-item.rank-legendary { background-color: rgba(255, 140, 0, 0.3); border-color: #ff8c00; }
.weekly-score-reward-item.rank-epic { background-color: rgba(148, 0, 211, 0.3); border-color: #9400d3; }
.weekly-score-reward-item.rank-rare { background-color: rgba(65, 105, 225, 0.3); border-color: #4169e1; }
.weekly-score-reward-item.rank-uncommon { background-color: rgba(46, 139, 87, 0.3); border-color: #2e8b57; }
.weekly-score-reward-item.rank-common { background-color: rgba(112, 128, 144, 0.3); border-color: #708090; }

.weekly-score-reward-item .weekly-reward-icon {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}
.weekly-score-reward-item .weekly-reward-quantity {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 1.1em;
    font-weight: bold;
    color: white;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0 0 5px rgba(0,0,0,0.8);
}
/* --- NUEVO: Estilos para los buffs desplegables --- */
.weekly-buff-item.expandable {
    cursor: pointer;
    position: relative;
    transition: background-color 0.2s ease;
    padding-right: 40px; /* <-- AÑADE ESTA LÍNEA */
}

.weekly-buff-item.expandable:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.expand-arrow {
    position: absolute;
    right: 10px; /* <-- CAMBIA 15px por 10px */
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.3s ease;
    color: var(--text-muted-color);
}

.weekly-buff-item.expanded .expand-arrow {
    transform: translateY(-50%) rotate(180deg);
    color: var(--color-primary);
}

.weekly-enhancements-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out, margin 0.4s ease-out;
    padding-left: 20px;
    margin-left: 55px; /* Alinea con el texto del buff principal */
    border-left: 2px solid var(--border-color);
}

.weekly-enhancements-list.expanded {
    max-height: 500px; /* Un valor suficientemente grande para que quepa todo */
    padding-top: 10px;
    padding-bottom: 10px;
    margin-top: -5px; /* Pequeño ajuste visual */
    margin-bottom: 10px;
    transition: max-height 0.4s ease-in, padding 0.4s ease-in, margin 0.4s ease-in;
}

.weekly-enhancement-item {
    padding: 8px 0;
}

.enhancements-title {
    font-weight: bold;
    color: var(--text-color);
    margin-bottom: 12px;
    font-size: 0.9em;
}

.weekly-enhancement-item strong {
    color: var(--color-normal);
    display: block;
    margin-bottom: 4px;
    font-size: 0.95em;
}

.weekly-enhancement-item p {
    color: var(--text-muted-color);
    margin: 0;
    font-size: 0.9em;
}

/* --- 3.9.2. Panel de Detalles Héroe de la Semana --- */
.hotw-profile {
    display: flex;
    flex-direction: column; /* Apilamos los elementos verticalmente */
    align-items: center; /* Centramos todo horizontalmente */
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.04);
    padding: 20px 15px;
    border-radius: 8px;
    margin: 15px 0;
    text-align: center; /* Centramos el texto también */
}
.hotw-hero-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.5em; /* Un poco más grande para destacar */
    font-weight: 700; /* Aseguramos que sea negrita */
    transition: color 0.3s ease; /* Transición suave si el color cambia */
}

/* Estilos mejorados para la lista de misiones */
.hotw-mission-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.hotw-mission-item {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 12px 15px;
    border-radius: 6px;
    border-left: 3px solid var(--color-primary); /* Borde de acento */
    transition: background-color 0.2s ease;
}
.hotw-mission-item:hover {
    background-color: rgba(var(--color-primary-rgb), 0.1); /* Iluminación al pasar el ratón */
}
.hotw-mission-item strong {
    display: block;
    color: var(--text-color);
    margin-bottom: 5px;
    font-size: 1em;
}
.hotw-mission-item p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-muted-color);
    line-height: 1.5;
}

.hotw-hero-image-container {
    width: 100%;
    max-width: 300px; /* Un tamaño máximo para la imagen */
    height: auto;
    overflow: hidden; /* Asegura que nada se desborde */
}

.hotw-hero-image-container img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Escala la imagen para que quepa sin cortarse */
}

.hotw-hero-info h4 {
    margin: 0 0 5px 0;
    font-size: 1.4em;
    color: var(--text-color);
}

.hotw-hero-info p {
    margin: 0;
    font-size: 0.9em;
    color: var(--text-muted-color);
}

/* --- 3.10. Botón Flotante (FAB) de Twitch --- */
#twitch-fab {
    position: fixed;
    bottom: 25px;
    left: 25px;
    width: 56px;
    height: 56px;
    background-color: #9146FF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 900;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: scale(0);
    opacity: 0;
}
#twitch-fab.visible {
    transform: scale(1);
    opacity: 1;
}
#twitch-fab:hover { transform: scale(1.1); }
#twitch-fab svg {
    color: white;
    width: 32px;
    height: 32px;
}
#twitch-fab .notification-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 12px; height: 12px;
    background-color: var(--color-urgent);
    border: 2px solid var(--box-bg-color);
    border-radius: 50%;
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
#twitch-fab.alert-active .notification-dot {
    opacity: 1;
    transform: scale(1);
    animation: pulse 2s infinite;
}
#twitch-fab.live-active .notification-dot { display: none; }

/* --- 3.11. Estilos para el Widget de Usuario --- */

/* --- 3.11. Estilos para el Widget de Usuario --- */

#user-status {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    background-color: rgba(30, 30, 30, 0.5); /* Un poco más oscuro */
    backdrop-filter: blur(5px);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    padding: 4px;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
}

/* Contenedor estático que siempre es visible */
.user-info-static {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}

.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-name {
    font-size: 0.9em;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
    white-space: nowrap;
}

.user-name.guest {
    font-weight: normal;
    color: var(--text-muted-color);
}

/* Separador visual */
.user-widget-divider {
    width: 1px;
    height: 20px;
    background-color: var(--border-color);
    margin: 0 4px;
}

/* Estilo unificado para los botones de acción */
.user-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0;
}

.user-action-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.1);
}

.user-action-btn svg {
    width: 20px;
    height: 20px;
}

/* Colores específicos para cada botón */
.settings-icon svg { stroke: var(--text-muted-color); }
.login-icon svg { stroke: var(--color-success); }
.logout-icon svg { stroke: var(--color-danger); }

/* Contenedor de acciones que aparece al hacer hover */
.user-actions-hover {
    display: flex;
    align-items: center;
    gap: 6px;
    max-width: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: max-width 0.3s ease-in-out, opacity 0.2s ease-in, visibility 0.2s, transform 0.3s ease-in-out;
}

#user-status:hover .user-actions-hover {
    max-width: 100px; /* Un valor suficientemente grande */
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Estilo unificado para los botones de acción */
.user-action-btn {
    background: none;
    border: none;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background-color 0.2s, transform 0.2s;
    flex-shrink: 0; /* Evita que los botones se encojan */
}

.user-action-btn:hover {
    background-color: var(--border-color);
    transform: scale(1.1);
}

.user-action-btn svg {
    width: 20px;
    height: 20px;
}

/* Colores específicos para cada botón */
.settings-icon svg {
    stroke: var(--text-muted-color);
}
.login-icon svg {
    stroke: var(--color-success);
}
.logout-icon svg {
    stroke: var(--color-danger);
}
.push-btn.unsubscribe-btn {
    background-color: var(--color-danger); /* Rojo para desactivar */
    color: var(--text-color);
}

/* --- 3.12. Pantalla de Carga (Splash Screen) --- */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 9999; /* Máximo z-index para estar por encima de todo */
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

#loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* No se puede interactuar con ella cuando está oculta */
}

.loading-content {
    text-align: center;
    color: var(--text-muted-color);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    margin: 0 auto 20px auto;
    animation: spin 1s linear infinite;
}

#loading-message {
    font-size: 1.1em;
    font-weight: 500;
    min-height: 2em; /* Espacio para dos líneas de texto */
    transition: opacity 0.3s ease-in-out;
}

/* --- Keyframes para el spinner --- */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* --- Estilos para ocultar la app principal al inicio --- */
.app-wrapper.hidden {
    display: none;
}

/* --- 3.13. roadmap button  --- */


.footer-nav a {
    color: var(--text-muted-color); /* Usamos el mismo color que el texto de la status bar */
    text-decoration: none;
    font-size: 1em; /* Hereda el tamaño de 0.8em de #status-bar */
    margin: 0 8px; /* Un poco menos de margen */
    transition: color 0.2s;
}

.footer-nav a:hover {
    color: var(--text-color); /* Se ilumina al pasar el ratón */
    text-decoration: underline;
}

/* Y asegúrate de que el estilo del separador también sea consistente */
.footer-nav span {
    color: var(--text-muted-color);
}

/* --- FIN DE COMPONENTES --- */


/* --- 4. CLASES DE UTILIDAD Y MODIFICADORES --- */

/* --- 4.1. Colores por Rareza (Texto y Fondo) --- */
.rarity-text-1 { color: var(--rarity1-color); }
.rarity-text-2 { color: var(--rarity2-color); }
.rarity-text-3 { color: var(--rarity3-color); }

.rarity-1 {
    background-color: var(--rarity1-bg-color);
    box-shadow: inset 0 0 15px 3px var(--rarity1-color);
}
.rarity-2 {
    background-color: var(--rarity2-bg-color);
    box-shadow: inset 0 0 15px 3px var(--rarity2-color);
}
.rarity-3 {
    background-color: var(--rarity3-bg-color);
    box-shadow: inset 0 0 15px 3px var(--rarity3-color);
}

/* --- 4.2. Colores por Elemento/Rol --- */
.hero-role-icon.element-fire { background-color: var(--color-fire-role); }
.hero-role-icon.element-water { background-color: var(--color-water-role); }
.hero-role-icon.element-earth { background-color: var(--color-earth-role); }
.hero-role-icon.element-wind { background-color: var(--color-wind-role); }
.hero-role-icon.element-lightning { background-color: var(--color-lightning-role); }
.hero-role-icon.element-typeless { background-color: var(--color-typeless-role); }
.hero-role-icon.element-default { background-color: var(--color-default-role); }

/* --- 4.3. Modificadores de Color de Texto --- */
.primary-timer-item .timer-name-boss,
.spawn-item .spawn-item-name-boss {
    color: var(--color-urgent);
}

.primary-timer-item .timer-name-ticket,
.ticket-item .spawn-item-name-ticket {
    color: var(--color-primary);
}

/* --- FIN DE CLASES DE UTILIDAD --- */


/* --- 5. ANIMACIONES (KEYFRAMES) --- */

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 82, 82, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 82, 82, 0);
    }
}

@keyframes live-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 12px rgba(255, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

#twitch-fab.live-active {
    animation: live-pulse 1.5s infinite;
}

/* --- FIN DE ANIMACIONES --- */


@media (max-width: 900px) {
    /* --- 6.1. Ajustes Generales de Layout Móvil --- */
    body {
        display: block;
        padding: 0;
    }

    body.no-scroll {
        overflow: hidden;
        height: 100vh;
    }

    .app-container,
    .content-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-wrapper {
        width: 100%;
        height: auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
        overflow: visible;
        order: 1;
    }

    .primary-panel,
    .secondary-panel {
        width: 100%;
        box-sizing: border-box;
        border-left: none;
        padding: 20px;
    }

    .primary-panel {
        padding-bottom: 2px;
    }

    #status-bar {
        border-radius: 0;
    }

    /* --- 6.2. Componentes en Móvil (Ajustes existentes) --- */
    #events-container,
    #weekly-container {
        padding: 0 0 7px 0;
        border-bottom: 1px solid var(--border-color);
    }

    #primary-timers-container {
        gap: 30px;
        flex-grow: 1;
    }

    .spawn-item {
        font-size: 0.9em;
        padding: 10px 0;
    }
    
    #banners-container {
        width: 100%;
        border-radius: 0;
        border: none;
        flex-direction: column;
        order: 2;
        padding-top: 15px;
    }

    .banner-heroes {
        gap: 10px;
    }

    .banner-hero-img-container {
        width: 70px;
        height: 70px;
    }

    /* --- 6.3. Estilos del Swiper (Específico para Móvil) --- */
    .mobile-swiper-container {
        padding-bottom: 30px;
    }

    .swiper-slide {
        width: 100%;
        height: auto;
        min-height: 450px;
    }

    .swiper-pagination {
        position: absolute;
        bottom: 10px;
    }

    .swiper-pagination-bullet {
        background-color: var(--text-muted-color);
    }

    .swiper-pagination-bullet-active {
        background-color: var(--color-primary);
    }

    /* style.css (DENTRO de @media (max-width: 900px)) */

@media (max-width: 900px) {
    /* --- 6.1. Ajustes Generales de Layout Móvil --- */
    body {
        display: block;
        padding: 0;
    }

    body.no-scroll {
        overflow: hidden;
        height: 100vh;
    }

    .app-container,
    .content-wrapper {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }

    .main-wrapper {
        width: 100%;
        height: auto;
        border-radius: 0;
        border-left: none;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        box-shadow: none;
        overflow: visible;
        order: 1;
    }

    .primary-panel,
    .secondary-panel {
        width: 100%;
        box-sizing: border-box;
        border-left: none;
        padding: 20px;
    }

    .primary-panel {
        padding-bottom: 2px;
    }

    #status-bar {
        border-radius: 0;
    }

    /* --- 6.2. Componentes en Móvil (Ajustes existentes) --- */
    #events-container,
    #weekly-container {
        padding: 0 0 7px 0;
        border-bottom: 1px solid var(--border-color);
    }

    #primary-timers-container {
        gap: 30px;
        flex-grow: 1;
    }

    .spawn-item {
        font-size: 0.9em;
        padding: 10px 0;
    }
    
    #banners-container {
        width: 100%;
        border-radius: 0;
        border: none;
        flex-direction: column;
        order: 2;
        padding-top: 15px;
    }

    .banner-heroes {
        gap: 10px;
    }

    .banner-hero-img-container {
        width: 70px;
        height: 70px;
    }

    /* --- 6.3. Estilos del Swiper (Específico para Móvil) --- */
    .mobile-swiper-container {
        padding-bottom: 30px;
    }

    .swiper-slide {
        width: 100%;
        height: auto;
        min-height: 450px;
    }

    .swiper-pagination {
        position: absolute;
        bottom: 10px;
    }

    .swiper-pagination-bullet {
        background-color: var(--text-muted-color);
    }

    .swiper-pagination-bullet-active {
        background-color: var(--color-primary);
    }

    /* --- 6.4. Adaptación Específica de Componentes en Móvil (VERSIÓN FINAL) --- */
    
    /* --- Barra Superior Móvil y Widget de Usuario --- */
    #mobile-header {
        display: flex;
        justify-content: flex-end; /* Alinea el widget a la derecha */
        align-items: center;
        padding: 8px 15px;
        background-color: var(--box-bg-color);
        border-bottom: 1px solid var(--border-color);
        box-sizing: border-box;
        width: 100%;
    }

    /* Anulamos el posicionamiento 'fixed' del widget de usuario y lo integramos en el header */
    #user-status {
        position: static; /* <-- La clave: El widget ahora forma parte del flujo normal */
        top: auto;
        right: auto;
        left: auto;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border: none;
        background-color: transparent;
        padding: 0;
    }

    #user-status .user-name {
        display: block; /* Aseguramos que el nombre sea visible */
    }

    #user-status .user-widget-divider {
        display: none; /* El divisor no es necesario aquí */
    }

    /* --- Adaptación del Modal de Cuenta --- */
    #account-modal {
        flex-direction: column;
        max-height: 100vh;
        height: 100%;
        border-radius: 0;
    }
    .account-sidebar {
        width: 100%;
        height: auto;
        padding: 0;
        flex-shrink: 0;
        border-bottom: 1px solid var(--border-color);
    }
    .account-sidebar-scroller {
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    #settings-modal {
        width: 90vw;
        padding: 20px;
    }

    .settings-content {
        padding-right: 10px;
        margin-right: -10px;
    }

    .checkbox-group {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    }
    .settings-row {
        flex-wrap: wrap;
    }

    #settings-buttons {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    #settings-buttons .settings-btn {
        width: 100%;
    }

    .sidebar-header, .sidebar-footer, .secondary-nav {
        display: none;
    }
    .sidebar-nav {
        display: flex;
        flex-direction: row;
        gap: 5px;
        padding: 5px;
    }
    .nav-item {
        flex-shrink: 0;
        margin-bottom: 0;
    }
    .account-content-scroller {
        padding: 25px 20px;
    }
    .close-fullscreen-modal-btn {
        top: 5px;
        right: 5px;
    }

    /* --- Adaptación de los Paneles de Detalles (Evento/Semanal) --- */
    #event-details-panel,
    #weekly-details-panel {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        height: 100vh !important;
        border-radius: 0;
        z-index: 1100;
        transition: top 0.4s ease;
        box-sizing: border-box;
    }
    #event-details-panel.visible,
    #weekly-details-panel.visible {
        top: 0;
        width: 100%;
        margin-left: 0;
    }

    /* --- Adaptación de otros Modales --- */
    #hero-modal-content { max-width: 95vw; }
    #hero-modal-image { max-height: calc(95vh - 250px); }
    .hero-modal-nav-btn { width: 36px; height: 36px; top: 35%; }
    .hero-modal-nav-btn.prev { left: 5px; }
    .hero-modal-nav-btn.next { right: 5px; }
    #hero-modal-info { padding: 5px 10px; }
    #hero-modal-name { font-size: 1.3em; }

    #about-modal { 
        max-width: 95vw;
        /* Ya no necesitamos overflow-y aquí porque se maneja en la regla general */
    } 
    .info-grid { grid-template-columns: 1fr; }

    #streams-modal { max-width: 95vw; }
    #streams-modal-content { padding: 15px; }
    .stream-thumbnail {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }
}
}