* {
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

:root {
    --bg: #1a191a;
    --text: #e6e6e6;
    --muted: #9a9a9a;
    --accent: #00ff9f;
    --danger: #ff5c5c;
    --info: #7ec0ff;
    --gold: #ffd166;
    font-size: 16px;
}

html,
body {
    height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Cinzel', serif;
    line-height: 1.5rem;
}

/* ====== SISTEMA DE CAMBIO DE FUENTES ====== */
.font-toggle-btn {
    position: fixed;
    top: 25px;
    right: 25px;
    background: #2a2a2a;
    border: 2px solid #13878b;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
}

.font-toggle-btn:hover {
    background: #13878b;
    transform: scale(1.1);
}

.font-selector {
    position: fixed;
    top: 75px;
    right: 25px;
    background: #1a1a1a;
    border: 2px solid #13878b;
    border-radius: 8px;
    padding: 10px;
    z-index: 1001;
    display: none;
    flex-direction: column;
    gap: 5px;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.font-option {
    background: #2a2a2a;
    border: 1px solid #444;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.font-option:hover {
    background: #0f585a;
    border-color: #2ac0c0;
}

.font-option.active {
    background: #13878b;
    border-color: #00ffff;
    color: #fff;
}

.font-medieval { font-family: 'MedievalSharp', cursive; }
.font-cinzel { font-family: 'Cinzel', serif; }
.font-gothic { font-family: 'UnifrakturMaguntia', cursive; }
.font-retro { font-family: 'Press Start 2P', monospace; }
.font-monospace { font-family: 'Source Code Pro', monospace; }
.font-roboto-mono { font-family: 'Roboto Mono', monospace; }
.font-jetbrains { font-family: 'JetBrains Mono', monospace; }
.font-syne { font-family: 'Syne Mono', monospace; }

body.font-retro .console,
body.font-retro .hud,
body.font-retro .action-btn {
    font-size: 0.85em;
}

body.font-retro .console {
    line-height: 2;
}

body.font-gothic .console,
body.font-gothic .hud {
    font-size: 0.9em;
    line-height: 1.4;
}

/* ====== ANIMACIONES DE TEXTO EN CONSOLA ====== */
.line {
    animation: textAppear 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(10px);
    margin-top: 2px;
    /* padding: 10px 5px;
    border-radius: 20px;
    background-color: #151515; */
    /*color: #000000 !important;*/
}

@keyframes textAppear {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delay escalonado para líneas consecutivas */
.line:nth-child(1) { animation-delay: 0.1s; }
.line:nth-child(2) { animation-delay: 0.2s; }
.line:nth-child(3) { animation-delay: 0.3s; }
.line:nth-child(4) { animation-delay: 0.4s; }
.line:nth-child(5) { animation-delay: 0.5s; }
.line:nth-child(6) { animation-delay: 0.6s; }
.line:nth-child(7) { animation-delay: 0.7s; }
.line:nth-child(8) { animation-delay: 0.8s; }
.line:nth-child(9) { animation-delay: 0.9s; }
.line:nth-child(10) { animation-delay: 1.0s; }
.line:nth-child(n+11) { animation-delay: 0.3s; }

.line.sys {
    animation-duration: 0.8s;
    animation-timing-function: ease-in-out;
}

.line.important {
    animation: importantAppear 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes importantAppear {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }
    50% {
        opacity: 0.7;
        transform: translateY(-5px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.line.combat {
    animation: combatAppear 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes combatAppear {
    0% {
        opacity: 0;
        transform: translateX(-20px) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.line.damage {
    animation: damageAppear 0.4s cubic-bezier(0.6, -0.28, 0.735, 0.045) forwards;
}

@keyframes damageAppear {
    0% {
        opacity: 0;
        transform: translateX(10px) scale(1.2);
        color: #ff4444;
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

.line.heal {
    animation: healAppear 0.7s ease-out forwards;
}

@keyframes healAppear {
    0% {
        opacity: 0;
        transform: translateY(15px) scale(0.8);
        filter: brightness(1.5);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        filter: brightness(1);
    }
}

.line.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--accent);
    white-space: nowrap;
    animation: 
        typewriter 2s steps(40, end),
        blinkCursor 0.8s step-end infinite;
}

@keyframes typewriter {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blinkCursor {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent); }
}

.line.fade-out {
    animation: fadeOut 0.5s ease-out forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.line.new-message::before {
    content: "●";
    color: var(--accent);
    margin-right: 8px;
    font-size: 0.8em;
    animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* ====== ANIMACIONES DE TEXTO POR COLOR ====== */
.color-danger {
    color: var(--danger);
    animation: dangerShake 3s ease-in-out infinite;
    display: inline-block;
    transform-origin: center;
}

@keyframes dangerShake {
    0%, 100% { transform: translateX(0) scale(1); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-1px) scale(1.02); }
    20%, 40%, 60%, 80% { transform: translateX(1px) scale(1.02); }
    15%, 45%, 75% { transform: translateY(-1px); }
    25%, 55%, 85% { transform: translateY(1px); }
}

.color-gold {
    color: var(--gold);
    animation: goldPulse 2.5s ease-in-out infinite;
    display: inline-block;
    text-shadow: 0 0 5px rgba(255, 209, 102, 0.3);
}

@keyframes goldPulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 209, 102, 0.3);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 10px rgba(255, 209, 102, 0.6),
                     0 0 15px rgba(255, 209, 102, 0.4);
    }
}

.color-accent {
    color: var(--accent);
    animation: floatUp 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes floatUp {
    0%, 100% { 
        transform: translateY(0);
        text-shadow: 0 0 5px rgba(0, 255, 159, 0.3);
    }
    50% { 
        transform: translateY(-2px);
        text-shadow: 0 0 10px rgba(0, 255, 159, 0.6),
                     0 0 15px rgba(0, 255, 159, 0.4);
    }
}

.color-info {
    color: var(--info);
    animation: waveFlow 4s ease-in-out infinite;
    display: inline-block;
}

@keyframes waveFlow {
    0%, 100% { 
        transform: translateY(0) scale(1);
        text-shadow: 0 0 3px rgba(126, 192, 255, 0.3);
    }
    33% { 
        transform: translateY(-1px) scale(1.02);
        text-shadow: 0 0 6px rgba(126, 192, 255, 0.5);
    }
    66% { 
        transform: translateY(1px) scale(0.98);
        text-shadow: 0 0 4px rgba(126, 192, 255, 0.4);
    }
}

.color-warning {
    color: #ffa500;
    animation: warningBlink 2s ease-in-out infinite;
    display: inline-block;
}

@keyframes warningBlink {
    0%, 50%, 100% { 
        opacity: 1;
        text-shadow: 0 0 5px rgba(255, 165, 0, 0.5);
    }
    25%, 75% { 
        opacity: 0.7;
        text-shadow: 0 0 2px rgba(255, 165, 0, 0.3);
    }
}

.color-purple {
    color: #b967ff;
    animation: mysticGlow 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes mysticGlow {
    0%, 100% { 
        text-shadow: 0 0 5px #b967ff,
                     0 0 10px rgba(185, 103, 255, 0.3);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 10px #b967ff,
                     0 0 20px rgba(185, 103, 255, 0.6),
                     0 0 30px rgba(185, 103, 255, 0.4);
        transform: scale(1.03);
    }
}

.color-legendary {
    color: #ff8c00;
    animation: legendaryPulse 2s ease-in-out infinite;
    display: inline-block;
    font-weight: bold;
}

@keyframes legendaryPulse {
    0%, 100% { 
        text-shadow: 0 0 5px #ff8c00,
                     0 0 10px rgba(255, 140, 0, 0.5);
        transform: scale(1);
    }
    50% { 
        text-shadow: 0 0 15px #ff8c00,
                     0 0 25px rgba(255, 140, 0, 0.8),
                     0 0 35px rgba(255, 140, 0, 0.6);
        transform: scale(1.05);
    }
}

/* ====== ANIMACIONES PARA RAREZAS DE ITEMS ====== */
.rarity-common { color: #969696; }
.rarity-uncommon { color: #1eff00; }
.rarity-rare { color: #0070dd; }
.rarity-epic { color: #a335ee; }
.rarity-legendary { color: #ff8000; }

.rarity-epic {
    font-weight: bold;
    text-shadow: 0 0 5px #a335ee;
    animation: epicVibrate 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes epicVibrate {
    0%, 100% { 
        text-shadow: 0 0 5px #a335ee,
                     0 0 10px rgba(163, 53, 238, 0.4);
        transform: translateX(0);
    }
    25% { transform: translateX(-0.5px) translateY(-0.5px); }
    50% { transform: translateX(0.5px) translateY(0.5px); }
    75% { transform: translateX(-0.3px) translateY(0.3px); }
}

.rarity-legendary {
    font-weight: bold;
    text-shadow: 0 0 8px #ff8000;
    animation: glowLegendary 3s ease-in-out infinite alternate;
    display: inline-block;
}

@keyframes glowLegendary {
    from { text-shadow: 0 0 5px #ff8000; transform: scale(1) rotateY(0deg); }
    to { text-shadow: 0 0 15px #ff8000, 0 0 20px #ff8000; transform: scale(1.05) rotateY(30deg); }
}

.rarity-rare {
    animation: rareShimmer 4s ease-in-out infinite;
    display: inline-block;
}

@keyframes rareShimmer {
    0%, 100% { 
        text-shadow: 0 0 3px rgba(0, 112, 221, 0.4);
        opacity: 1;
    }
    50% { 
        text-shadow: 0 0 8px rgba(0, 112, 221, 0.8),
                     0 0 12px rgba(0, 112, 221, 0.6);
        opacity: 0.9;
    }
}

.rarity-uncommon {
    animation: uncommonBreathe 3s ease-in-out infinite;
    display: inline-block;
}

@keyframes uncommonBreathe {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 3px rgba(30, 255, 0, 0.3);
    }
    50% { 
        transform: scale(1.02);
        text-shadow: 0 0 6px rgba(30, 255, 0, 0.6);
    }
}

.rarity-common {
    animation: commonFade 5s ease-in-out infinite;
    display: inline-block;
}

@keyframes commonFade {
    0%, 100% { opacity: 0.8; }
    50% { opacity: 1; }
}


/* ====== SISTEMA DE ESTADÍSTICAS EN GRID ====== */

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-name {
    text-align: left;
}

.stat-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 180px;
    gap: 80px;
    margin: 0 auto;
}

.stat-image img {
    width: 100%;
    height: 150px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
}

.stat-image img:hover {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    transform: scale(1.04);
    transition: transform 0.3s ease-in-out;
}

.extra-stats {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.stat-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    background-color: #1b1b1b;
    padding: 0px 2px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    gap: 10px;
    width: 100%;
}

.stat-group:hover {
    background-color: #2a2a2a;
    cursor: pointer;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    gap: 1px;
    margin: 8px 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* HEADERS - Fila 1 */
.stat-header:nth-child(1) { grid-column: 1; grid-row: 1; } /* Vida */
.stat-header:nth-child(2) { grid-column: 2; grid-row: 1; } /* Ataque */
.stat-header:nth-child(3) { grid-column: 3; grid-row: 1; } /* Defensa */

/* HEADERS - Fila 2 */
.stat-header:nth-child(4) { grid-column: 1; grid-row: 2; } /* Oro */
.stat-header:nth-child(5) { grid-column: 2 / span 2; grid-row: 2; } /* Ubicación - OCUPA 2 COLUMNAS */

/* VALUES - Fila 1 */
.stat-value:nth-child(6) { grid-column: 1; grid-row: 1; margin-top: 25px; } /* hp */
.stat-value:nth-child(7) { grid-column: 2; grid-row: 1; margin-top: 25px; } /* atk */
.stat-value:nth-child(8) { grid-column: 3; grid-row: 1; margin-top: 25px; } /* def */

/* VALUES - Fila 2 */
.stat-value:nth-child(9) { grid-column: 1; grid-row: 2; margin-top: 25px; } /* gold */
.stat-value:nth-child(10) { grid-column: 2 / span 2; grid-row: 2; margin-top: 25px; } /* location - OCUPA 2 COLUMNAS */

.stat-header {
    background: rgba(61, 61, 61, 0.451);
    padding: 1px 4px;
    text-align: center;
    font-size: 0.75rem;
    color: var(--muted);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px 6px 0 0;
}

.stat-value {
    background: rgba(0, 0, 0, 0.644);
    padding: 5px 4px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text);
    border: none;
}

/* Estilos específicos para cada stat */
#hp {
    color: #5cff5c;
    animation: heartbeat 2s ease-in-out infinite;
}

/* Estilos dinámicos para HP */
.hp-high {
    color: #5cff5c !important;
    animation: heartbeat 2s ease-in-out infinite !important;
}

.hp-medium {
    color: #ffa500 !important;  /* Naranja */
    animation: pulseWarning 1.5s ease-in-out infinite !important;
}

.hp-low {
    color: var(--danger) !important;  /* Rojo */
    animation: pulseDanger 1s ease-in-out infinite !important;
}

/* Animaciones para los estados de HP */
@keyframes pulseWarning {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 165, 0, 0.5);
    }
    50% { 
        transform: scale(1.05);
        text-shadow: 0 0 10px rgba(255, 165, 0, 0.8);
    }
}

@keyframes pulseDanger {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 5px rgba(255, 92, 92, 0.5);
    }
    50% { 
        transform: scale(1.08);
        text-shadow: 0 0 15px rgba(255, 92, 92, 0.9);
    }
}

#atk {
    color: var(--danger);
    animation: attackPulse 1.5s ease-in-out infinite;
}

#def {
    color: var(--info);
    animation: shieldGlow 3s ease-in-out infinite;
}

#gold {
    color: var(--gold);
    animation: goldSparkle 4s ease-in-out infinite;
}

#location {
    color: #b967ff;
    font-style: italic;
}

/* ====== ANIMACIONES PARA ESTADÍSTICAS EN HUD ====== */

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05); }
    50% { transform: scale(1); }
    75% { transform: scale(1.03); }
}

@keyframes attackPulse {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 3px rgba(255, 92, 92, 0.3);
    }
    50% { 
        transform: scale(1.08);
        text-shadow: 0 0 8px rgba(255, 92, 92, 0.6);
    }
}

@keyframes shieldGlow {
    0%, 100% { 
        text-shadow: 0 0 3px rgba(126, 192, 255, 0.3);
    }
    50% { 
        text-shadow: 0 0 10px rgba(126, 192, 255, 0.7),
                     0 0 15px rgba(126, 192, 255, 0.4);
    }
}

@keyframes goldSparkle {
    0%, 100% { 
        transform: scale(1);
        text-shadow: 0 0 3px rgba(255, 209, 102, 0.3);
    }
    25% { 
        transform: scale(1.04);
        text-shadow: 0 0 8px rgba(255, 209, 102, 0.6);
    }
    75% { 
        transform: scale(1.02);
        text-shadow: 0 0 5px rgba(255, 209, 102, 0.4);
    }
}

/* ====== ESTILOS BASE DEL JUEGO ====== */
.error-overlay {
    font-size: 14px;
}

.error-overlay h2 {
    font-size: 1.5em;
    text-align: center;
}

.error-overlay button {
    flex: 1;
    min-width: 150px;
    font-size: 14px;
}

.xp-progress {
    background: #333;
    border-radius: 3px;
    height: 6px;
    margin-top: 2px;
    overflow: hidden;
}

.xp-progress-bar {
    background: linear-gradient(90deg, #00ff9f, #00cc7f);
    height: 100%;
    transition: width 0.3s ease;
}

.luck-indicator {
    font-size: 0.8em;
    color: #b967ff;
}

#name {
    font-size: 1.25rem;
}

#title {
    font-size: 0.8rem;
}

.wrap {
    display: grid;
    grid-template-columns: 1fr 30em;
    gap: 12px;
    height: 100vh;
    padding: 12px;
    box-sizing: border-box;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-link {
    color: #888;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #9f7cff;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.console-top {
    display: flex;
    position: sticky;
    top: 0px;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 5px 10px;
    border: 2px solid #250e40;
    border-bottom: 2px solid #452264;
    background-color: #09060d;
    border-radius: 12px;
    z-index: 1000;
}

.console {
    background: #070109; /* #050505 */
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 6px 24px rgba(29, 1, 31, 0.7);
    overflow: auto;
    border: 2px solid #250e40;
    border-bottom: 2px solid #452264;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #9c4ae8 rgba(81, 41, 112, 0.2);
}



.console-inner {
    min-height: 0;
}

.line .time {
    color: var(--muted);
    font-size: 0.85em;
    margin-right: 8px;
}

.line .sys {
    color: var(--muted);
}

.actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}

.action-btn {
    background: #3d3d3d;
    color: #fff;
    border: 2px solid #242424;
    padding: 8px 12px;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    font-size: 0.95rem;
    min-height: 45px;
    display: flex;
    align-items: center;
}

.console {
    font-size: 1rem;
    line-height: 1.4;
}

.action-btn:hover {
    background: #243947;
    border-color: #135f8b;
}

.action-btn:active {
    transform: translateY(2px);
}

/* Botones que ocupan 2 columnas */
.action-btn.full-width {
    grid-column: 1 / -1;
}

/* Contenedor de la cuadrícula */
.controls-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
}


/* Para pantallas muy pequeñas */
@media (max-width: 480px) {
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .action-btn {
        grid-column: 1 / -1;
    }
}

.action-bucket {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

#character-img {
    border-radius: 24px;
    border: 5px solid #616161;
    border-bottom: 10px solid #7b5e23;
}

#target-img {
    border-radius: 24px;
    border: 5px solid #616161;
    border-bottom: 10px solid #7b5e23;
}

.hud {
    background: #0a0213; /*070707*/
    border: 2px solid #250e40;
    border-bottom: 2px solid #452264;
    border-radius: 12px;
    padding: 12px;
    min-height: 500px;
    color: var(--muted);
}

.small {
    font-size: 0.9em;
    color: var(--muted);
}

.choice {
    cursor: pointer;
}

.footer {
    display: flex;
    justify-content: center;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.hint {
    color: var(--muted);
    font-size: 0.9em;
}

.screen-controls {
    display: flex;
    gap: 6px;
}

.console::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.console::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 6px;
}

.console::-webkit-scrollbar-thumb:hover {
    background: #444;
}

.console::-webkit-scrollbar-track {
    background: #111;
}

.big-btn {
    font-size: 1.2rem;
    padding: 1rem 2rem;
    margin-top: 1rem;
    background: #222;
    color: #fff;
    border: 2px solid #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.big-btn:hover {
    background: #444;
}


/* ====== POPUP DE INICIO - FONDO ANIMADO DETRÁS ====== */
#startPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

/* Fondo negro estático base */
#startPopup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    background-image: url('https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fnaturaleza.animalesbiologia.com%2Fwp-content%2Fuploads%2F2022%2F10%2Fbosque-mesofilo-de-montana-o-niebla.jpg&f=1&nofb=1&ipt=0cffdf04f5a5a70c2c100444a4d6553616ec3f6561cbf7dc0919960b9a5e843b');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(2px) hue-rotate(220deg);
    z-index: -2;
}

/* Degradado animado encima del fondo negro */
#startPopup::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(43, 24, 3, 0.95) 0%,
        rgba(36, 31, 17, 0.8) 25%,
        rgba(14, 11, 6, 0.98) 50%,
        rgba(41, 19, 4, 0.8) 75%,
        rgba(41, 17, 8, 0.95) 100%
    );
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    z-index: -1;
    filter: blur(2px) hue-rotate(220deg);
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.popup-content {
    filter: blur(0px) hue-rotate(220deg);
    background: linear-gradient(180deg, rgba(46, 3, 28, 0.9) 0%, rgba(27, 1, 32, 0.9) 100%);
    border: 1px solid #87488d;
    border-radius: 45px;
    padding: 35px;
    width: 90%;
    max-width: 480px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.8),
        0 2px 8px rgba(255, 255, 255, 0.1);
    color: #f5f5f5;
    text-align: center;
    position: relative;
    animation: popupEntrance 0.4s ease-out;
    backdrop-filter: blur(5px);
}

.popup-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000000;
    background-image: url('https://external-content.duckduckgo.com/iu/?u=https%3A%2F%2Fpng.pngtree.com%2Fthumb_back%2Ffw800%2Fbackground%2F20240912%2Fpngtree-burning-paper-texture-background-image_16164008.jpg&f=1&nofb=1&ipt=3a638ad4ad37cbc3045bc02aa320ac2359d1b5e07a09e58346c7de6c19a80ea5');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.9;
    /*girar el fondo*/
    transform: rotateX(180deg);
    filter: blur(1px) hue-rotate(0deg);
    z-index: -2;
    border: 1px solid #8d6f48;
    border-radius: 45px;
}

.popup-content::after {
    content: '';
    position: absolute;
    border: 1px solid #8d6f48;
    border-radius: 45px;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(20, 11, 1, 0.85) 0%,
        rgba(20, 13, 5, 0.95) 25%,
        rgba(26, 21, 10, 0.9) 50%,
        rgba(51, 24, 6, 0.95) 75%,
        rgba(31, 11, 11, 0.9) 100%
    );
    background-size: 400% 400%;
    z-index: -1;
    filter: blur(0) hue-rotate(0deg);
}

@keyframes popupEntrance {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-title {
    font-size: 2.4rem;
    margin-top: 20px;
    color: #ffffff;
    font-weight: 700;
    letter-spacing: -4px;
    line-height: 0.1;
    margin-bottom: 20px;
}

.popup-subtitle {
    font-size: 1rem;
    margin-bottom: 30px;
    color: #b0b0b0;
    line-height: 1.2;
    transform: perspective(300px) rotateX(55deg) scale(1.2, 2);
    transform-origin: center;
    border-top: 1px solid transparent;
    background-image: linear-gradient(to right, 
        transparent 0%,
        transparent 15%,
        #fff 50%, 
        transparent 85%,
        transparent 100%);
    background-size: 100% 1px;
    background-position: top;
    background-repeat: no-repeat;
}

.form-group {
    margin-bottom: 24px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #ccaa4b;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input, .form-select {
    width: 100%;
    padding: 14px 16px;
    background: #1b1002;
    border: 2px solid #8d6f48;
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: #c09c4f;
    background: #311e04;
    box-shadow: 0 0 2px 1px rgba(223, 186, 132, 0.726);
}

.form-select option {
    background: #311e04;
    color: #ffffff;
}

#playerClass {
    filter: grayscale(1);
}

.character-preview {
    background: #1b1002;
    border: 2px solid #8d6f48;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.preview-title {
    color: #e0e0e0;
    font-weight: 600;
    margin-bottom: 18px;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

.preview-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    font-size: 0.9rem;
}

.preview-stats div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #312a20;
}

.preview-stats b {
    color: rgb(214, 197, 174);
    font-weight: 600;
}

.start-button {
    background: #332008;
    border: 2px solid #8d6f48;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 10px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

.start-button:hover {
    background: #e2e1e1;
    color: #353434;
    border: 2px solid #e2e1e1;
    font-size: 1.3rem;
    letter-spacing: 2px;
    transform: translateY(-1px);
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
}

.start-button:active {
    transform: translateY(0) scale(0.9);
    opacity: 0.5;
    transition: all 0.1s ease-in-out;
}

.start-button.loading {
    background: #666666;
    color: #cccccc;
    pointer-events: none;
}

.version-info {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #666666;
}

.version-info span {
    display: block;
    margin-top: 4px;
}

.title-header {
    display: flex;
    margin: 0 auto;
    margin-bottom: 1rem;
    min-height: 150px;
    max-height: 150px;
    justify-content: center;
    /*border-bottom: 1px solid var(--accent-orange);*/
}

.title-logo {
    filter: hue-rotate(-220deg);
    height: 150px;
    margin: 0;
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.title-logo:hover {
    transform: translateY(-5px) scale(1.05);
    transition: all 0.3s ease;
}

/* Animación de salida */
.fade-out {
    animation: smoothExit 0.9s ease-in-out forwards;
}

@keyframes smoothExit {
    0% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1) rotate(2deg);
        filter: blur(1px);
    }
    100% {
        opacity: 0;
        transform: scale(0.5) rotate(-5deg);
        filter: blur(20px);
    }
}

/* Estados de focus */
.form-input:focus, .form-select:focus {
    transform: translateY(-1px);
}

/* Efectos hover sutiles */
.form-input:hover, .form-select:hover {
    border-color: #666666;
}

/* Responsive */
@media (max-width: 600px) {
    .popup-content {
        padding: 25px;
        margin: 15px;
    }
    
    .popup-title {
        font-size: 2rem;
    }
    
    .popup-subtitle {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .start-button {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .preview-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .popup-content {
        padding: 20px;
    }
    
    .popup-title {
        font-size: 1.8rem;
    }
    
    .form-input, .form-select {
        padding: 12px 14px;
    }
}


/* Contenedor relativo para que el popup se posicione respecto a él */
.character-preview {
    position: relative; 
    margin: 10px 0;
    text-align: center;
}

/* El botón que dispara las estadísticas */
.preview-trigger {
    background: rgba(141, 111, 72, 0.2);
    border: 1px solid #8d6f48;
    color: #ccaa4b;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.preview-trigger:hover {
    background: #8d6f48;
    color: #fff;
}

/* El mini-popup de estadísticas */
.stats-floating-pane {
    display: none; /* Se activa con JS */
    position: absolute;
    bottom: 110%; /* Aparece arriba del botón */
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: #1b1002;
    border: 2px solid #ccaa4b;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.8);
    z-index: 100;
    animation: slideUp 0.3s ease-out;
}

/* Pequeña flecha debajo del popup */
.stats-floating-pane::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -8px;
    border-width: 8px;
    border-style: solid;
    border-color: #ccaa4b transparent transparent transparent;
}

@keyframes slideUp {
    from { opacity: 0; transform: translate(-50%, 10px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

/* Ajuste de los items de stats para que sean más compactos */
.stats-grid-startup {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    text-align: left;
}

.stat-item {
    font-size: 0.85rem;
    display: flex;
    flex-direction: column;
    text-align: center;
    filter: hue-rotate(-220deg);
}

.stat-label {
    color: #888;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.image-upload-wrapper {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 10px auto;
    cursor: pointer;
}

/* El input oculto que detecta el click */
.file-input-hidden {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10; /* Siempre encima para capturar el click */
}

/* El contenedor visual */
.image-custom-display {
    width: 100%;
    height: 100%;
    border: 2px dashed #7d488d;
    border-radius: 15px; /* O 50% para circular */
    background: #10021b;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.3s ease;
    filter: hue-rotate(-220deg);
}

.image-upload-wrapper:hover .image-custom-display {
    border-color: #a462ca;
    background: #1c052a;
    transform: scale(1.05);
}

#previewImage {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Importante para que no se deforme la foto */
}

.upload-placeholder {
    color: #6e488d;
    font-size: 0.8rem;
    text-align: center;
}







/* ====== SISTEMA DE CÓDIGOS PROMOCIONALES ====== */
.promo-toggle-btn {
    position: fixed;
    top: 25px;
    right: 90px;
    background: #2a2a2a;
    border: 2px solid #cd7f32;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
}

.promo-toggle-btn:hover {
    background: #cd7f32;
    transform: scale(1.1);
}

.promo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.promo-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #222222 100%);
    border: 3px solid #cd7f32;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 0 30px rgba(205, 127, 50, 0.5);
    color: #e0e0e0;
    animation: modalAppear 0.3s ease-out;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.promo-header {
    background: linear-gradient(90deg, #8b4513, #cd7f32);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.promo-header h2 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.promo-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.promo-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.promo-body {
    padding: 20px;
}

.promo-input {
    width: 100%;
    padding: 12px;
    background: #2a2a3a;
    border: 2px solid #8b4513;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    margin: 10px 0;
    font-family: inherit;
    text-transform: uppercase;
    transition: all 1s ease;
}

.promo-input:focus {
    outline: none;
    border-color: #cd7f32;
    box-shadow: 0 0 10px rgba(205, 127, 50, 0.3);
    transition: all 0.3s ease;
}

.redeem-button {
    width: 100%;
    background: linear-gradient(135deg, #8b4513, #cd7f32);
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.redeem-button:hover {
    background: linear-gradient(135deg, #cd7f32, #8b4513);
    transform: translateY(-2px);
}

.redeem-button:active {
    transform: translateY(0);
}

.promo-result {
    position: fixed;
    bottom: 1rem;
    left: 50%;
    transform: translate(-50%, -50%);
    /* background: #1a1a2e;
    border: 2px solid #cd7f32; */
    width: 400px;
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    min-height: 20px;
    font-size: 1.1rem;
}

.promo-success {
    color: #00ff9f;
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid rgba(0, 255, 159, 0.3);
    padding: 10px;
    border-radius: 4px;
    animation: successPulse 0.6s ease-in-out;
}

.promo-error {
    color: #ff5c5c;
    background: rgba(255, 92, 92, 0.1);
    border: 1px solid rgba(255, 92, 92, 0.3);
    padding: 10px;
    border-radius: 4px;
}

.promo-processing {
    color: #7ec0ff;
    font-style: italic;
}

.promo-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 8px 8px;
}

.promo-hint {
    color: #b0b0b0;
    font-size: 0.85rem;
    text-align: center;
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* ====== SISTEMA DE NOTAS DE PARCHE ====== */
.patch-toggle-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #4a86e8;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    z-index: 1000;
    transition: all 0.3s ease;
    /* Importante para posicionar el badge */
}

.patch-toggle-btn:hover {
    background: #3a76d8;
    transform: scale(1.1);
}

/* Indicador de notificación */
.patch-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

/* Animación de pulso para llamar la atención */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(255, 68, 68, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

.patch-toggle-btn.has-updates {
    animation: pulse 2s infinite;
    border-color: #ff6b6b;
    background: #3a2a2a;
}

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

.patch-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.patch-modal-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #222222 100%);
    border: 3px solid #4a86e8;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 780px;
    max-height: 90vh;
    box-shadow: 0 0 30px rgba(74, 134, 232, 0.5);
    color: #e0e0e0;
    animation: modalAppear 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.patch-header {
    background: linear-gradient(90deg, #2d5aa0, #4a86e8);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.patch-header h2 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.patch-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.patch-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.patch-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    font-family: 'Courier New', Courier, monospace;
}

.patch-version-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.patch-version-selector label {
    font-weight: bold;
    color: #b0b0b0;
}

.version-select {
    background: #2a2a3a;
    border: 2px solid #4a86e8;
    border-radius: 100px;
    color: #fff;
    padding: 5px 10px;
    font-family: inherit;
}

.patch-content {
    line-height: 1.2;
}

.patch-version-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.patch-version-header h3 {
    margin: 0;
    color: #4a86e8;
}

.important-badge {
    background: #ff3e3e;
    color: white;
    padding: 8px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    animation: glowImportant 2s ease-in-out infinite alternate;
    cursor: pointer;
    transition: transform 0.8s ease;
}

.important-badge:hover {
    transform: scale(1.1);
    transition: all 0.5s ease;
}

.important-badge:active {
    transform: scale(1.25);
    transition: all 0.1s ease;
}

@keyframes glowImportant {
    from { box-shadow: 0 0 5px #ff2121; }
    to { box-shadow: 0 0 15px #ff3939; }
}

.patch-date {
    color: #b0b0b0;
    font-style: italic;
    margin-bottom: 15px;
    font-size: 0.8rem;
}

.patch-features {
    min-height: 350px;       /* Altura mínima */
    max-height: 350px;       /* Altura máxima */
    overflow-y: auto;        /* Scroll vertical cuando el contenido excede la altura máxima */
    padding: 0;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(74, 134, 232, 0.3);
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 0.8rem;
    margin-right: 3px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    
    /* Estilos opcionales para mejorar la apariencia del scroll */
    scrollbar-width: thin;
    scrollbar-color: #4a86e8 rgba(255, 255, 255, 0.1);

    user-select: none;
}

/* Personalización del scroll para navegadores WebKit (Chrome, Safari, Edge) */
.patch-features::-webkit-scrollbar {
    width: 8px;
}

.patch-features::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.patch-features::-webkit-scrollbar-thumb {
    background: #4a86e8;
    border-radius: 4px;
}

.patch-features::-webkit-scrollbar-thumb:hover {
    background: #3a76d8;
}

.patch-features h4 {
    color: #4a86e8;
    margin-bottom: 10px;
    margin-top: 0;
    border-bottom: 2px solid #4a86e8;
    border-radius: 10px 10px 0 0;
    padding: 10px;
    position: sticky; /* Opcional: mantener el título visible al hacer scroll */
    top: 0;
    background-color: #292929;
    z-index: 1;
}

.patch-features ul {
    margin: 0;
    padding-left: 20px;
    font-size: 0.9rem;
    list-style: none;
    /*white-space: pre-line;*/
}

.patch-features li {
    margin-bottom: 12px;
    position: relative;
    transition: all 0.8s ease;
}

.patch-features li:hover {
    color: #4a86e8;
    cursor: pointer;
    transition: all 0.3s ease;
}

.patch-features li::before {
    content: "";
    position: absolute;
    left: -20px;
}

.patch-footer {
    padding: 15px 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.mark-read-button {
    background: linear-gradient(135deg, #2d5aa0, #4a86e8);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mark-read-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #4a86e8, #2d5aa0);
    transform: translateY(-1px);
}

.mark-read-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.patch-game-version {
    color: #b0b0b0;
    font-size: 0.85rem;
}

.patch-error {
    color: #ff6b6b;
    text-align: center;
    padding: 20px;
}


/* ====== CONTROLES DE AUDIO ====== */
.audio-controls {
    display: flex; /*muestra u oculta controles*/
    position: fixed;
    bottom: 50px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #32b8cd;
    border-radius: 8px;
    padding: 1px 10px;
    z-index: 999;
    font-size: 0.8rem;
    cursor: pointer;
}

.audio-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 5px 0;
}

.audio-control-group label {
    color: #e0e0e0;
    min-width: 70px;
}

.audio-controls input[type="range"] {
    width: 80px;
}

.audio-controls button {
    background: #333;
    border: 1px solid #555;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
}

.audio-controls button:hover {
    background: #444;
}


/* ====== ESTILOS PARA BUFFOS Y EFECTOS ====== */
.buffs-section {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.178);
    border-radius: 6px;
    padding: 0px;
    margin-top: 10px;
}

.buffs-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-height: 100px;
    overflow-y: auto;
}

.buff-item {
    animation: buffPulse 2s ease-in-out infinite;
    border-left: 3px solid;
}

@keyframes buffPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.buff-turns {
    background: rgba(0, 0, 0, 0.4);
    padding: 1px 4px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.205);
    font-weight: bold;
}

/* Colores para diferentes tipos de buffos */
.buff-item.color-danger {
    border-left-color: var(--danger);
    background: linear-gradient(90deg, rgba(255,92,92,0.1), transparent);
}

.buff-item.color-info {
    border-left-color: var(--info);
    background: linear-gradient(90deg, rgba(126,192,255,0.1), transparent);
}

.buff-item.color-warning {
    border-left-color: var(--warning);
    background: linear-gradient(90deg, rgba(255,165,0,0.1), transparent);
}

.buff-item.color-gold {
    border-left-color: var(--gold);
    background: linear-gradient(90deg, rgba(255,209,102,0.1), transparent);
}

/* Scrollbar personalizado para buffos */
.buffs-container::-webkit-scrollbar {
    width: 4px;
}

.buffs-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}


/* ====== SISTEMA DE GESTIÓN DE GUARDADOS ====== */
.save-manager-toggle-btn {
    position: fixed;
    top: 25px;
    right: 155px;
    background: #2a2a2a;
    border: 2px solid #4CAF50;
    color: #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 1000;
    transition: all 0.3s ease;
}

.save-manager-toggle-btn:hover {
    background: #4CAF50;
    transform: scale(1.1);
}

.save-manager-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1002;
}

.save-manager-content {
    background: linear-gradient(135deg, #1a2a1a 0%, #222222 100%);
    border: 3px solid #4CAF50;
    border-radius: 12px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 30px rgba(76, 175, 80, 0.5);
    color: #e0e0e0;
    animation: modalAppear 0.3s ease-out;
}

.save-manager-header {
    background: linear-gradient(90deg, #2E7D32, #4CAF50);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.save-manager-header h2 {
    margin: 0;
    color: white;
    font-size: 1.3rem;
}

.save-manager-close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.save-manager-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.save-manager-body {
    padding: 20px;
}

.save-manager-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #444;
}

.save-manager-section:last-of-type {
    border-bottom: none;
}

.save-manager-section h3 {
    margin: 0 0 10px 0;
    color: #4CAF50;
    font-size: 1.1rem;
}

.save-manager-section p {
    margin: 0 0 15px 0;
    color: #b0b0b0;
    font-size: 0.9rem;
}

.save-manager-button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.export-button {
    background: linear-gradient(135deg, #2E7D32, #4CAF50);
    color: white;
}

.export-button:hover {
    background: linear-gradient(135deg, #4CAF50, #2E7D32);
    transform: translateY(-2px);
}

.import-button {
    background: linear-gradient(135deg, #1976D2, #2196F3);
    color: white;
}

.import-button:hover {
    background: linear-gradient(135deg, #2196F3, #1976D2);
    transform: translateY(-2px);
}

.import-confirm-button {
    background: linear-gradient(135deg, #FF9800, #FF5722);
    color: white;
}

.import-confirm-button:hover:not(:disabled) {
    background: linear-gradient(135deg, #FF5722, #FF9800);
    transform: translateY(-2px);
}

.import-confirm-button:disabled {
    background: #666;
    cursor: not-allowed;
    opacity: 0.6;
}

.file-input-container {
    margin-bottom: 5px;
}

.file-name {
    display: block;
    margin-top: 2px;
    font-size: 0.85rem;
    color: #888;
    font-style: italic;
    text-align: center;
}

.save-manager-result {
    display: none;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    font-weight: bold;
    min-height: 20px;
    font-size: 0.9rem;
}

.save-manager-result.success {
    display: block;
    color: #00ff9f;
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid rgba(0, 255, 159, 0.3);
}

.save-manager-result.error {
    display: block;
    color: #ff5c5c;
    background: rgba(255, 92, 92, 0.1);
    border: 1px solid rgba(255, 92, 92, 0.3);
}

/* Añadir al CSS existente */
.save-manager-result.corrupted {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid rgba(255, 68, 68, 0.3);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.save-manager-warning {
    background: rgba(255, 152, 0, 0.1);
    border: 1px solid rgba(255, 152, 0, 0.3);
    border-radius: 6px;
    padding: 12px;
    margin-top: 5px;
    color: #FF9800;
    font-size: 0.9rem;
    text-align: center;
    line-height: normal;
}

.new-game-button {
    background: linear-gradient(135deg, #e81818, #ff4e4e);
    border: 1px solid #ff4747;
}

.new-game-button:hover {
    background: linear-gradient(135deg, #ff4e4e, #e81818);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.new-game-button:active {
    transform: translateY(0);
}

.confirmation-warning {
    text-align: center;
    padding: 20px;
    margin: 0;
    line-height: 1.2;
}

.confirmation-warning h3 {
    color: #ff6b6b;
    margin-bottom: 15px;
}

.confirmation-warning p {
    margin-bottom: 20px;
    line-height: 1.5;
}

.current-game-info {
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
    text-align: left;
}

.current-game-info h4 {
    color: #ff6b6b;
    margin-top: 0;
    border-bottom: 1px solid #ff6b6b;
    padding-bottom: 8px;
}

.current-game-info p {
    margin: 8px 0;
    font-size: 14px;
}

.confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.confirmation-buttons button {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.confirmation-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


.luck-neutral { color: #888; }
.luck-lucky { color: #4CAF50; font-weight: bold; animation: glowGreen 2s infinite; }
.luck-unlucky { color: #f44336; font-weight: bold; animation: glowRed 2s infinite; }

@keyframes glowGreen {
    0%, 100% { text-shadow: 0 0 5px #4CAF50; }
    50% { text-shadow: 0 0 15px #4CAF50, 0 0 20px #4CAF50; }
}

@keyframes glowRed {
    0%, 100% { text-shadow: 0 0 5px #f44336; }
    50% { text-shadow: 0 0 15px #f44336, 0 0 20px #f44336; }
}

/* Añadir al CSS existente */
#restCooldown {
    font-size: 0.9rem;
    margin-top: 5px;
    padding: 3px 8px;
    background: rgba(255, 165, 0, 0.2);
    border-radius: 4px;
    border: 1px solid #ffa500;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 0.7; }
    50% { opacity: 1; }
    100% { opacity: 0.7; }
}


/*BOTONES CUSTOM*/

.navigation-btn {
    margin-top: 0px;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #202e48, #121526);
    border: 2px solid #625c8e;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(114, 107, 255, 0.4);
}

.navigation-btn:hover {
    background: linear-gradient(135deg, #202543, #32476f);
    border: 2px solid #948ec6;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(114, 107, 255, 0.6);
    transition: all 0.3s ease;
}

.cancel-btn {
    margin-top: 0px;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #682e2e, #321313);
    border: 2px solid #874848;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #541818, #ac3d3d);
    border: 2px solid #d96363;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    transition: all 0.3s ease;
}

.confirm-btn {
    margin-top: 0px;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #33682e, #173213);
    border: 2px solid #48874a;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(110, 255, 107, 0.4);
}

.confirm-btn:hover {
    background: linear-gradient(135deg, #2e5418, #3dac3d);
    border: 2px solid #63d963;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(110, 255, 107, 0.6);
    transition: all 0.3s ease;
}

.ability-btn {
    margin-top: 0px;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #222b3c, #171a2a);
    border: 2px solid #625c8e;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(114, 107, 255, 0.4);
}

.ability-btn:hover {
    background: linear-gradient(135deg, #202543, #343e54);
    border: 2px solid #948ec6;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(114, 107, 255, 0.6);
    transition: all 0.3s ease;
}

.attack-btn {
    margin-top: 0px;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #682e2e, #321313);
    border: 2px solid #874848;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.attack-btn:hover {
    background: linear-gradient(135deg, #541818, #ac3d3d);
    border: 2px solid #d96363;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 107, 107, 0.6);
    transition: all 0.3s ease;
}

.attack-btn:active {
    transform: translateY(2px);
}


.disabled-button {
    width: 100%;
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #151535, #13131e);
    border: 2px solid #251d38;
    border-radius: 6px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.5s ease;
    box-shadow: 0 4px 12px rgba(20, 14, 39, 0.4);
}

.disabled-button:hover {
    background: linear-gradient(135deg, #13131e, #151535);
    border: 2px solid #251d38;
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(14, 7, 30, 0.6);
    transition: all 0.3s ease;
}


.reliq-btn {
    margin-top: 0px;
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #642e68, #2c1332, #642e68);
    background-size: 200% 200%;
    border: 2px solid #784887;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(220, 107, 255, 0.5);
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 500px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    
    /* Animaciones combinadas */
    animation: 
        gradientShift 4s ease infinite,
        gentlePulsePurple 3s ease-in-out infinite,
        subtleFloat 6s ease-in-out infinite;
}

/* Efecto de brillo energético (Opción 4) */
.reliq-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(188, 107, 255, 0.1) 0%, transparent 50%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    animation: energyPulse 3s ease-in-out infinite;
}

/* Efecto de barrido luminoso (Opción 3) */
.reliq-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s ease;
}

.reliq-btn:hover::after {
    left: 100%;
}

.reliq-btn:hover {
    /* Transformaciones 3D (Opción 3) */
    transform: translateY(-4px) rotateX(3deg) rotateY(2deg) scale(1.08);
    
    /* Gradiente mejorado (Opción 1) */
    background: linear-gradient(135deg, #401e57, #843eaa, #401e57);
    background-size: 200% 200%;
    
    /* Efectos visuales mejorados */
    border: 2px solid #d963bd;
    box-shadow: 
        0 12px 30px rgba(188, 107, 255, 0.8),
        0 0 0 3px rgba(217, 99, 189, 0.4),
        inset 0 0 25px rgba(255, 255, 255, 0.1);
    
    /* Texto más brillante */
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8),
                 0 0 20px rgba(188, 107, 255, 0.6);
    
    /* Animaciones más rápidas al hover */
    animation: 
        gradientShift 2s ease infinite,
        gentlePulsePurple 1.5s ease-in-out infinite,
        subtleFloat 3s ease-in-out infinite;
    
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reliq-btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 6px 20px rgba(188, 107, 255, 0.6),
        0 0 0 2px rgba(217, 99, 189, 0.3);
    transition: all 0.1s ease;
}

/* Animación de gradiente (Opción 1) */
@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Animación de pulso suave (Opción 1) */
@keyframes gentlePulsePurple {
    0%, 100% { 
        box-shadow: 0 4px 10px rgba(220, 107, 255, 0.5);
    }
    50% { 
        box-shadow: 0 0 15px rgba(220, 107, 255, 0.7);
    }
}

/* Animación de flotación sutil (Nueva) */
@keyframes subtleFloat {
    0%, 100% { 
        transform: translateY(0) rotateX(0) rotateY(0) rotateZ(0) scale(1);
    }
    33% { 
        transform: translateY(-2px) rotateX(2deg) rotateY(-1deg) rotateZ(0.5deg) scale(1.01);
    }
    66% { 
        transform: translateY(-1px) rotateX(-1deg) rotateY(2deg) rotateZ(-0.5deg) scale(1.005);
    }
}

/* Animación de energía pulsante (Opción 4) */
@keyframes energyPulse {
    0%, 100% { 
        opacity: 0.7;
        transform: scale(1);
    }
    50% { 
        opacity: 0.9;
        transform: scale(1.05);
    }
}

/* Versión responsive */
@media (max-width: 480px) {
    .reliq-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

.continue-story {
    margin-top: 0px;
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(135deg, #684e2e, #472413, #68602e);
    background-size: 200% 200%;
    border: 2px solid #7e6136;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 15px rgba(255, 184, 107, 0.5);
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 500px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    
    /* Animaciones combinadas */
    animation: 
        gradientShift 4s ease infinite,
        gentlePulseOrange 3s ease-in-out infinite,
        subtleFloat 6s ease-in-out infinite;
}

/* Efecto de brillo energético (Opción 4) */
.continue-story::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(255, 147, 107, 0.1) 0%, transparent 50%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    animation: energyPulse 3s ease-in-out infinite;
}

/* Efecto de barrido luminoso (Opción 3) */
.continue-story::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.7s ease;
}

.continue-story:hover::after {
    left: 100%;
}

.continue-story:hover {
    /* Transformaciones 3D (Opción 3) */
    transform: translateY(-4px) rotateX(3deg) rotateY(2deg) scale(1.08);
    
    /* Gradiente mejorado (Opción 1) */
    background: linear-gradient(135deg, #5a3215, #89692d, #6d3b1b);
    background-size: 200% 200%;
    
    /* Efectos visuales mejorados */
    border: 2px solid #d9b863;
    box-shadow: 
        0 12px 30px rgba(255, 181, 107, 0.8),
        0 0 0 3px rgba(201, 217, 99, 0.4),
        inset 0 0 25px rgba(255, 255, 255, 0.1);
    
    /* Texto más brillante */
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.8),
                 0 0 20px rgba(255, 218, 107, 0.6);
    
    /* Animaciones más rápidas al hover */
    animation: 
        gradientShift 2s ease infinite,
        gentlePulseOrange 1.5s ease-in-out infinite,
        subtleFloat 3s ease-in-out infinite;


    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.continue-story:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 
        0 6px 20px rgba(255, 208, 107, 0.6),
        0 0 0 2px rgba(217, 142, 99, 0.3);
    transition: all 0.1s ease;
}

@keyframes gentlePulseOrange {
    0%, 100% { 
        box-shadow: 0 4px 10px rgba(255, 164, 107, 0.5);
    }
    50% { 
        box-shadow: 0 0 15px rgba(255, 188, 107, 0.7);
    }
}

/* @media (max-width: 1000px) {
    .wrap {
        grid-template-columns: 1fr 30em;
        height: 100vh;
        padding: 0;
        gap: 10px;
    }
} */


/* Estilos para la tienda */
.shop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    font-family: inherit;
}

.payment-content {
    background: #1a1a2e;
    padding: 20px;
    border-radius: 10px;
    border: 2px solid #4cc9f0;
    max-width: 500px;
    width: 90%;
    color: white;
}

.payment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #4cc9f0;
    padding-bottom: 10px;
}

.payment-info {
    margin-bottom: 20px;
}

.payment-info p {
    margin: 5px 0;
}

.payment-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.payment-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

#confirmPayment {
    background: #4cc9f0;
    color: white;
}

#confirmPayment:hover {
    background: #3aa8c9;
}

#cancelPayment {
    background: #ff6b6b;
    color: white;
}

#cancelPayment:hover {
    background: #e55a5a;
}

/* Estilos para elementos de Stripe */
.StripeElement {
    padding: 10px;
    border: 1px solid #4cc9f0;
    border-radius: 5px;
    background: #0f3460;
    margin-bottom: 10px;
}


/* Añade esto a tu style.css */
.skip-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.8);
    color: #ffa500;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    z-index: 1000;
    border: 1px solid #ffa500;
}

.skip-button {
    background: linear-gradient(135deg, #ffa500, #ff8c00);
    color: black;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    margin: 5px;
}

.skip-button:hover {
    background: linear-gradient(135deg, #ff8c00, #ff6b00);
}

















/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .wrap {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 50vh;
        height: 100vh;
        padding: 0;
        gap: 0;
    }

    .stat-image {
        display: none;
    }

    .console {
        min-height: 50vh;
        max-height: 50vh;
        height: 50vh;
        padding: 10px;
        border-radius: 0;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .hud {
        order: 2;
        width: 100%;
        min-height: 50vh;
        max-height: 50vh;
        height: 50vh;
        padding: 10px;
        font-size: 0.85rem;
        border-radius: 0;
    }

    .action-btn {
        flex: 1 1 100%;
        font-size: 1rem;
        padding: 6px 8px;
    }

    .action-bucket {
        flex-direction: column;
        gap: 4px;
    }

    .line {
        font-size: 0.9rem;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .font-toggle-btn {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 1rem;
    }

    .promo-toggle-btn {
        top: 10px;
        right: 60px;
        color: #e0e0e0;
        padding: 4px 10px;
    }

    .font-selector {
        top: 50px;
        right: 10px;
        min-width: 180px;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 14px;
    }

    .wrap {
        grid-template-rows: 40vh 60vh;
    }

    .console {
        min-height: 40vh;
        max-height: 40vh;
        height: 40vh;
        padding: 8px 15px 15px 15px;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .hud {
        font-size: 0.75rem;
        min-height: 60vh;
        height: 60vh;
        padding: 8px;
    }

    #name {
        font-size: 18px;
    }

    .small, .hint {
        font-size: 0.7rem;
    }

    .action-btn {
        font-size: 1rem;
        padding: 10px;
    }

    .big-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .action-bucket {
        gap: 3px;
    }

    .footer {
        font-size: 0.7rem;
    }

    .console::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .line .time {
        font-size: 0.7em;
    }

    .important-badge {
        padding: 4px 4px;
    }
}

/* Optimizaciones de rendimiento para animaciones */
@media (prefers-reduced-motion: reduce) {
    .color-danger,
    .color-gold,
    .color-accent,
    .color-info,
    .color-warning,
    .color-purple,
    .color-legendary,
    .rarity-epic,
    .rarity-rare,
    .rarity-uncommon,
    .rarity-common,
    #hp,
    #atk,
    #def,
    #gold,
    .line,
    .line.sys,
    .line.important,
    .line.combat,
    .line.damage,
    .line.heal {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Suavizar las animaciones para móviles */
@media (max-width: 600px) {
    .color-danger,
    .color-gold,
    .color-accent,
    .color-info,
    .color-warning,
    .color-purple,
    .color-legendary {
        animation-duration: 1.5s !important;
    }
}


/* Responsive - mismo layout para todas las resoluciones */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-header,
    .stat-value {
        padding: 6px 3px;
    }
    
    .stat-value {
        font-size: 0.8rem;
    }

    .stat {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 4px;
    }

    .stat-name {
        text-align: left;
    }

    .extra-stats {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-header {
        font-size: 0.7rem;
        padding: 5px 2px;
    }
    
    .stat-value {
        font-size: 0.75rem;
        padding: 7px 2px;
    }

    .stat {
        justify-content: center;
        align-items: center;
    }

    .extra-stats {
        gap: 10px;
    }

    .stat-group {
        height: 30px;
        margin: 0;
        padding: 0px 5px;
        align-content: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        gap: 10px;
    }

    .stat-name {
        display: none;
    }
}

@media (max-width: 600px) {
    .popup-content {
        padding: 20px;
        margin: 10px;
    }
    
    .popup-title {
        font-size: 1.8rem;
    }
    
    .popup-subtitle {
        font-size: 1rem;
    }
    
    .start-button {
        padding: 12px 20px;
        font-size: 1.1rem;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .promo-toggle-btn {
        top: 55px;
        right: 10px;
        padding: 6px 10px;
        font-size: 1rem;
    }

    .promo-modal-content {
        width: 95%;
        margin: 10px;
    }

    .promo-header h2 {
        font-size: 1.1rem;
    }

    .promo-body {
        padding: 15px;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .patch-toggle-btn {
        top: 105px;
        right: 12px;
        padding: 6px 10px;
        font-size: 1rem;
        width: 40px;
        height: 40px;
    }

    .patch-notification-badge {
        width: 15px;
        height: 15px;
        top: -3px;
        right: -3px;
        background: #ff4444;
        color: white;
        border-radius: 50%;
        font-size: 12px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        animation: pulse 2s infinite;
    }

    .patch-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 70vh;
    }

    .patch-version-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .patch-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .audio-controls {
        bottom: 10px;
        left: 10px;
        right: 10px;
        font-size: 0.7rem;
    }
    
    .audio-control-group {
        flex-wrap: wrap;
    }

    .patch-features ul {
        font-size: 0.6rem;
    }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
    .wrap {
        grid-template-columns: 1fr;
        grid-template-rows: 50vh 50vh;
        height: 100vh;
        padding: 0;
        gap: 0;
    }

    .console {
        min-height: 50vh;
        max-height: 50vh;
        height: 50vh;
        padding: 10px;
        border-radius: 0;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .hud {
        order: 2;
        width: 100%;
        min-height: 50vh;
        max-height: 50vh;
        height: 60vh;
        padding: 10px;
        font-size: 0.85rem;
        border-radius: 0;
    }

    .action-btn {
        flex: 1 1 100%;
        font-size: 1rem;
        padding: 6px 8px;
    }

    .action-bucket {
        flex-direction: column;
        gap: 4px;
    }

    .line {
        font-size: 0.9rem;
    }

    .footer {
        flex-direction: column;
        align-items: flex-start;
    }

    .font-toggle-btn {
        top: 10px;
        right: 10px;
        padding: 6px 10px;
        font-size: 1rem;
    }

    .promo-toggle-btn {
        top: 10px;
        right: 60px;
        color: #e0e0e0;
        padding: 4px 10px;
    }

    .save-manager-toggle-btn {
        top: 10px;
        right: 115px;
        color: #e0e0e0;
        padding: 4px 10px;
    }

    .font-selector {
        top: 50px;
        right: 10px;
        min-width: 180px;
    }
}

@media (max-width: 600px) {
    html {
        font-size: 14px;
    }

    .wrap {
        grid-template-rows: 40vh 60vh;
    }

    .console {
        min-height: 40vh;
        max-height: 40vh;
        height: 40vh;
        padding: 8px 15px 15px 15px;
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .hud {
        font-size: 0.75rem;
        min-height: 60vh;
        height: 60vh;
        padding: 8px;
    }

    #name {
        font-size: 18px;
    }

    .small, .hint {
        font-size: 0.7rem;
    }

    .action-btn {
        font-size: 1rem;
        padding: 10px;
    }

    .big-btn {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .action-bucket {
        gap: 3px;
    }

    .footer {
        font-size: 0.7rem;
    }

    .console::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }

    .line .time {
        font-size: 0.7em;
    }

    .important-badge {
        padding: 4px 4px;
    }
}

/* Optimizaciones de rendimiento para animaciones */
@media (prefers-reduced-motion: reduce) {
    .color-danger,
    .color-gold,
    .color-accent,
    .color-info,
    .color-warning,
    .color-purple,
    .color-legendary,
    .rarity-epic,
    .rarity-rare,
    .rarity-uncommon,
    .rarity-common,
    #hp,
    #atk,
    #def,
    #gold,
    .line,
    .line.sys,
    .line.important,
    .line.combat,
    .line.damage,
    .line.heal {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}

/* Suavizar las animaciones para móviles */
@media (max-width: 600px) {
    .color-danger,
    .color-gold,
    .color-accent,
    .color-info,
    .color-warning,
    .color-purple,
    .color-legendary {
        animation-duration: 1.5s !important;
    }
}


/* Responsive - mismo layout para todas las resoluciones */
@media (max-width: 900px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-header,
    .stat-value {
        padding: 6px 3px;
    }
    
    .stat-value {
        font-size: 0.8rem;
    }

    .stat {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        gap: 4px;
    }

    .stat-name {
        text-align: left;
    }

    .extra-stats {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
}

@media (max-width: 600px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .stat-header {
        font-size: 0.7rem;
        padding: 5px 2px;
    }
    
    .stat-value {
        font-size: 0.75rem;
        padding: 7px 2px;
    }

    .stat {
        justify-content: center;
        align-items: center;
    }

    .extra-stats {
        gap: 10px;
    }

    .stat-group {
        height: 30px;
        margin: 0;
        padding: 0px 5px;
        align-content: center;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 20px;
        gap: 10px;
    }

    .stat-name {
        display: none;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .promo-toggle-btn {
        top: 55px;
        right: 10px;
        padding: 6px 10px;
        font-size: 1rem;
    }

    .promo-modal-content {
        width: 95%;
        margin: 10px;
    }

    .promo-header h2 {
        font-size: 1.1rem;
    }

    .promo-body {
        padding: 15px;
    }
}

/* Responsive */
@media (max-width: 600px) {
    .patch-toggle-btn {
        opacity: 0.5;
        top: 11px;
        right: 62px;
        padding: 6px 6px;
        font-size: 0.9rem;
        width: 35px;
        height: 35px;
    }

    .patch-notification-badge {
        width: 15px;
        height: 15px;
        top: -3px;
        right: -3px;
        background: #ff4444;
        color: white;
        border-radius: 50%;
        font-size: 12px;
        font-weight: bold;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 0;
        animation: pulse 2s infinite;
    }

    .patch-modal-content {
        width: 95%;
        margin: 10px;
        max-height: 70vh;
    }

    .patch-version-selector {
        flex-direction: column;
        align-items: stretch;
    }

    .patch-footer {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .audio-controls {
        bottom: 10px;
        left: 10px;
        right: 10px;
        font-size: 0.7rem;
    }
    
    .audio-control-group {
        flex-wrap: wrap;
    }

    .patch-features ul {
        font-size: 0.6rem;
    }
}


/* Responsive */
@media (max-width: 600px) {
    .save-manager-toggle-btn {
        top: 100px;
        right: 10px;
        padding: 6px 10px;
        font-size: 1rem;
    }

    .save-manager-content {
        width: 95%;
        margin: 10px;
    }

    .save-manager-header h2 {
        font-size: 1.1rem;
    }

    .save-manager-body {
        padding: 15px;
    }
}

@keyframes slideInRight {
        from {
            transform: translateX(100%);
            opacity: 0;
        }
        to {
            transform: translateX(0);
            opacity: 1;
        }
    }
    
@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.save-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #2a7a2a;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    z-index: 1000;
    font-weight: bold;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}