* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    max-width: 990px;
    width: 100%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e0e0e0;
    overflow: hidden;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
    background: white;
}

.header-logo-container {
    background: white;
    padding: 30px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.header-logo {
    max-width: 150px;
    height: auto;
    display: block;
}

.header-content {
    background: #7C5DAF;
    color: white;
    padding: 30px 40px;
    text-align: center;
    flex-grow: 1;
}

.header-content h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header-content p {
    opacity: 0.9;
    font-size: 16px;
}

.form-content {
    padding: 40px 50px;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

h2 {
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

.step-description {
    margin-bottom: 25px;
    color: #666;
    font-size: 15px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #7C5DAF;
}

.form-group input.error {
    border-color: #f44336;
}

.error-message {
    color: #f44336;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.form-group input.error + .error-message {
    display: block;
}

/* Radio buttons */
.radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s;
    background: white;
}

.radio-option:hover {
    border-color: #7C5DAF;
    background: #f8f9ff;
}

.radio-option input[type="radio"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.radio-option.selected {
    border-color: #7C5DAF;
    background: #7C5DAF;
    color: white;
}

/* Escala numérica */
.scale-group {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.scale-option {
    flex: 1;
    text-align: center;
    padding: 15px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
    font-weight: 600;
    font-size: 18px;
}

.scale-option:hover {
    border-color: #7C5DAF;
    background: #f8f9ff;
    transform: translateY(-2px);
}

.scale-option.selected {
    border-color: #7C5DAF;
    background: #7C5DAF;
    color: white;
}

.scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

/* Progreso */
.progreso-section {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
    border-left: 4px solid #7C5DAF;
}

.progreso-section h3 {
    font-size: 16px;
    color: #7C5DAF;
    margin-bottom: 10px;
}

.progreso-bar-container {
    background: #e0e0e0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progreso-bar {
    background: linear-gradient(90deg, #7C5DAF 0%, #9675C4 100%);
    height: 100%;
    transition: width 0.5s;
}

.progreso-text {
    font-size: 14px;
    color: #666;
}

/* Lista de cursos */
.cursos-lista {
    display: grid;
    gap: 15px;
}

.curso-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s;
    position: relative;
}

.curso-card:hover:not(.evaluado) {
    border-color: #7C5DAF;
    box-shadow: 0 4px 12px rgba(124, 93, 175, 0.2);
}

.curso-card.evaluado {
    background: #f0f8f5;
    border-color: #22B79E;
}

.curso-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.curso-dia {
    font-weight: 600;
    color: #7C5DAF;
    font-size: 14px;
}

.curso-nombre {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    margin-bottom: 8px;
}

.curso-facilitador {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

.curso-facilitador strong {
    color: #333;
}

.curso-detalle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e0e0e0;
}

.curso-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 15px;
}

.btn-evaluar {
    background: #7C5DAF;
    color: white;
    padding: 8px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-evaluar:hover {
    background: #6a4d9a;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(124, 93, 175, 0.3);
}

.badge-evaluado {
    background: #22B79E;
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-evaluado::before {
    content: '✓';
    font-size: 16px;
}

.curso-info-section {
    background: #f8f9ff;
    border: 2px solid #7C5DAF;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.curso-info-section h3 {
    color: #7C5DAF;
    font-size: 16px;
    margin-bottom: 10px;
}

.curso-info-section p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.curso-info-section strong {
    color: #333;
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert.success {
    background: #d4f4ec;
    color: #0d6e5c;
    border: 1px solid #22B79E;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.info {
    background: #f3e5f5;
    color: #6a1b9a;
    border: 1px solid #7C5DAF;
}

.alert.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffc107;
}

/* Buttons */
.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #7C5DAF;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #6a4d9a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 93, 175, 0.4);
}

.btn-secondary {
    background: #f5f5f5;
    color: #666;
}

.btn-secondary:hover {
    background: #e0e0e0;
}

.btn-success {
    background: #22B79E;
    color: white;
}

.btn-success:hover {
    background: #1a9681;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(34, 183, 158, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7C5DAF;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.pregunta-numero {
    font-weight: 700;
    color: #7C5DAF;
}

/* Confirmación */
.confirmacion-content {
    text-align: center;
    padding: 40px 20px;
}

.confirmacion-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.confirmacion-content h2 {
    margin-bottom: 15px;
    color: #22B79E;
    font-size: 24px;
}

.confirmacion-content p {
    margin-bottom: 30px;
    color: #666;
    font-size: 16px;
}

.confirmacion-content .form-buttons {
    justify-content: center;
    border-top: none;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
    }

    .header-logo-container {
        width: 100%;
    }

    .header-content {
        width: 100%;
    }

    .form-content {
        padding: 30px 20px;
    }

    .scale-group {
        flex-wrap: wrap;
    }

    .scale-option {
        min-width: 60px;
    }

    .radio-group {
        flex-direction: column;
    }

    .form-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }
}
