* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    /* Aquí llamamos a la imagen del castillo */
    background-image: url('fondo.jpg');
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #e0e0e0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* La landing page tiene varias secciones apiladas verticalmente: se anula
   el centrado flex de una sola tarjeta y se deja espacio para la navbar fija */
.landing-body {
    display: block;
    min-height: 0;
    padding-top: 76px;
    /* text-shadow es una propiedad heredable: con definirla aca, TODO el
       texto de la landing (titulos, parrafos, enlaces, texto de tarjetas)
       hereda este contorno negro para leerse bien sobre fondo.jpg */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95), 0 2px 8px rgba(0, 0, 0, 0.8);
}

.container {
    width: 100%;
    max-width: 450px;
    /* Fondo oscuro un poco transparente para ver el castillo detrás */
    background: rgba(20, 18, 38, 0.75); 
    /* Efecto cristal que difumina lo que está justo detrás de la caja */
    backdrop-filter: blur(5px); 
    padding: 30px;
    border-radius: 12px;
    /* Resplandor azul eléctrico combinando con tu logo */
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.3); 
    border: 1px solid #2d2350;
}

h2 {
    text-align: center;
    color: #00d2ff; 
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: #b8b5d3;
}

input {
    width: 100%;
    padding: 12px;
    background: #0b0914;
    border: 1px solid #3d3170;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: #00d2ff;
    box-shadow: 0 0 5px rgba(0, 210, 255, 0.5);
}

button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #7b2cbf, #ff3333); 
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
    margin-top: 10px;
}

button:hover {
    opacity: 0.9;
}

.economia-box {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #2d2350;
    text-align: center;
}

.economia-box p {
    font-size: 15px;
    margin-bottom: 10px;
}

/* --- ESTILOS DE LOS ENLACES AZUL CLARO --- */
.link-azul {
    color: #00d2ff !important; 
    text-decoration: none;
    font-weight: bold;
    transition: color 0.2s;
}

.link-azul:hover {
    color: #ffffff !important; 
    text-decoration: underline;
}

.link-derecha {
    display: block;
    text-align: right;
    margin-top: 8px;
    font-size: 13px;
    font-weight: normal;
}

.cambiar-modo {
    text-align: center;
    margin-top: 15px;
    font-size: 14px;
    color: #b8b5d3;
}

.mensaje {
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    text-align: center;
}

.mensaje-error {
    background: rgba(255, 51, 51, 0.15);
    border: 1px solid #ff3333;
    color: #ff8a8a;
}

.mensaje-exito {
    background: rgba(0, 255, 136, 0.15);
    border: 1px solid #00ff88;
    color: #00ff88;
}
/* =========================================
   ESTILOS DEL DASHBOARD INTERNO (SALA DE CONTROL)
========================================= */

.dashboard-body {
    display: flex;
    align-items: flex-start;
    padding: 0;
    margin: 0;
}

/* Barra Lateral */
.sidebar {
    width: 260px; 
    height: 100vh;
    /* APLICAMOS EFECTO CRISTAL AQUÍ */
    background: rgba(20, 18, 38, 0.75); 
    backdrop-filter: blur(5px);
    border-right: 1px solid #2d2350;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-size: 24px;
    margin-bottom: 30px;
    color: #00d2ff;
    text-align: center;
}

.menu-lateral {
    display: flex;
    flex-direction: column;
    flex: 1; 
}

.menu-lateral a {
    display: block; 
    color: #b8b5d3;
    text-decoration: none;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    transition: 0.3s;
    font-weight: bold;
}

.menu-lateral a:hover, .menu-lateral a.activo {
    background: #2d2350;
    color: #00d2ff;
}

.btn-salir {
    margin-top: auto; 
    color: #ff3333 !important;
    border: 1px solid #3d3170; 
    text-align: center;
}
.btn-salir:hover {
    background: #ff3333 !important;
    color: #fff !important;
}

/* Contenido Principal */
.contenido-principal {
    flex: 1;
    padding: 30px;
    height: 100vh;
    overflow-y: auto;
}

.topbar {
    display: flex;
    justify-content: space-between;
    /* APLICAMOS EFECTO CRISTAL AQUÍ */
    background: rgba(20, 18, 38, 0.75); 
    backdrop-filter: blur(5px);
    padding: 15px 25px;
    border-radius: 8px;
    border: 1px solid #2d2350;
    margin-bottom: 30px;
    align-items: center;
}

.notificaciones {
    color: #ff3333;
}

.balance-top {
    font-size: 18px;
    font-weight: bold;
}

.texto-azul {
    color: #00d2ff;
}

.texto-gris {
    color: #b8b5d3;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Cajas de Secciones */
.panel-seccion {
    /* APLICAMOS EFECTO CRISTAL AQUÍ */
    background: rgba(20, 18, 38, 0.75); 
    backdrop-filter: blur(5px);
    padding: 25px;
    border-radius: 8px;
    border: 1px solid #2d2350;
    margin-bottom: 30px;
}

.panel-seccion h3 {
    color: #fff;
    margin-bottom: 5px;
}

/* Lista de cuentas de juego */
.lista-cuentas {
    margin-bottom: 15px;
}

.cuenta-item {
    background: #0b0914;
    padding: 12px 15px;
    border: 1px solid #3d3170;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.estado-activa {
    color: #00ff88;
    font-weight: bold;
}

.btn-crear-cuenta {
    background: transparent;
    border: 1px dashed #00d2ff;
    color: #00d2ff;
    width: auto;
    padding: 10px 20px;
}

.btn-crear-cuenta:hover {
    background: #00d2ff;
    color: #0b0914;
}

/* Tabla del Market */
.tabla-market {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.tabla-market th, .tabla-market td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #3d3170;
}

.tabla-market th {
    color: #b8b5d3;
}
/* =========================================
   VENTANA EMERGENTE (MODAL)
========================================= */
.modal-oculto {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 9, 20, 0.85); 
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-contenido {
    /* APLICAMOS EFECTO CRISTAL AQUÍ TAMBIÉN */
    background: rgba(20, 18, 38, 0.75);
    backdrop-filter: blur(5px);
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid #00d2ff;
    box-shadow: 0 0 25px rgba(0, 210, 255, 0.15);
    position: relative;
}

.cerrar-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #ff3333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.cerrar-modal:hover {
    color: #fff;
}

.modal-contenido h3 {
    color: #fff;
    margin-bottom: 10px;
}

.btn-guardar {
    background: #00d2ff;
    color: #0b0914;
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
    margin-top: 15px;
}

.btn-guardar:hover {
    background: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.6);
}
/* --- ESTILO PARA EL LOGO PRINCIPAL --- */
.logo-principal {
    display: block;
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 280px;
    height: auto;
    object-fit: contain;
}

/* =========================================
   LANDING PAGE: NAVBAR
========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 40px;
    background: rgba(20, 18, 38, 0.75);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid #2d2350;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #00d2ff;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 1px;
    text-decoration: none;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #b8b5d3;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #00d2ff;
}

.nav-derecha {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-estado {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #b8b5d3;
    background: rgba(11, 9, 20, 0.5);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #2d2350;
    white-space: nowrap;
}

.punto-online {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #00ff88;
    box-shadow: 0 0 8px #00ff88;
    animation: pulso-online 1.8s ease-in-out infinite;
}

@keyframes pulso-online {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
}

.separador-estado {
    opacity: 0.4;
}

/* =========================================
   BARRA DE ECONOMÍA: panel estático, fijo (no rota), justo
   debajo de la navbar y antes del título del Hero
========================================= */
.barra-economia {
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    margin: 24px auto 0;
    padding: 10px 28px;
    background: rgba(11, 9, 20, 0.6);
    border: 1px solid #2d2350;
    border-radius: 30px;
    color: #e0e0e0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-align: center;
}

/* =========================================
   LANDING PAGE: HERO
========================================= */
.hero {
    /* Sin altura fija ni centrado vertical: el bloque queda pegado arriba,
       justo debajo de la barra de economía */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 50px 20px 20px;
    scroll-margin-top: 76px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 20px rgba(0, 210, 255, 0.35), 0 2px 4px rgba(0, 0, 0, 0.95), 0 4px 18px rgba(0, 0, 0, 0.9);
    -webkit-text-stroke: 1.25px rgba(0, 0, 0, 0.85);
    margin-bottom: 18px;
}

.texto-gradiente {
    background: linear-gradient(135deg, #7b2cbf, #ff3333);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-subtitle {
    color: #b8b5d3;
    font-size: 18px;
    max-width: 600px;
    margin-bottom: 35px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.95), 0 2px 10px rgba(0, 0, 0, 0.85);
}

.hero-botones {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

/* =========================================
   LANDING PAGE: BOTONES DE ENLACE (hero y tarjetas)
========================================= */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s, color 0.2s, border-color 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, #7b2cbf, #ff3333);
    color: #fff;
}

.btn-primary:hover {
    opacity: 0.9;
}

.btn-secundario {
    background: transparent;
    border: 1px solid #00d2ff;
    color: #00d2ff;
}

.btn-secundario:hover {
    background: #00d2ff;
    color: #0b0914;
}

.btn-outline {
    background: rgba(11, 9, 20, 0.4);
    border: 1px solid #3d3170;
    color: #e0e0e0;
}

.btn-outline:hover {
    border-color: #00d2ff;
    color: #00d2ff;
}

/* =========================================
   LANDING PAGE: SECCIONES DE CONTENIDO
========================================= */
.seccion {
    max-width: 1100px;
    margin: 0 auto;
    padding: 30px 20px 60px;
    scroll-margin-top: 76px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.tarjeta-centrada {
    text-align: center;
}

/* Tarjetas de información clickeables: cursor + leve elevación/brillo al pasar el mouse */
.tarjeta-clic {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tarjeta-clic:hover,
.tarjeta-clic:focus-visible {
    transform: translateY(-4px) scale(1.02);
    border-color: #00d2ff;
    box-shadow: 0 0 20px rgba(0, 210, 255, 0.35);
}

.valor-destacado {
    font-size: 28px;
    font-weight: bold;
    margin: 8px 0;
}

.avatar-streamer {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7b2cbf, #00d2ff);
    color: #fff;
    font-size: 26px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

/* =========================================
   PÁGINA INFORMACIÓN: WIKI DE 2 COLUMNAS (menú lateral + lectura)
========================================= */
.contenedor-wiki {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
    margin-top: 30px;
}

.wiki-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wiki-tab {
    background: rgba(11, 9, 20, 0.5);
    border: 1px solid #2d2350;
    color: #b8b5d3;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: left;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.wiki-tab:hover {
    border-color: #00d2ff;
    color: #00d2ff;
}

.wiki-tab.activo {
    background: linear-gradient(135deg, #7b2cbf, #ff3333);
    color: #fff;
    border-color: transparent;
}

.wiki-contenido {
    background: rgba(20, 18, 38, 0.75);
    backdrop-filter: blur(5px);
    border: 1px solid #2d2350;
    border-radius: 8px;
    padding: 35px;
    min-height: 380px;
}

.wiki-panel {
    display: none;
}

.wiki-panel.activo {
    display: block;
}

.wiki-panel h3 {
    color: #00d2ff;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wiki-panel p {
    line-height: 1.7;
}

@media (max-width: 768px) {
    .navbar {
        flex-wrap: wrap;
        row-gap: 10px;
        padding: 12px 16px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 14px;
        font-size: 13px;
    }

    .nav-derecha {
        gap: 12px;
    }

    .nav-estado {
        font-size: 11px;
        padding: 5px 10px;
    }

    .barra-economia {
        max-width: 90%;
        font-size: 12px;
        padding: 8px 16px;
        white-space: normal;
    }

    /* La navbar puede ocupar 2 filas en mobile: se agranda el colchón
       superior del body para que el Hero nunca quede tapado */
    .landing-body {
        padding-top: 130px;
    }

    .hero {
        padding-top: 40px;
    }

    /* En mobile el menú queda arriba como lista vertical (no botones
       gigantes en fila) y el panel de lectura abajo, a todo el ancho */
    .contenedor-wiki {
        grid-template-columns: 1fr;
    }

    .wiki-contenido {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .nav-estado .separador-estado,
    .nav-estado {
        white-space: normal;
        text-align: center;
    }

    .hero-botones {
        flex-direction: column;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .btn {
        width: 100%;
        text-align: center;
    }
}