html {
    font-size: 14px;
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* CONTENEDOR PRINCIPAL */
.cont {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.btn-back .arrow {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-left: 3px solid white;
    border-bottom: 3px solid white;
    transform: rotate(45deg);
}

/* CARD PRINCIPAL DE VALIDACIÓN */
.card_cont {
    width: 100%;
    max-width: 550px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

.card {
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    border: none;
}

.card-header {
    background: #07B1DE;
    border: none;
    padding: 2rem 1.5rem;
    position: relative;
}

    .card-header h3 {
        font-size: 1.75rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .card-header a {
        position: absolute;
        left: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        color: white;
        text-decoration: none;
        font-size: 1.5rem;
        transition: all 0.3s ease;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 50%;
        backdrop-filter: blur(10px);
    }

        .card-header a:hover {
            background: rgba(255, 255, 255, 0.3);
            transform: translateY(-50%) translateX(-3px);
        }

        .card-header a i {
            margin: 0;
        }

/* FORMULARIO DE VALIDACIÓN - LAYOUT HORIZONTAL */
.card-form {
    padding: 2.5rem 2rem;
}

.form-group-horizontal {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-label {
    font-size: 1rem;
    color: #4a5568;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-input-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.input-group-flex {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 3px;
    transition: all 0.3s ease;
    background: #f7fafc;
    width: 100%;
}

    .input:focus {
        border-color: ##8bc6f2;
        background: white;
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
        outline: none;
    }

    .input::placeholder {
        font-weight: 400;
        letter-spacing: 1px;
        font-size: 1rem;
        color: #a0aec0;
    }

/* BOTÓN DE VALIDACIÓN */
.btn_valid {
    background: #07B1DE;
    color: white;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    outline: none;
    border: 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
    white-space: nowrap;
    flex-shrink: 0;
}

    .btn_valid:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    }

    .btn_valid:active {
        transform: translateY(0);
    }

    .btn_valid:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none;
    }

/* MENSAJE DE ERROR */
#errorMensaje {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.75rem;
    border-radius: 8px;
    background: #fee;
    border-left: 4px solid #e53e3e;
    margin-top: 0.5rem;
}

/* SECCIÓN DE QUIZ */
#seccionQuiz {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.opciones-container{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#seccionQuiz .card {
    border-radius: 20px;
    overflow: hidden;
}

    #seccionQuiz .card-header {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%);
        padding: 2rem;
    }

    #seccionQuiz .card-body {
        padding: 3rem 2.5rem;
    }

.question-card {
    background: #f8f9fa;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0 !important;
    padding: 2rem;
    border-radius: 16px;
}

    .question-card:hover {
        background: #ffffff;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        transform: translateY(-2px);
    }

    .question-card h5 {
        font-size: 1.25rem;
        color: #2d3748;
        line-height: 1.6;
    }

    .question-card .badge {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
    }

.opcion-item {
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #e2e8f0 !important;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
}

    .opcion-item:hover {
        background: #eff6ff;
        border-color: #8bc6f2 !important;
        transform: translateX(5px);
    }

.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.1rem;
    cursor: pointer;
    margin-right: 0.75rem;
}

    .form-check-input:checked {
        background-color: #8bc6f2;
        border-color: #8bc6f2;
    }

.form-check-label {
    cursor: pointer;
    font-size: 1.05rem;
    color: #4a5568;
    line-height: 1.6;
}

.form-check-input:checked ~ .form-check-label {
    font-weight: 600;
    color: #8bc6f2;
}

.opcion-item:has(.form-check-input:checked) {
    background: #eff6ff;
    border-color: #8bc6f2 !important;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.2);
    transform: translateX(5px);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
    }

/* CONTENEDOR DE ALERTAS */
.alert-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    width: 100%;
}

/* ALERTA DE ÉXITO */
.alert-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    overflow: hidden;
    animation: slideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    min-height: 70px;
}

/* ANIMACIONES */
@keyframes slideIn {
    from {
        transform: translateX(450px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(450px);
        opacity: 0;
    }
}

.alert-success.closing {
    animation: slideOut 0.3s ease-out forwards;
}

.alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.alert-content {
    flex-grow: 1;
    font-size: 15px;
    line-height: 1.5;
}

.alert-title {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.alert-message {
    opacity: 0.95;
    font-size: 14px;
}

.alert-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    animation: progress 5s linear forwards;
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

/* BADGES */
.badge {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
}

/* SPINNER */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* RESPONSIVE */
@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

@media (max-width: 768px) {
    .cont {
        padding: 1.5rem 1rem;
    }

    .card_cont {
        max-width: 100%;
    }

    .card-form {
        padding: 2rem 1.5rem;
    }

    .form-input-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .btn_valid {
        width: 100%;
        padding: 1rem;
    }

    .card-header {
        padding: 1.5rem 1rem;
    }

        .card-header h3 {
            font-size: 1.5rem;
        }

    .input {
        font-size: 1.1rem;
        letter-spacing: 2px;
    }

    .alert-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: 100%;
    }

    .alert-success {
        padding: 15px 20px;
    }

    #seccionQuiz {
        max-width: 100%;
    }

        #seccionQuiz .card-header {
            padding: 1.5rem;
        }

        #seccionQuiz .card-body {
            padding: 2rem 1.5rem;
        }

    .question-card {
        padding: 1.5rem !important;
    }

        .question-card h5 {
            font-size: 1.1rem;
        }

    .opcion-item {
        padding: 0 !important;
        margin-bottom: 1rem !important;
        display: block !important;
    }

    .form-check-label-text {
        padding: 1rem 1.25rem 1rem 3.5rem !important;
    }

    .btn-success {
        padding: 1rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .cont {
        padding: 1rem 0.5rem;
    }

    .card-form {
        padding: 1.5rem 1rem;
    }

    .card-header h3 {
        font-size: 1.25rem;
    }

    .input {
        font-size: 1rem;
        letter-spacing: 1.5px;
        padding: 0.875rem;
    }

    .btn_valid {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .alert-success {
        padding: 12px 15px;
        min-height: 60px;
    }

    .alert-icon {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    .alert-title {
        font-size: 14px;
    }

    .alert-message {
        font-size: 13px;
    }

    #seccionQuiz .card-body {
        padding: 1.5rem 1rem;
    }

    .question-card {
        padding: 1.25rem !important;
        margin-bottom: 1.5rem !important;
    }

        .question-card h5 {
            font-size: 1rem;
        }

    .opcion-item {
        padding: 0.875rem 1rem !important;
    }

    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-right: 0.5rem;
    }

    .form-check-label {
        font-size: 0.95rem;
    }

    .btn-success {
        padding: 0.875rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 360px) {
    .card-form {
        padding: 1.25rem 0.875rem;
    }

    .input {
        font-size: 0.95rem;
    }

    .btn_valid {
        font-size: 0.95rem;
    }
}

/* VARIANTE SIN TÍTULO */
.alert-success.no-title .alert-content {
    display: flex;
    align-items: center;
}

.alert-success.no-title .alert-message {
    font-size: 15px;
    opacity: 1;
}
