#tabulos-quiz-wrapper {
    --t-gradient-start: #ff3030;
    --t-gradient-end: #fd95f9;
    --t-bg-card: #1a1a1a;
    --t-text-primary: #ffffff;
    --t-text-secondary: #cccccc;
    --t-error: #ff4d4d;

    font-family: "Montserrat", Helvetica, Arial, sans-serif;
    color: var(--t-text-primary);
    position: relative;
    padding: 2rem 0;
    box-sizing: border-box;
    line-height: 1.5;
}

#tabulos-quiz-wrapper * {
    box-sizing: border-box;
}

/* Inner Container */
#tabulos-quiz-wrapper .tabulos-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    padding: 0 20px;
}

/* --- HEADER --- */
#tabulos-quiz-wrapper .quiz-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
    position: relative;
}

#tabulos-quiz-wrapper .tabulos-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 1rem;
    text-transform: uppercase;
    color: var(--t-text-secondary);
    animation: tabulosFadeIn 1s ease-out 0.3s both;
}

#tabulos-quiz-wrapper .tabulos-intro {
    font-size: 1.1rem;
    font-weight: 300;
    margin-top: 1rem;
    color: var(--t-text-secondary);
    line-height: 1.6;
    animation: tabulosFadeIn 1s ease-out 0.3s both;
}

/* --- PROGRESS TEXT --- */
#tabulos-quiz-wrapper .progress-text {
    text-align: center;
    font-size: 0.9rem;
    color: var(--t-text-secondary);
}

/* --- QUESTION CARD --- */
#tabulos-quiz-wrapper .question-card {
    background: var(--t-bg-card);
    border-radius: 20px;
    padding: 3rem;
    margin: 2rem 0;
    border: 1px solid #2a2a2a;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    animation: tabulosSlideInUp 0.6s ease-out;
}

/* The Background Track (Not Loaded State) */
#tabulos-quiz-wrapper .card-progress-track {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
}

/* The Foreground Bar (Loaded State) */
#tabulos-quiz-wrapper .card-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(
        to right,
        var(--t-gradient-start),
        var(--t-gradient-end)
    );
    width: 0%;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
    box-shadow: 0 0 15px rgba(255, 48, 48, 0.4);
}

#tabulos-quiz-wrapper .question-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--t-text-secondary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    display: block;
    background: linear-gradient(
        to right,
        var(--t-gradient-start),
        var(--t-gradient-end)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

#tabulos-quiz-wrapper .question-text {
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 2.5rem;
    color: var(--t-text-primary);
}

/* --- ANSWER OPTIONS --- */
#tabulos-quiz-wrapper .answer-option {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid #2a2a2a;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

#tabulos-quiz-wrapper .answer-option:hover {
    border-color: var(--t-gradient-start);
    transform: translateX(5px);
    box-shadow: 0 5px 20px rgba(255, 48, 48, 0.2);
}

#tabulos-quiz-wrapper .answer-option::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 48, 48, 0.1),
        rgba(253, 149, 249, 0.1)
    );
    transition: left 0.4s ease;
    z-index: 0;
}

#tabulos-quiz-wrapper .answer-option:hover::before {
    left: 0;
}

#tabulos-quiz-wrapper .option-label {
    position: relative;
    z-index: 1;
}

#tabulos-quiz-wrapper .answer-option.selected {
    border-color: var(--t-gradient-end);
    background: linear-gradient(
        to right,
        rgba(255, 48, 48, 0.15),
        rgba(253, 149, 249, 0.15)
    );
    box-shadow: 0 5px 30px rgba(253, 149, 249, 0.3);
}

#tabulos-quiz-wrapper .option-label {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(
        to right,
        var(--t-gradient-start),
        var(--t-gradient-end)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
}

#tabulos-quiz-wrapper .option-text {
    color: var(--t-text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

/* --- BUTTONS & CONTROLS --- */
#tabulos-quiz-wrapper .quiz-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 2rem auto 0.5rem auto;
}

#tabulos-quiz-wrapper .next-button,
#tabulos-quiz-wrapper .back-button {
    border: none;
    border-radius: 50px;
    padding: 1.2rem 3rem;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* Next Button - Primary */
#tabulos-quiz-wrapper .next-button {
    background: linear-gradient(
        to right,
        var(--t-gradient-start),
        var(--t-gradient-end)
    );
    color: white;
    box-shadow: 0 10px 30px rgba(255, 48, 48, 0.3);
    opacity: 0.5;
}

#tabulos-quiz-wrapper .next-button.active {
    opacity: 1;
}

#tabulos-quiz-wrapper .next-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 48, 48, 0.5);
}

/* Back Button - Secondary */
#tabulos-quiz-wrapper .back-button {
    background: transparent;
    border: 2px solid #333;
    color: #999;
}

#tabulos-quiz-wrapper .back-button:hover {
    border-color: #666;
    color: white;
}

/* Error Message (Smooth Animation) */
#tabulos-quiz-wrapper .tabulos-error-message {
    color: var(--t-error);
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;

    /* Animation Properties */
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    margin-top: 0;
}

#tabulos-quiz-wrapper .tabulos-error-message.visible {
    max-height: 50px;
    opacity: 1;
    margin-top: 15px;
}

/* --- FORM INPUTS --- */
#tabulos-quiz-wrapper .tabulos-input {
    width: 100%;
    padding: 15px;
    margin-top: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #333;
    border-radius: 10px;
    color: white;
    font-size: 1rem;
}
#tabulos-quiz-wrapper .tabulos-input:focus {
    outline: none;
    border-color: var(--t-gradient-end);
}

/* --- RESULTS & UTILITIES --- */
#tabulos-quiz-wrapper .hidden {
    display: none !important;
}

#tabulos-quiz-wrapper .result-title {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(
        to right,
        var(--t-gradient-start),
        var(--t-gradient-end)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

/* --- ANIMATIONS --- */
@keyframes tabulosFadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes tabulosFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes tabulosSlideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- RESPONSIVE --- */
@media screen and (max-width: 768px) {
    #tabulos-quiz-wrapper .question-card {
        padding: 1.5rem;
    }
    #tabulos-quiz-wrapper .quiz-controls {
        flex-direction: column-reverse;
        gap: 15px;
    }
    #tabulos-quiz-wrapper .next-button,
    #tabulos-quiz-wrapper .back-button {
        width: 100%;
    }
}

/* --- UTILITIES --- */
#tabulos-quiz-wrapper .tabulos-centered-card {
    text-align: center;
}
#tabulos-quiz-wrapper .tabulos-small-text {
    color: #999;
    font-size: 0.9rem;
    margin-top: 20px;
}
#tabulos-quiz-wrapper .tabulos-form-title {
    margin-bottom: 20px;
    font-size: 2rem;
    color: white;
}
#tabulos-quiz-wrapper .tabulos-input-group {
    margin: 20px 0;
}
#tabulos-quiz-wrapper .tabulos-checkbox-group {
    text-align: left;
    font-size: 0.8em;
    margin-bottom: 20px;
    color: #ccc;
    line-height: 1.4;
}
#tabulos-quiz-wrapper .tabulos-checkbox-label {
    display: flex;
    align-items: start;
    gap: 10px;
    cursor: pointer;
}

/* --- CUSTOM CHECKBOX STYLING --- */
#tabulos-quiz-wrapper .tabulos-checkbox {
    -webkit-appearance: none;
    appearance: none;
    background-color: #cccccc;
    margin: 0;
    width: 28px;
    height: 28px;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    display: grid;
    place-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* The Animated Checkmark */
#tabulos-quiz-wrapper .tabulos-checkbox::before {
    content: "";
    width: 7px;
    height: 14px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    top: -2px;
}

/* Hover State */
#tabulos-quiz-wrapper .tabulos-checkbox:hover {
    border-color: var(--t-gradient-end);
    box-shadow: 0 0 10px rgba(253, 149, 249, 0.2);
}

/* Checked State Background */
#tabulos-quiz-wrapper .tabulos-checkbox:checked {
    border: none;
    background: linear-gradient(
        to right,
        var(--t-gradient-start),
        var(--t-gradient-end)
    );
    box-shadow: 0 5px 15px rgba(253, 149, 249, 0.3);
}

/* Show Checkmark on Checked */
#tabulos-quiz-wrapper .tabulos-checkbox:checked::before {
    transform: rotate(45deg) scale(1);
}

#tabulos-quiz-wrapper .tabulos-spinner {
    margin-top: 10px;
    color: #fff;
    font-style: italic;
}
#tabulos-quiz-wrapper .tabulos-input:required {
    border-left: 3px solid var(--t-gradient-end);
}
#tabulos-quiz-wrapper .tabulos-input:focus:invalid {
    border-color: #ff3030;
    box-shadow: 0 0 5px rgba(255, 48, 48, 0.5);
}

/* --- TYPE SPECIFIC COLORING --- */

/* Type A (Index 0) - Gold #cca23a */
#tabulos-quiz-wrapper .answer-option.option-0 {
    --t-opt-color: #cca23a;
}
/* Type B (Index 1) - Red #c63034 */
#tabulos-quiz-wrapper .answer-option.option-1 {
    --t-opt-color: #c63034;
}
/* Type C (Index 2) - Pink #d988b3 */
#tabulos-quiz-wrapper .answer-option.option-2 {
    --t-opt-color: #d988b3;
}
/* Type D (Index 3) - Blue #201ad0 */
#tabulos-quiz-wrapper .answer-option.option-3 {
    --t-opt-color: #201ad0;
}
/* Type E (Index 4) - Green #58b284 */
#tabulos-quiz-wrapper .answer-option.option-4 {
    --t-opt-color: #58b284;
}

/* 2. Apply Colors to Label (A, B, C...) */
#tabulos-quiz-wrapper .answer-option[class*="option-"] .option-label {
    background: var(--t-opt-color);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--t-opt-color);
}

/* 3. Hover State - Border & Shadow */
#tabulos-quiz-wrapper .answer-option[class*="option-"]:hover {
    border-color: var(--t-opt-color);
    box-shadow: 0 5px 20px
        color-mix(in srgb, var(--t-opt-color), transparent 70%);
}

/* 4. Hover Background Animation */
#tabulos-quiz-wrapper .answer-option[class*="option-"]::before {
    background: linear-gradient(
        to right,
        color-mix(in srgb, var(--t-opt-color), transparent 90%),
        color-mix(in srgb, var(--t-opt-color), transparent 80%)
    );
}

/* 5. Selected State */
#tabulos-quiz-wrapper .answer-option[class*="option-"].selected {
    border-color: var(--t-opt-color);
    background: color-mix(in srgb, var(--t-opt-color), transparent 85%);
    box-shadow: 0 5px 30px
        color-mix(in srgb, var(--t-opt-color), transparent 60%);
}
