/* Frontend Styles para Escape Room Game */

.erg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
}

/* Pantalla de inicio */
.erg-start-screen {
    text-align: center;
    padding: 40px 20px;
}

.erg-start-content {
    max-width: 600px;
    margin: 0 auto;
}

.erg-start-screen h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
    color: #2c3e50;
}

.erg-descripcion {
    font-size: 1.1em;
    line-height: 1.6;
    margin-bottom: 30px;
    color: #555;
}

.erg-info {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border-left: 4px solid #3498db;
}

.erg-info p {
    margin: 10px 0;
    font-size: 1.05em;
}

.erg-continue-info {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
    color: #856404;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.erg-continue-info .dashicons {
    font-size: 20px;
}

/* Botones */
.erg-btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    text-decoration: none;
}

.erg-btn-primary {
    background: #3498db;
    color: white;
}

.erg-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.erg-btn-secondary {
    background: #95a5a6;
    color: white;
}

.erg-btn-secondary:hover {
    background: #7f8c8d;
}

.erg-btn-hint {
    background: #f39c12;
    color: white;
    font-size: 14px;
    padding: 8px 16px;
}

.erg-btn-hint:hover {
    background: #e67e22;
}

.erg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Pantalla de juego */
.erg-game-screen {
    animation: fadeIn 0.5s ease;
}

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

.erg-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.erg-progress-container {
    flex: 1;
    margin-right: 20px;
}

.erg-progress-bar {
    height: 24px;
    background: #ecf0f1;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 8px;
}

.erg-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    font-size: 12px;
}

.erg-progress-text {
    text-align: center;
    font-weight: 600;
    color: #555;
}

.erg-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2em;
    font-weight: bold;
    color: #e74c3c;
    background: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    border: 2px solid #e74c3c;
}

.erg-timer .dashicons {
    font-size: 24px;
}

/* Fases */
.erg-fases-container {
    background: white;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 400px;
}

.erg-fase {
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.erg-fase-titulo {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
    text-align: center;
}

.erg-fase-imagen {
    text-align: center;
    margin: 30px 0;
}

.erg-fase-imagen img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.erg-fase-descripcion {
    font-size: 1.15em;
    line-height: 1.8;
    color: #444;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.erg-answer-container {
    display: flex;
    gap: 10px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.erg-answer-input {
    flex: 1;
    min-width: 250px;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.erg-answer-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.erg-submit-answer {
    min-width: 150px;
}

.erg-pista-container {
    margin-top: 30px;
    text-align: center;
}

.erg-pista {
    margin-top: 15px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    animation: fadeIn 0.3s ease;
}

/* Feedback */
.erg-feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.erg-feedback.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.erg-feedback.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Pantalla final */
.erg-final-screen {
    text-align: center;
    padding: 60px 20px;
    animation: fadeIn 0.5s ease;
}

.erg-final-content {
    max-width: 600px;
    margin: 0 auto;
}

.erg-final-screen h1 {
    font-size: 2.5em;
    color: #2ecc71;
    margin-bottom: 20px;
}

.erg-success-icon {
    font-size: 5em;
    margin: 20px 0;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.erg-mensaje-final {
    font-size: 1.2em;
    line-height: 1.6;
    color: #555;
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.erg-stats {
    background: white;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.erg-stat-item {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.erg-stat-item:last-child {
    border-bottom: none;
}

.erg-stat-label {
    font-weight: 600;
    color: #555;
}

.erg-stat-value {
    color: #3498db;
    font-weight: bold;
}

/* Loading spinner */
.erg-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .erg-container {
        padding: 15px;
    }
    
    .erg-header {
        flex-direction: column;
        gap: 20px;
    }
    
    .erg-progress-container {
        margin-right: 0;
        width: 100%;
    }
    
    .erg-fases-container {
        padding: 20px;
    }
    
    .erg-answer-container {
        flex-direction: column;
    }
    
    .erg-answer-input {
        width: 100%;
    }
    
    .erg-submit-answer {
        width: 100%;
    }
    
    .erg-start-screen h1,
    .erg-final-screen h1 {
        font-size: 2em;
    }
}

@media screen and (max-width: 480px) {
    .erg-start-screen h1,
    .erg-final-screen h1 {
        font-size: 1.5em;
    }
    
    .erg-fase-titulo {
        font-size: 1.4em;
    }
}
