:root {
    --bg: #17171c;
    --card: #23232b;
    --text: #f5f6fa;
    --muted: #a0a2b3;
    --accent: #7c5cf3;
    --accent-weak: #2e2a40;
    --danger: #ef4444;
    --ok: #10b981;
    --border: #343546;
    --shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    --radius: 16px;
    --radius-sm: 10px;
}

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

html, body {
    height: 100%;
    background: radial-gradient(circle at 20% 30%, #1b1b22 0%, #121216 100%);
    color: var(--text);
    font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, sans-serif;
    scroll-behavior: smooth;
}

.wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    min-height: 100vh;
    padding: clamp(20px, 4vw, 40px);
}

.app {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 900px;
    gap: 20px;
}

/* ---------- HEADER ---------- */
.header {
    background: linear-gradient(135deg, var(--accent), #9b59ff);
    color: #fff;
    border-radius: var(--radius);
    padding: clamp(20px, 4vw, 30px);
    box-shadow: var(--shadow);
    text-align: center;
}

.header h1 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: 4px;
}

.header p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    opacity: 0.9;
}

/* ---------- PROGRESO ---------- */
.progress {
    margin-top: 16px;
    height: 10px;
    background: #353546;
    border-radius: 999px;
    overflow: hidden;
}

.progress>span {
    display: block;
    height: 100%;
    background: var(--ok);
    width: 0%;
    transition: width 0.4s ease;
}

.progress-meta {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
}

/* ---------- CARD ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(18px, 3vw, 24px);
    display: flex;
    flex-direction: column;
    gap: 18px;
}

/* ---------- BOTONES ---------- */
button {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s ease;
    font-family: inherit;
}

.btn {
    background: var(--accent);
    color: #fff;
}

.btn:hover {
    background: #9b7eff;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    color: var(--accent);
}

/* ---------- TOOLBAR ---------- */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
}

/* ---------- SELECT ---------- */
.select-curso {
    appearance: none;
    background: rgba(124, 92, 243, 0.12);
    color: var(--text);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;

    min-width: 220px;
}

.select-curso:hover {
    background: rgba(124, 92, 243, 0.25);
    border-color: #9b7eff;
    color: #9b7eff;
}

.select-curso:focus {
    outline: none;
    border-color: var(--ok);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

/* ---------- OPTIONS ---------- */
.options {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.option {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 2px solid transparent;
    border-radius: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.option:hover {
    background: rgba(124, 92, 243, 0.12);
    border-color: var(--accent);
}

.option input[type="radio"] {
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option input[type="radio"]:checked {
    background: var(--accent);
    box-shadow: 0 0 6px rgba(124, 92, 243, 0.7);
}

.option span {
    flex: 1;
    color: var(--text);
    font-size: 16px;
    line-height: 1.4;
}

.option input[type="radio"]:checked+span {
    color: var(--accent);
    font-weight: 600;
}

/* ======================= INPUT PDF OCULTO ======================= */
/* ===================== INPUT PDF VISIBLE Y ESTILIZADO ===================== */
.pdf {
    display: inline-block;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 2px solid var(--accent);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 350px;
}

/* Estilo del botón interno ("Seleccionar archivo") */
.pdf::-webkit-file-upload-button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pdf::-webkit-file-upload-button:hover {
    background: #9b7eff;
}

/* Firefox */
.pdf::file-selector-button {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.pdf::file-selector-button:hover {
    background: #9b7eff;
}

/* Efecto hover en el campo */
.pdf:hover {
    border-color: #9b7eff;
    background: rgba(124, 92, 243, 0.1);
}

/* Texto del nombre del archivo */
.pdf::-webkit-file-upload-text {
    color: var(--text);
}

/* Margen inferior */
.pdf {
    margin-top: 10px;
}


/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .app {
        gap: 16px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .controls {
        flex-direction: column;
        gap: 10px;
    }

    button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header {
        border-radius: 0;
        padding: 16px;
    }

    .card {
        padding: 16px;
    }

    .option span {
        font-size: 0.9rem;
    }

    .pregunta {
        font-size: 0.95rem;
    }

    .progress-meta {
        font-size: 12px;
    }
}