/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --bg-color: #ecf0f1;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 6px 12px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    min-height: 100vh;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    text-align: center;
    color: white;
    padding: 20px 0;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Main content */
main {
    flex: 1;
}

.view {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.view.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pruebas grid */
h2 {
    color: white;
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.pruebas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    padding: 10px;
}

.prueba-item {
    background: var(--card-bg);
    padding: 30px 20px;
    border-radius: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.prueba-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.prueba-item.completada {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.prueba-item.completada::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 1.2rem;
    font-weight: bold;
}

.prueba-numero {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.prueba-item.completada .prueba-numero {
    color: white;
}

/* Formulario de respuesta */
.prueba-card,
.pista-card {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.prueba-card h2 {
    color: var(--primary-color);
    text-align: left;
    margin-bottom: 15px;
}

.descripcion {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid var(--secondary-color);
    font-size: 1.1rem;
    line-height: 1.8;
}

.prueba-imagen {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 10px;
    margin: 20px auto;
    display: block;
    box-shadow: var(--shadow);
}

.respuesta-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.respuesta-form label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.respuesta-form input[type="text"] {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    width: 100%;
}

.respuesta-form input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Botones */
button {
    padding: 15px 25px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px;
    font-size: 1.1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-back {
    background: #95a5a6;
    color: white;
    padding: 10px 20px;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.btn-back:hover {
    background: #7f8c8d;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Feedback */
.feedback {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.feedback.show {
    display: block;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.feedback.error {
    background: #ffe6e6;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
}

.feedback.success {
    background: #d4edda;
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

/* Pista card */
.pista-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.pista-card h2 {
    color: var(--success-color);
    margin-bottom: 20px;
}

.pista-content {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    border-left: 4px solid var(--success-color);
}

.pista-content h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.pista-texto {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

/* Pistas recolectadas */
.pistas-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.pista-recolectada {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--success-color);
}

.pista-recolectada-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.pista-badge {
    background: var(--success-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
}

.pista-recolectada h3 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
}

.pista-recolectada p {
    color: var(--text-color);
    line-height: 1.6;
}

.no-pistas {
    text-align: center;
    padding: 40px 20px;
    color: white;
    font-size: 1.1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 30px;
}

/* Pruebas resueltas */
.pruebas-resueltas-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.pruebas-resueltas-title {
    color: white;
    font-size: 1.3rem;
    margin-bottom: 15px;
    text-align: center;
}

.pruebas-resueltas-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.sin-pruebas {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: normal;
    font-style: italic;
}

.prueba-resuelta-badge {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    min-width: 45px;
    text-align: center;
}

.prueba-resuelta-badge:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
}

.prueba-resuelta-badge:active {
    transform: translateY(-1px);
}

/* Responsive */
@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    .pruebas-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }

    .prueba-item {
        padding: 25px 15px;
    }

    .prueba-numero {
        font-size: 1.8rem;
    }

    .prueba-card,
    .pista-card {
        padding: 20px;
    }

    h2 {
        font-size: 1.5rem;
    }

    .button-group {
        flex-direction: column;
    }
}

@media (min-width: 600px) {
    .button-group {
        flex-direction: row;
        justify-content: center;
    }
}
