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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fce4ec, #f3e5f5, #e8eaf6);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    padding: 40px;
    max-width: 650px;
    width: 90%;
}

.main-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    background: linear-gradient(135deg, #ec407a, #ab47bc, #7c4dff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    letter-spacing: 4px;
}

h1, h2 {
    text-align: center;
    color: #ad1457;
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.header-bar h2 {
    font-size: 1.4rem;
    margin: 0;
}

.subtitle {
    text-align: center;
    color: #777;
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* Login */
.login-form { max-width: 360px; margin: 0 auto; }

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #555;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #ad1457;
}

.answer-input {
    width: 100%;
    padding: 16px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1.1rem;
    transition: border-color 0.3s;
    margin-top: 10px;
}

.answer-input:focus {
    outline: none;
    border-color: #ad1457;
    box-shadow: 0 0 0 3px rgba(173, 20, 87, 0.1);
}

.btn {
    display: inline-block;
    background: #ad1457;
    color: white;
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s;
    text-decoration: none;
}

.btn:hover { background: #880e4f; }

.btn-block { display: block; width: 100%; text-align: center; }

.error {
    background: #ffebee;
    color: #c62828;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 16px;
    text-align: center;
}

.mensaje-fallo {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #ffb74d;
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Quiz */
.progress-bar {
    background: #e0e0e0;
    border-radius: 20px;
    height: 10px;
    margin-bottom: 24px;
    overflow: hidden;
}

.progress-fill {
    background: linear-gradient(90deg, #ec407a, #ab47bc);
    height: 100%;
    border-radius: 20px;
    transition: width 0.4s ease;
}

.question-number {
    color: #ad1457;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.question-text {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.5;
}

.options { list-style: none; }

.options li { margin-bottom: 10px; }

.options label {
    display: block;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.options label:hover {
    border-color: #ec407a;
    background: #fce4ec;
}

.options input[type="radio"] {
    margin-right: 10px;
    accent-color: #ad1457;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 24px;
}

/* Resultados */
.result-score {
    text-align: center;
    font-size: 3rem;
    font-weight: 800;
    color: #ad1457;
    margin: 20px 0 10px;
}

.result-label {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 24px;
}

.result-detail {
    background: #fce4ec;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
}

.result-detail .q { font-weight: 600; margin-bottom: 4px; }
.result-detail .a { color: #555; }
.result-detail .correct { color: #2e7d32; font-weight: 600; }
.result-detail .wrong { color: #c62828; font-weight: 600; }

.actions {
    text-align: center;
    margin-top: 28px;
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-secondary {
    background: #78909c;
}
.btn-secondary:hover { background: #546e7a; }

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.header-bar .user-info {
    font-size: 0.85rem;
    color: #999;
}

.logout-link {
    color: #ad1457;
    text-decoration: none;
    font-size: 0.85rem;
}
.logout-link:hover { text-decoration: underline; }
