/* Variáveis de Cores e Estilos */
:root {
    /* Cores UniFil */
    --unifil-orange: #FF5B00;
    --unifil-orange-light: #FE9252;
    --unifil-yellow: #FFDA60;
    --unifil-yellow-light: #FBE6A2;
    --unifil-black: #442C22;
    --unifil-black-dark: #281A15;
    --unifil-white: #fff;

    /* Cores neutras */
    --unifil-silver: #808C97;
    --unifil-silver-light: #A4B1BD;
    --unifil-light-gray: #F8F9FA;
    --unifil-white: #FFFFFF;
    --unifil-text: #586169;
    --unifil-muted: #C2CDD6;

    /* Gradientes UniFil */
    --unifil-black-gradient: linear-gradient(0deg,#000 0%, #2D1E18 70%, #663313 100%);
    --unifil-orange-gradient: linear-gradient(45deg, #FE9252 0%, #FF5B00 75%);

    /* Sombras e Efeitos */
    --glow-orange: 0 0 20px rgba(255, 91, 0, 0.4);
    --glow-orange-strong: 0 0 30px rgba(255, 91, 0, 0.6);
    --card-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* Reset e Estilos Globais */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--unifil-black-gradient);
    color: var(--unifil-white);
    font-family: 'Poppins', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

p span {
    font-weight: 600;
    background: var(--unifil-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animações */
@keyframes particleFloat {
    0%,
    100% {
        opacity: 0.3;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.1);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: var(--glow-orange);
    }

    50% {
        transform: scale(1.05);
        box-shadow: var(--glow-orange-strong);
    }
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

@keyframes rotateGlow {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Layout Principal */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* Logo */
.logo {
    height: auto;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInDown 1s ease;
}

.logo img {
    width: 100%;
    height: 60px;
    filter: drop-shadow(var(--glow-orange));
}

/* Tela Inicial (Step 1) */
#start-screen {
    animation: fadeInUp 1s ease;
}

#start-screen h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--unifil-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
}

#start-screen p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

/* Botões */
.btn {
    border-radius: 1rem;
}

.btn-orange {
    background: var(--unifil-orange-gradient);
    color: var(--unifil-white);
    border: none;
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--glow-orange);
    position: relative;
    overflow: hidden;
}

.btn-orange::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-orange:hover::before {
    width: 100%;
    height: 300px;
}

.btn-orange:hover {
    transform: translateY(-3px);
    box-shadow: var(--glow-orange-strong);
}

.btn-orange:active {
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: var(--unifil-black);
    color: var(--unifil-white);
    border: 2px solid rgba(255, 255, 255, 0.1);
    padding: 15px 30px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: var(--unifil-orange);
}

.btn-outline-light {
    background: transparent;
    color: var(--unifil-white);
    border: 2px solid var(--unifil-white);
    padding: 15px 30px;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
}

.btn-outline-light:hover {
    background: var(--unifil-white);
    color: var(--unifil-black);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

/* Quiz (Step 2) */
#quiz-screen {
    animation: scaleIn 0.5s ease;
}

.progress {
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.3);
}

.progress-bar {
    background: var(--unifil-orange-gradient) !important;
    transition: width 0.5s ease;
    box-shadow: var(--glow-orange);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

.question-counter {
    color: var(--unifil-orange-light);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 15px;
    letter-spacing: 1px;
    display: none;
}

#question-text {
    background: var(--unifil-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 14px;
    line-height: 1.4;
    animation: fadeInUp 0.5s ease;
}

/* Opções */
#options {
    display: grid;
    gap: 15px;
    margin-bottom: 30px;
}

.option-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 20px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    background: var(--unifil-black);
    color: var(--unifil-white);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.5s ease backwards;
}

.option-btn:nth-child(1) {
    animation-delay: 0.1s;
}

.option-btn:nth-child(2) {
    animation-delay: 0.2s;
}

.option-btn:nth-child(3) {
    animation-delay: 0.3s;
}

.option-btn:nth-child(4) {
    animation-delay: 0.4s;
}

.option-btn:hover {
    border-color: var(--unifil-orange);
    transform: translateY(-3px);
    box-shadow: var(--glow-orange);
}

.option-btn.active {
    border-color: var(--unifil-orange);
    background: rgba(255, 91, 0, 0.2);
    box-shadow: var(--glow-orange-strong);
    transform: translateY(-3px);
}

.option-icon {
    font-size: 1.5rem;
    margin-right: 15px;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.5));
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    gap: 15px;
}

/* Formulário (Step 3) */
#form-screen {
    animation: scaleIn 0.5s ease;
}

#form-screen h4 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: var(--unifil-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

#form-screen p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
}

.form-card {
    background: var(--unifil-black);
    padding: 40px 30px;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    text-align: left;
}

.form-label {
    color: var(--unifil-orange-light);
    font-weight: 600;
    margin-bottom: 5px;
}

.form-control {
    background-color: var(--unifil-black-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--unifil-white);
    padding: 12px 15px;
    border-radius: 0.75rem;
    margin-bottom: 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    background-color: var(--unifil-black-dark);
    color: var(--unifil-white);
    border-color: var(--unifil-orange);
    box-shadow: 0 0 0 0.25rem rgba(255, 91, 0, 0.25);
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

/* Estilos de Validação */
.input-wrapper {
    position: relative;
}

.form-control.error {
    border-color: var(--unifil-orange);
    box-shadow: 0 0 15px rgba(255, 91, 0, 0.2);
}

.error-message {
    color: var(--unifil-orange);
    font-size: 0.85rem;
    text-align: left;
    margin-top: -10px;
    margin-bottom: 15px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Resultado (Step 4) */
#result-screen {
    animation: scaleIn 0.5s ease;
}

.result-card {
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 2px solid var(--unifil-orange);
    position: relative;
    overflow: hidden;
}

.result-card h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

#course-title {
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--unifil-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

#course-desc {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
    display: none;
}

.result-icon {
    font-size: 5rem;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
    display: inline-block;
}

/* Estilos do Perfil */
.profile-section {
    background: var(--unifil-black);
    border-radius: 1rem;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.profile-title {
    color: var(--unifil-white);
    font-weight: 700;
    margin-bottom: 15px;
    font-size: 1rem;
}

.traits-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    justify-content: center;
}

.trait-badge {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1;
    color: var(--unifil-white);
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.5rem;
    background: var(--unifil-orange-gradient);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.profile-text {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Seção Bônus */
.bonus-section {
    background: rgba(255, 91, 0, 0.1);
    border: 2px dashed var(--unifil-orange);
    border-radius: 1rem;
    padding: 20px;
    margin: 20px 0;
    position: relative;
    z-index: 1;
}

.bonus-title {
    color: var(--unifil-orange-light);
    font-weight: 700;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.bonus-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    line-height: 1.5;
}

.bonus-text-small {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 15px;
    margin-bottom: 0;
    line-height: 1.4;
}

.bonus-highlight {
    background: var(--unifil-orange-gradient);
    padding: 15px;
    border-radius: 0.75rem;
    box-shadow: var(--glow-orange-strong);
    display: flex;
    flex-direction: column;
    gap: 5px;
    text-align: center;
}

.discount-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--unifil-black);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.discount-text span {
    color: var(--unifil-yellow-light);
    font-size: 2rem;
    font-weight: 800;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 30px;
    position: relative;
    z-index: 1;
}

/* Utilitários */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

/* Loading Animação */
.loading-dots {
    display: inline-flex;
    gap: 5px;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--unifil-orange);
    border-radius: 50%;
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--unifil-orange-gradient);
    color: var(--unifil-white);
    padding: 15px 30px;
    border-radius: 1rem;
    box-shadow: var(--glow-orange-strong);
    z-index: 9999;
    font-weight: 600;
    animation: fadeInDown 0.3s ease;
}

/* Estilização do Checkbox */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    text-align: left;
    margin-top: 0.5rem;
    margin-bottom: 1rem;;
}

.checkbox-wrapper input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    margin-top: 0.2rem;
    cursor: pointer;
    border: 2px solid #ccc;
    border-radius: 0.25rem;
    background-color: var(--unifil-black);
    transition: all 0.3s ease;
    position: relative;
}

.checkbox-wrapper input[type="checkbox"]:hover {
    border-color: var(--unifil-orange-light);
}

.checkbox-wrapper input[type="checkbox"]:checked {
    background-color: var(--unifil-orange);
    border-color: var(--unifil-orange);
}

.checkbox-wrapper input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid var(--unifil-white);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper label {
    font-size: 0.9rem;
    color: var(--unifil-white);
    line-height: 1.4;
    cursor: pointer;
    text-align: left;
}

.checkbox-wrapper label a {
    color: var(--unifil-orange);
    text-decoration: none;
}

.checkbox-wrapper label a:hover {
    text-decoration: underline;
}

.checkbox-wrapper.error label {
    color: var(--unifil-orange);
}

.error-message {
    color: var(--unifil-orange) !important;
    font-size: 0.85rem;
    text-align: left;
    margin-top: 0.3rem;
    margin-bottom: 1rem !important;
    display: none;
}

.error-message.show {
    display: block;
}

/* Modal */
.custom-modal-content {
    background: var(--unifil-black);
    border: 2px solid var(--unifil-orange);
    border-radius: 1.5rem;
    padding: 0;
    box-shadow: var(--card-shadow), var(--glow-orange);
}

.modal-header {
    align-items: inherit !important;
    border-bottom: none;
    padding: 30px 30px 15px 30px;
}

.modal-body {
    padding: 0 30px 15px 30px;
}

.modal-footer {
    border-top: none;
    padding: 15px 30px 30px 30px;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    transition: opacity 0.3s ease;
    margin-top: -20px !important;
    right: 20px !important;
    position: absolute !important;
}

.btn-close:hover {
    opacity: 1;
    box-shadow: none;
}

.modal-header .modal-title {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--unifil-orange-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.3;
    margin-bottom: 0;
    padding: 0 25px;
}

.modal-body .modal-description {
    color: rgba(255, 255, 255, 0.7);
}

.recommended-courses-section {
    background: rgba(255, 91, 0, 0.1);
    border: 1px solid rgba(255, 91, 0, 0.3);
    border-radius: 1rem;
    padding: 15px 10px;
    margin-bottom: 20px;
}

.section-title {
    color: var(--unifil-orange-light);
    font-size: 1rem;
    font-weight: 600;
}

.recommended-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.recommended-list li {
    color: var(--unifil-white);
    padding-left: 0;
    position: relative;
    font-size: 0.85rem;
}

.course-selection-section {
    margin-bottom: 20px;
}

.course-selection-section .form-label {
    display: block;
    margin-bottom: 10px;
}

#course-select {
    width: 100%;
    background-color: var(--unifil-black-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--unifil-white);
    padding: 12px 15px;
    border-radius: 0.75rem;
    transition: border-color 0.3s ease;
    cursor: pointer;
}

#course-select:focus {
    border-color: var(--unifil-orange);
    box-shadow: 0 0 0 0.25rem rgba(255, 91, 0, 0.25);
    outline: none;
}

#course-select option {
    background-color: var(--unifil-black-dark);
    color: var(--unifil-white);
    padding: 10px;
}

#whatsapp-btn i {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .quiz-container {
        padding: 30px 15px;
    }

    #start-screen h2 {
        font-size: 1.4rem;
    }

    #start-screen p {
        font-size: inherit;
        line-height: 1.4;
    }

    #question-text {
        font-size: 1.2rem;
    }

    .option-btn {
        padding: 15px;
        font-size: 0.85rem;
    }

    .form-card {
        padding: 20px;
    }

    #form-screen h4 {
        font-size: 1.4rem;
    }

    .result-card {
        padding: 20px;
    }

    .result-card h2 {
        font-size: 1rem;
    }

    .discount-text {
        font-size: 0.9rem;
    }

    .discount-text span {
        font-size: 1.8rem;
    }

    #course-title {
        font-size: 1rem;
    }

    .btn-secondary,
    .btn-orange {
        width: 100%;
    }

    .custom-modal-content {
        border-radius: 1rem;
    }

    .btn-close {
        margin-top: 0px !important;
        right: 15px !important;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-body {
        padding: 0 20px 10px 20px;
    }

    .modal-footer {
        padding: 10px 20px 20px 20px;
    }

    .modal-header .modal-title {
        font-size: 1.4rem;
    }

    .modal-body .modal-description {
        font-size: 0.95rem;
    }

    .recommended-list li {
        font-size: 0.9rem;
    }
}