/* ========================================================
   PALENTROPÍA — ESTILOS DE LA ARENA (STANDAR.CSS)
   ======================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #080b10;
    color: #e1e4e8;
    line-height: 1.5;
    padding: 20px;
}

#cabecera {
    text-align: center;
    margin-bottom: 24px;
}

#cabecera .titulo {
    font-size: 2.2rem;
    font-weight: bold;
    color: #58a6ff;
    text-shadow: 0 0 15px rgba(88, 166, 255, 0.6), 0 0 5px rgba(88, 166, 255, 0.4);
    letter-spacing: 1px;
}

#cabecera .subtitulo {
    font-size: 0.95rem;
    color: #8b949e;
    letter-spacing: 0.5px;
}

#arena {
    max-width: 950px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* --- PANELES CON RELIEVE Y FILOS CELESTES DE NEÓN --- */
.panel {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 2px solid #58a6ff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 12px rgba(88, 166, 255, 0.25);
    position: relative;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #58a6ff, #bc8cff);
    box-shadow: 0 0 10px #58a6ff;
}

.panel h2 {
    font-size: 1.2rem;
    margin-bottom: 14px;
    color: #58a6ff;
    border-bottom: 1px solid rgba(88, 166, 255, 0.4);
    padding-bottom: 8px;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.4);
}

/* --- ENTRADA DE COMBATIENTES --- */
.entrada-combatiente {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.campo {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo label {
    font-size: 0.85rem;
    color: #58a6ff;
    font-weight: bold;
}

.campo input {
    background-color: #080b10;
    border: 1.5px solid #58a6ff;
    border-radius: 8px;
    padding: 12px;
    color: #f0f6fc;
    font-size: 1rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 6px rgba(88, 166, 255, 0.2);
    transition: all 0.2s ease;
}

.campo input:focus {
    outline: none;
    border-color: #79c0ff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 0 12px rgba(88, 166, 255, 0.6);
}

.nombre-combatiente {
    font-size: 0.95rem;
    color: #79c0ff;
    min-height: 20px;
    font-weight: 600;
}

.vs {
    font-weight: bold;
    color: #58a6ff;
    font-size: 1.3rem;
    padding-top: 15px;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.6);
}

/* --- CONTROL MANUAL --- */
.control-manual {
    margin-bottom: 15px;
    background: linear-gradient(135deg, #0d1117 0%, #161b22 100%);
    padding: 14px 16px;
    border-radius: 10px;
    border: 1.5px solid #58a6ff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4), inset 0 1px 1px rgba(255,255,255,0.08), 0 0 8px rgba(88, 166, 255, 0.2);
}

.control-manual-titulo {
    font-size: 0.85rem;
    color: #8b949e;
    margin-bottom: 10px;
    font-weight: bold;
}

.control-manual-opciones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.opcion-control {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #f0f6fc;
    cursor: pointer;
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    border: 1.5px solid #58a6ff;
    padding: 10px 12px;
    border-radius: 8px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    transition: all 0.2s ease;
}

.opcion-control:hover {
    background: linear-gradient(180deg, #30363d 0%, #21262d 100%);
    border-color: #79c0ff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 8px rgba(88, 166, 255, 0.4);
}

.opcion-control input[type="radio"] {
    accent-color: #58a6ff;
}

/* --- ZONA DE COMBATIENTES --- */
.zona-combatientes {
    display: grid;
    grid-template-columns: 1fr 90px 1fr;
    gap: 15px;
    align-items: stretch;
    width: 100%;
}

.tarjeta-combatiente {
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 2px solid #58a6ff;
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 12px rgba(88, 166, 255, 0.25);
    position: relative;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    transition: all 0.3s ease;
}

.tarjeta-combatiente::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #58a6ff, #bc8cff);
    box-shadow: 0 0 10px #58a6ff;
}

.cabecera-combatiente {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.tarjeta-combatiente .nombre {
    font-weight: 800;
    font-size: 1.35rem;
    color: #f0f6fc;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8), 0 0 8px rgba(88, 166, 255, 0.3);
    line-height: 1.2;
}

.tarjeta-combatiente .codigo {
    font-size: 0.8rem;
    color: #58a6ff;
    font-family: monospace;
    font-weight: bold;
    margin-top: 2px;
}

.tarjeta-combatiente .perfil {
    font-size: 0.8rem;
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    padding: 5px 10px;
    border-radius: 10px;
    border: 1.5px solid #58a6ff;
    color: #58a6ff;
    font-weight: 600;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 2px 4px rgba(0,0,0,0.3);
}

/* --- IMAGEN COMBATIENTE --- */
.contenedor-imagen-combatiente {
    width: 100%;
    overflow: hidden;
    border-radius: 10px;
    background-color: #080b10;
    border: 1.5px solid #58a6ff;
    display: none;
    justify-content: center;
    align-items: center;
    aspect-ratio: 9 / 16;
    max-height: 360px;
    box-shadow: inset 0 0 12px rgba(88, 166, 255, 0.3), 0 4px 8px rgba(0,0,0,0.5);
}

.imagen-combatiente {
    width: 100%;
    height: 100%;
    object-fit: fill;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.imagen-combatiente:hover {
    transform: scale(1.03);
}

.victorias-serie {
    font-size: 1.05rem;
    color: #f0f6fc;
    font-weight: bold;
    background: linear-gradient(180deg, #161b22 0%, #0d1117 100%);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1.5px solid #58a6ff;
    text-align: center;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8), 0 4px 8px rgba(0,0,0,0.4), 0 0 8px rgba(88, 166, 255, 0.2);
}

/* --- BARRAS DE VIDA Y FATIGA --- */
.vida, .fatiga {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vida-texto, .fatiga-texto {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #8b949e;
    font-weight: 600;
}

.barra-vida, .barra-fatiga {
    background-color: #080b10;
    border-radius: 6px;
    height: 12px;
    overflow: hidden;
    border: 1.5px solid #58a6ff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.9);
}

.vida-relleno {
    background: linear-gradient(180deg, #2ea043 0%, #238636 100%);
    height: 100%;
    width: 100%;
    box-shadow: 0 0 8px rgba(46, 160, 67, 0.6);
    transition: width 0.3s ease;
}

.fatiga-relleno {
    background: linear-gradient(180deg, #d29922 0%, #9e6a03 100%);
    height: 100%;
    width: 100%;
    box-shadow: 0 0 8px rgba(210, 153, 34, 0.6);
    transition: width 0.3s ease;
}

/* --- ESTADÍSTICAS Y CENTRO DE COMBATE --- */
.stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    background-color: #080b10;
    padding: 10px;
    border-radius: 8px;
    border: 1.5px solid #58a6ff;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.8);
}

.estado {
    font-size: 0.85rem;
    color: #79c0ff;
    min-height: 22px;
    font-weight: 600;
}

.centro-combate {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    text-align: center;
    background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
    border: 2px solid #58a6ff;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 0 12px rgba(88, 166, 255, 0.25);
}

.icono-vs {
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(88, 166, 255, 0.6);
}

.turno {
    font-size: 0.9rem;
    font-weight: bold;
    color: #58a6ff;
}

.iniciativa {
    font-size: 0.75rem;
    color: #8b949e;
}

/* --- BOTONES Y ACCIONES --- */
button {
    cursor: pointer;
    background: linear-gradient(180deg, #2ea043 0%, #238636 100%);
    color: white;
    border: 1.5px solid #58a6ff;
    border-radius: 10px;
    padding: 12px 18px;
    font-size: 0.95rem;
    font-weight: bold;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 0 6px rgba(88, 166, 255, 0.3);
}

button:hover:not(:disabled) {
    background: linear-gradient(180deg, #3fb950 0%, #2ea043 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(46, 160, 67, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 0 10px rgba(88, 166, 255, 0.5);
}

button:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 1px 2px rgba(0,0,0,0.5);
}

button:disabled {
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    border-color: #30363d;
    color: #484f58;
    cursor: not-allowed;
    box-shadow: none;
}

#botonPreparar {
    width: 100%;
    margin-bottom: 10px;
    background: linear-gradient(180deg, #388bfd 0%, #1f6feb 100%);
    border: 1.5px solid #79c0ff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(56, 139, 253, 0.5);
}

#botonPreparar:hover:not(:disabled) {
    background: linear-gradient(180deg, #58a6ff 0%, #388bfd 100%);
    box-shadow: 0 6px 14px rgba(56, 139, 253, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 14px rgba(88, 166, 255, 0.7);
}

#botonSerie {
    display: none;
    width: 100%;
    background: linear-gradient(180deg, #a371f7 0%, #8957e5 100%);
    border: 1.5px solid #d2a8ff;
    margin-left: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(137, 87, 229, 0.5);
}

#botonSerie:hover:not(:disabled) {
    background: linear-gradient(180deg, #bc8cff 0%, #a371f7 100%);
    box-shadow: 0 6px 14px rgba(137, 87, 229, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 14px rgba(188, 140, 255, 0.7);
}

.mensaje {
    margin-top: 10px;
    font-size: 0.85rem;
    color: #8b949e;
    text-align: center;
}

.botones-acciones {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.accion {
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    border: 1.5px solid #58a6ff;
    color: #f0f6fc;
    border-radius: 10px;
}

.accion:hover:not(:disabled) {
    background: linear-gradient(180deg, #30363d 0%, #21262d 100%);
    border-color: #79c0ff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.2), 0 0 10px rgba(88, 166, 255, 0.5);
}

.accion.defensa {
    background: linear-gradient(180deg, #388bfd 0%, #1f6feb 100%);
}

.accion.defensa:hover:not(:disabled) {
    background: linear-gradient(180deg, #58a6ff 0%, #388bfd 100%);
    box-shadow: 0 4px 12px rgba(56, 139, 253, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 12px rgba(88, 166, 255, 0.6);
}

.boton-auto {
    width: 100%;
    background: linear-gradient(180deg, #a371f7 0%, #8957e5 100%);
    border-radius: 10px;
    border: 1.5px solid #d2a8ff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3), 0 0 8px rgba(137, 87, 229, 0.5);
}

.boton-auto:hover:not(:disabled) {
    background: linear-gradient(180deg, #bc8cff 0%, #a371f7 100%);
    box-shadow: 0 6px 14px rgba(137, 87, 229, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 0 14px rgba(188, 140, 255, 0.7);
}

/* --- REGISTRO Y RESULTADOS --- */
.registro-combate {
    background-color: #080b10;
    border: 1.5px solid #58a6ff;
    border-radius: 10px;
    padding: 14px;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.9), 0 0 8px rgba(88, 166, 255, 0.15);
}

.registro-vacio {
    color: #484f58;
    text-align: center;
    font-style: italic;
}

.linea-registro {
    border-bottom: 1px solid #21262d;
    padding-bottom: 4px;
}

.resultado-oculto {
    display: none;
}

#resultado {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.resultado-icono {
    font-size: 2.5rem;
}

#resultadoTitulo {
    font-size: 1.4rem;
    color: #58a6ff;
}

#resultadoTexto {
    font-size: 0.95rem;
    color: #8b949e;
}

/* =========================================================
   ESTILOS ADICIONALES — MODO INDIVIDUAL Y SELECCIÓN DE SLOT
   ======================================================== */

.boton-central-seleccion {
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    border: 2px solid #58a6ff;
    color: #58a6ff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.3);
    transition: all 0.2s ease;
    margin: 0 auto;
}

.boton-central-seleccion:hover {
    background: #58a6ff;
    color: #080b10;
    box-shadow: 0 0 16px rgba(88, 166, 255, 0.6);
    transform: scale(1.08);
}

.indicador-check {
    display: inline-block;
    margin-left: 6px;
    font-size: 0.9rem;
    vertical-align: middle;
}

.tarjeta-combatiente.foco-activo {
    border-color: #79c0ff;
    box-shadow: 0 8px 30px rgba(88, 166, 255, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.2), 0 0 18px rgba(88, 166, 255, 0.5);
}

body.modo-torneo .ocultar-en-torneo {
    display: none !important;
}

body:not(.modo-torneo) .ocultar-en-individual {
    display: none !important;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    body { padding: 10px; }
    #arena { max-width: 100%; gap: 12px; }
    .zona-combatientes { grid-template-columns: 1fr; gap: 15px; }
    .tarjeta-combatiente { width: 100%; max-width: 100%; }
    .centro-combate { flex-direction: row; justify-content: space-around; padding: 12px; }
    .entrada-combatiente { flex-direction: column; gap: 10px; }
    .vs { padding-top: 0; text-align: center; }
    .botones-acciones { grid-template-columns: 1fr; }
}

.boton-circular-ajustes {
    background: linear-gradient(180deg, #21262d 0%, #161b22 100%);
    border: 1.5px solid #58a6ff;
    color: #58a6ff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    transition: all 0.2s ease;
}

.boton-circular-ajustes:hover {
    background: #58a6ff;
    color: #080b10;
    box-shadow: 0 0 10px rgba(88, 166, 255, 0.6);
    transform: scale(1.08);
}

.boton-auto {
    margin-top: 20px;
    border-top: 1.5px solid #58a6ff;
    padding-top: 16px;
    box-shadow: 0 -2px 6px rgba(88, 166, 255, 0.2);
}


