/* Quiz Container */
.quiz-wrapper {
    max-width: 800px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    padding: 50px 40px;
    color: #111111;
    font-family: 'Barlow', 'Roboto', sans-serif;
    position: relative;
    overflow: hidden;
    border: 1px solid #eeeeee;
    min-height: 600px; /* Fixed height to prevent jumping */
    display: flex;
    flex-direction: column;
}

/* Typography */
.quiz-wrapper h2, .quiz-wrapper h3 {
    font-family: 'Barlow', sans-serif;
    color: #111111;
    text-align: center;
    margin-bottom: 25px;
    font-weight: 800;
    line-height: 1.3;
}

.quiz-wrapper h2 {
    font-size: 32px;
}

.quiz-wrapper h3 {
    font-size: 26px;
}

.quiz-wrapper p {
    font-size: 18px;
    line-height: 1.6;
    color: #444444;
    text-align: center;
    font-weight: 500;
}

/* Progress Bar */
.quiz-progress-container {
    width: 100%;
    height: 10px;
    background: #eeeeee;
    border-radius: 5px;
    margin-bottom: 40px;
    overflow: hidden;
}

.quiz-progress-bar {
    height: 100%;
    background: #df4236; /* Red accent matching the image */
    width: 0%;
    transition: width 0.4s ease-in-out;
}

/* Steps */
.quiz-step {
    display: none;
    animation: fadeIn 0.4s ease-in-out;
    flex-grow: 1;
    flex-direction: column;
    justify-content: center;
}

.quiz-step.active {
    display: flex;
}

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

/* Options (Radio Buttons) */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 35px;
    margin-top: 25px;
}

.quiz-option {
    display: block;
    position: relative;
    padding: 20px 25px;
    background: #ffffff;
    border: 2px solid #dddddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.quiz-option:hover {
    background: #fdfdfd;
    border-color: #bbbbbb;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.quiz-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.quiz-option.selected {
    border-color: #df4236;
    background: rgba(223, 66, 54, 0.05);
    color: #df4236;
    box-shadow: 0 4px 15px rgba(223, 66, 54, 0.15);
}

/* Input Fields */
.quiz-input-group {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 35px;
    margin-top: 20px;
}

.quiz-input {
    width: 100%;
    padding: 18px 20px;
    background: #f9f9f9;
    border: 2px solid #dddddd;
    border-radius: 8px;
    color: #111111;
    font-size: 18px;
    font-family: inherit;
    font-weight: 500;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.quiz-input:focus {
    outline: none;
    border-color: #df4236;
    background: #ffffff;
}

textarea.quiz-input {
    min-height: 140px;
    resize: vertical;
}

.quiz-input-row {
    display: flex;
    gap: 15px;
}

.quiz-input-row .quiz-input {
    flex: 1;
}

.quiz-phone-group {
    display: flex;
    align-items: stretch;
}

.quiz-phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #f0f0f0;
    border: 2px solid #dddddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #111111;
    white-space: nowrap;
}

.quiz-phone-input {
    border-radius: 0 8px 8px 0 !important;
}

.quiz-phone-input:focus {
    border-color: #df4236 !important;
}

@media (max-width: 600px) {
    .quiz-input-row {
        flex-direction: column;
        gap: 20px;
    }
}

/* Buttons */
.quiz-btn-container {
    text-align: center;
    margin-top: 20px;
}

.quiz-btn {
    background: #df4236;
    color: #ffffff;
    border: none;
    padding: 20px 50px;
    font-size: 20px;
    font-weight: 800;
    border-radius: 8px; /* Blocky, solid look */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    width: 100%;
    max-width: 400px;
}

.quiz-btn:hover {
    background: #c8392e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(223, 66, 54, 0.3);
}

.quiz-btn:disabled {
    background: #e0e0e0;
    color: #999999;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Screen */
#quiz-loading {
    text-align: center;
    padding: 60px 0;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-left-color: #df4236;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 30px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-text {
    font-size: 24px;
    color: #111111;
    font-weight: 800;
}

/* Final Result Card */
.result-card {
    background: #ffffff;
    border: 2px solid #eeeeee;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.result-card h2 {
    color: #df4236;
    font-size: 42px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.result-card h3 {
    font-size: 24px;
    margin-bottom: 25px;
    color: #111111;
}

.result-card p {
    margin-bottom: 20px;
    font-size: 18px;
    color: #444444;
}

.price-box {
    background: #fef4f3;
    border: 2px dashed #df4236;
    padding: 25px;
    border-radius: 8px;
    margin: 35px 0;
}

.price-title {
    font-size: 20px;
    font-weight: 800;
    margin-bottom: 10px;
    color: #111111;
}

.price-amount {
    font-size: 56px;
    font-weight: 900;
    color: #df4236;
}

.guarantees {
    text-align: left;
    margin: 0 auto 35px auto;
    max-width: 380px;
}

.guarantee-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
    color: #333333;
}

.guarantee-item svg {
    width: 24px;
    height: 24px;
    fill: #df4236;
    margin-right: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .quiz-wrapper {
        padding: 30px 20px;
        margin: 20px 10px;
        border: none;
        box-shadow: none;
    }
    
    .result-card {
        padding: 20px 10px;
        border: none;
        box-shadow: none;
    }
    
    .price-amount {
        font-size: 42px;
    }

    .quiz-btn {
        padding: 18px 20px;
        font-size: 18px;
    }
}

.urgency-timer {
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background: #fff3f2;
    border-radius: 8px;
    border: 1px solid #df4236;
}

.urgency-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #df4236;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.urgency-countdown {
    font-size: 42px;
    font-weight: 900;
    color: #df4236;
    font-family: monospace;
}
