/* Estilos para los mini-juegos */

/* Estilos base para modales de juegos */
.game-modal-content,
.training-style {
    max-width: 500px !important;
    width: 95% !important;
    aspect-ratio: 4/3;
    padding: 15px !important;
    background: rgba(0, 0, 0, 0.9) !important;
    border: 2px solid var(--accent-color);
}

#training-area {
    width: 100%;
    height: 100%;
    position: relative;
    background: rgba(0, 255, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#training-stats {
    position: absolute;
    top: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    color: white;
    font-size: 1.2em;
    z-index: 1;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    background: rgba(0, 0, 0, 0.5);
    padding: 5px;
    border-radius: 8px;
    margin: 0 10px;
}

#training-field {
    width: 100%;
    height: 100%;
    position: relative;
    flex: 1;
}

.training-target {
    position: absolute;
    background: radial-gradient(circle, var(--accent-color) 0%, rgba(0,255,57,0.5) 100%);
    border-radius: 50%;
    cursor: pointer;
    animation: appear 0.3s ease-out;
    box-shadow: 0 0 10px rgba(0,255,57,0.5);
    transition: transform 0.1s ease-out;
}

.training-target:active {
    transform: scale(0.9);
}

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

.target-ripple {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: ripple 0.8s ease-out forwards;
    border: 2px solid var(--accent-color);
}

.points-popup {
    position: fixed;
    color: var(--accent-color);
    font-size: 1.2em;
    font-weight: bold;
    pointer-events: none;
    animation: float-up 1s ease-out forwards;
    text-shadow: 0 0 5px rgba(0,255,57,0.5);
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

@keyframes fade-out {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

@keyframes float-up {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-30px) scale(1.2);
        opacity: 0;
    }
}

/* Animaciones para los juegos */
@keyframes appear {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

/* Estilos para los resultados de los juegos */
.stats-improved {
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.stat-improvement {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
}

#training-result {
    text-align: center;
    padding: 20px;
}

#training-result h4 {
    color: var(--accent-color);
    margin-bottom: 20px;
    font-size: 1.2em;
}

/* Media queries para juegos */
@media screen and (max-width: 480px) {
    .game-modal-content,
    .training-style {
        aspect-ratio: 3/4;
    }

    .training-target {
        width: 30px;
        height: 30px;
    }
}

/* Estilos para la selección de entrenamiento */
.training-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.training-option {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: left;
}

.training-option:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.option-icon {
    font-size: 2em;
}

.option-title {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--accent-color);
}

.option-desc {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.option-skills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.skill-tag {
    background: rgba(0, 255, 57, 0.2);
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.8em;
    color: var(--accent-color);
}

/* Estilos para el juego de precisión */
.precision-game {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    padding-top: 40px; /* Más espacio para las vidas */
}

.precision-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    background: rgba(0,0,0,0.3);
    padding: 20px;
    border-radius: 20px;
}

.precision-btn {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 15px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.1);
}

.precision-btn[data-color="red"] { 
    background: rgba(255, 0, 0, 0.5);
    border-color: rgba(255, 0, 0, 0.3);
}
.precision-btn[data-color="blue"] { 
    background: rgba(0, 0, 255, 0.5);
    border-color: rgba(0, 0, 255, 0.3);
}
.precision-btn[data-color="green"] { 
    background: rgba(0, 255, 0, 0.5);
    border-color: rgba(0, 255, 0, 0.3);
}
.precision-btn[data-color="yellow"] { 
    background: rgba(255, 255, 0, 0.5);
    border-color: rgba(255, 255, 0, 0.3);
}

.precision-btn.active[data-color="red"] { 
    background: #ff0000;
    box-shadow: 0 0 20px #ff0000,
                inset 0 0 20px #ffffff;
    transform: scale(1.1);
}
.precision-btn.active[data-color="blue"] { 
    background: #0000ff;
    box-shadow: 0 0 20px #0000ff,
                inset 0 0 20px #ffffff;
    transform: scale(1.1);
}
.precision-btn.active[data-color="green"] { 
    background: #00ff00;
    box-shadow: 0 0 20px #00ff00,
                inset 0 0 20px #ffffff;
    transform: scale(1.1);
}
.precision-btn.active[data-color="yellow"] { 
    background: #ffff00;
    box-shadow: 0 0 20px #ffff00,
                inset 0 0 20px #ffffff;
    transform: scale(1.1);
}

.precision-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255,255,255,0.3),
                inset 0 0 15px rgba(0,0,0,0.3);
}

.sequence-message {
    color: white;
    font-size: 1.4em;
    margin-top: 20px;
    text-align: center;
    text-shadow: 0 0 10px rgba(0,255,57,0.5);
    font-weight: bold;
}

@media screen and (max-width: 480px) {
    .precision-btn {
        width: 60px;
        height: 60px;
    }
}

/* Estilos para el juego de resistencia */
.endurance-container {
    width: min(40px, 10%);
    height: 80%;
    margin: 10% auto;
    position: relative;
}

.endurance-bar {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    position: relative;
}

.target-zone {
    position: absolute;
    width: 100%;
    height: 20%;
    background: rgba(0, 255, 57, 0.3);
    top: 40%;
    border-radius: 20px;
}

.player-marker {
    position: absolute;
    width: 100%;
    height: 10px;
    background: white;
    border-radius: 5px;
    left: 0;
    transition: top 0.016s linear;
}

/* Efectos de puntuación */
.score-effect {
    position: absolute;
    font-size: 1.5em;
    font-weight: bold;
    animation: float-up 1s ease-out forwards;
    z-index: 10;
}

.score-effect-10 { color: gold; }
.score-effect-5 { color: #00ff39; }
.score-effect-2 { color: #00bfff; }
.score-effect-1 { color: white; }
.score-effect-miss { color: red; }

@keyframes float-up {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-50px);
        opacity: 0;
    }
}

/* Media queries mejorados */
@media screen and (max-width: 480px) {
    .endurance-container {
        width: min(30px, 8%);
    }
}

#game-instructions {
    text-align: center;
    padding: 20px;
    color: white;
}

#game-instructions-title {
    color: var(--accent-color);
    font-size: 1.4em;
    margin-bottom: 20px;
}

#game-instructions-text {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
}

#start-game-btn {
    font-size: 1.2em;
    padding: 15px 40px;
    background: var(--accent-color);
    color: #333;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

#start-game-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0, 255, 57, 0.5);
}

.lives {
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

/* Mejorar el efecto de error */
.precision-btn.error {
    animation: shake 0.5s;
    box-shadow: 0 0 20px red,
                inset 0 0 20px red;
    background: rgba(255, 0, 0, 0.5) !important;
} 