/* colors-common.css - CSS para juego de colores basado en puzzle-common.css */

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

body {
    font-family: 'Comic Neue', cursive;
    background: #f0f2f5;
}

.colors-page {
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: 100vh;
}

h1 {
    text-align: center;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

.colors-page > p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: clamp(1rem, 3vw, 1.2rem);
}

/* ÁREA DEL JUEGO */
.game-area {
    margin: 2rem auto;
    max-width: 500px;
}

.game-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin: 0 auto;
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ESCENA ACTUAL */
.scene-display {
    margin: 2rem auto;
    max-width: 600px;
    text-align: center;
}

.current-scene {
    margin-bottom: 1.5rem;
}

.scene-image {
    width: 300px;
    height: 200px;
    margin: 0 auto;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
}

.scene-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* CONTROL DE AUDIO */
.audio-control {
    margin: 1.5rem 0;
    text-align: center;
}

.audio-btn {
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.audio-btn:hover {
    background: #3a7bc8;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
}

.audio-btn:active {
    transform: scale(0.95);
}

.audio-btn.playing {
    background: #2e7d32;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.word-text {
    margin-top: 0.8rem;
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    min-height: 2rem;
}

/* OPCIONES DE COLORES */
.color-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
    margin: 2rem auto;
    max-width: 500px;
    padding: 0 1rem;
}

.color-btn {
    width: 100px;
    height: 100px;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
}

.color-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(0,0,0,0.3);
}

.color-btn:active {
    transform: scale(0.95);
}

.color-btn.correct {
    animation: correctGlow 1s ease-in-out;
    box-shadow: 0 0 20px #4CAF50;
}

.color-btn.incorrect {
    animation: incorrectShake 0.5s ease-in-out;
    box-shadow: 0 0 20px #f44336;
}

@keyframes correctGlow {
    0% { box-shadow: 0 0 0px #4CAF50; }
    50% { box-shadow: 0 0 30px #4CAF50; }
    100% { box-shadow: 0 0 0px #4CAF50; }
}

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

/* INFORMACIÓN DE PROGRESO */
.progress-info {
    text-align: center;
    margin: 2rem 0;
}

.score-text {
    font-size: 1.3rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 1rem;
}

.level-info {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1rem;
}

.feedback-message {
    font-size: 1.4rem;
    font-weight: bold;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem auto;
    max-width: 300px;
    animation: fadeInOut 2s ease-in-out;
}

.feedback-message.correct {
    background: #4CAF50;
    color: white;
}

.feedback-message.incorrect {
    background: #f44336;
    color: white;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* MENSAJES */
.game-message {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-size: 1.1rem;
}

.game-error {
    text-align: center;
    color: #d32f2f;
    padding: 2rem;
    font-weight: bold;
}

/* NAVEGACIÓN */
.navigation-links {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
}

.back-link {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: background 0.3s;
    font-size: 1rem;
}

.back-link:hover {
    background: #5a6268;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .colors-page {
        padding: 0.5rem;
    }
    
    .scene-image {
        width: 250px;
        height: 170px;
    }
    
    .color-options {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.8rem;
        padding: 0 0.5rem;
    }
    
    .color-btn {
        width: 80px;
        height: 80px;
    }
    
    .audio-btn {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .game-container {
        padding: 1rem;
        min-height: 250px;
    }
}

@media (max-width: 480px) {
    .scene-image {
        width: 200px;
        height: 140px;
    }
    
    .color-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .color-btn {
        width: 70px;
        height: 70px;
    }
    
    .word-text {
        font-size: 1.1rem;
    }
    
    .feedback-message {
        font-size: 1.2rem;
        padding: 0.8rem;
    }
}

/* CLASES DE COLORES PARA LOS BOTONES */
.color-red { background: #f44336; }
.color-blue { background: #2196F3; }
.color-green { background: #4CAF50; }
.color-yellow { background: #FFEB3B; }
.color-orange { background: #FF9800; }
.color-purple { background: #9C27B0; }
.color-pink { background: #E91E63; }
.color-brown { background: #795548; }
.color-gray { background: #9E9E9E; }
.color-black { background: #212121; }
.color-white { 
    background: #FFFFFF; 
    border: 2px solid #ddd;
}