/* Quiz Modal Styling */
#quizModal {
    z-index: 9999;
}
#quizModal .modal-content {
    border-radius: 16px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}
#quizModal .modal-header {
    background-color: #352A44 !important;
    color: #ffffff !important;
    border-bottom: none;
    padding: 22px 30px;
    position: relative;
    z-index: 1;
}
#quizModal .modal-title,
#quizModal .modal-header .modal-title {
    font-weight: 700;
    font-size: 22px;
    margin: 0;
    color: #ffffff !important;
    opacity: 1 !important;
}
#quizModal .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}
#quizModal .modal-body {
    padding: 30px;
    background-color: #fcfaf8;
    max-height: 75vh;
    overflow-y: auto;
}

/* Progress Bar */
.quiz-progress-wrapper {
    margin-bottom: 25px;
}
.quiz-progress-text {
    font-size: 14px;
    font-weight: 600;
    color: #352A44;
    margin-bottom: 8px;
    display: block;
}
.quiz-progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}
.quiz-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #352A44, #6b5b8a);
    width: 0%;
    transition: width 0.4s ease;
}

/* Question Area */
#quiz-question-container {
    min-height: 350px;
}
.quiz-group-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6b5b8a;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
}
.quiz-question {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 25px;
    line-height: 1.45;
}

/* Options */
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.quiz-option {
    display: block;
    position: relative;
    padding: 16px 20px 16px 50px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    color: #333;
    font-weight: 500;
    line-height: 1.4;
}
.quiz-option:hover {
    border-color: #352A44;
    background: #f8f5fc;
}
.quiz-option input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.quiz-option .checkmark {
    position: absolute;
    top: 50%;
    left: 18px;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: #e9ecef;
    border-radius: 50%;
    transition: all 0.2s ease;
}
.quiz-option:hover input ~ .checkmark {
    background-color: #ccc;
}
.quiz-option input:checked ~ .checkmark {
    background-color: #352A44;
}
.quiz-option .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.quiz-option input:checked ~ .checkmark:after {
    display: block;
}
.quiz-option .checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}
.quiz-option.selected {
    border-color: #352A44;
    background-color: #f3f0f8;
}

/* Controls */
.quiz-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}
.quiz-btn {
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}
.quiz-btn-prev {
    background: #e9ecef;
    color: #495057;
}
.quiz-btn-prev:hover {
    background: #dde0e3;
}
.quiz-btn-next {
    background: #352A44;
    color: #ffffff;
}
.quiz-btn-next:hover {
    background: #4a3d5c;
}
.quiz-btn-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ===== RESULTS AREA ===== */
#quiz-result-container {
    display: none;
    padding: 10px 0;
}

/* Score Header */
.result-header {
    text-align: center;
    margin-bottom: 30px;
}
.result-header .result-label {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6b5b8a;
    font-weight: 700;
    margin-bottom: 8px;
}
.result-score {
    font-size: 72px;
    font-weight: 900;
    color: #352A44;
    line-height: 1;
    margin-bottom: 2px;
}
.result-score-max {
    font-size: 16px;
    color: #999;
    font-weight: 500;
    margin-bottom: 12px;
}
.result-tier {
    font-size: 22px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 0;
}

/* Score Gauge Bar */
.result-gauge {
    margin: 25px 0;
    padding: 0 5px;
}
.result-gauge-bar {
    height: 12px;
    border-radius: 6px;
    background: linear-gradient(90deg, #e74c3c 0%, #e74c3c 33%, #f39c12 33%, #f39c12 66%, #27ae60 66%, #27ae60 100%);
    position: relative;
}
.result-gauge-marker {
    position: absolute;
    top: -6px;
    width: 24px;
    height: 24px;
    background: #352A44;
    border: 3px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transform: translateX(-50%);
    transition: left 0.6s ease;
}
.result-gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
}

/* Group Breakdown Cards */
.result-breakdown {
    margin: 25px 0;
}
.result-breakdown-title {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 15px;
    text-align: center;
}
.result-group-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #f0edf5;
}
.result-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.result-group-name {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}
.result-group-score {
    font-size: 14px;
    font-weight: 800;
    color: #352A44;
    background: #f3f0f8;
    padding: 3px 12px;
    border-radius: 20px;
}
.result-group-bar-bg {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}
.result-group-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.6s ease;
}
.result-group-bar-fill.red { background: linear-gradient(90deg, #e74c3c, #ff6b6b); }
.result-group-bar-fill.yellow { background: linear-gradient(90deg, #f39c12, #f7c948); }
.result-group-bar-fill.green { background: linear-gradient(90deg, #27ae60, #6dd5a0); }

/* Main Description */
.result-description {
    font-size: 15px;
    color: #333333;
    line-height: 1.7;
    text-align: left;
    background: #ffffff;
    padding: 22px 24px;
    border-radius: 12px;
    border-left: 5px solid #352A44;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    margin: 25px 0;
}
.result-description strong {
    color: #352A44;
}

/* CTA */
.result-cta {
    text-align: center;
    margin-top: 20px;
}
.result-cta .btn-default {
    display: inline-block;
    background: #352A44;
    color: #ffffff;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}
.result-cta .btn-default:hover {
    background: #4a3d5c;
}

/* ===== SIGNUP FORM ===== */
.quiz-form-group {
    margin-bottom: 18px;
}
.quiz-form-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 6px;
}
.quiz-form-input {
    width: 100%;
    padding: 13px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #ffffff;
    transition: border-color 0.2s ease;
    outline: none;
    box-sizing: border-box;
}
.quiz-form-input:focus {
    border-color: #352A44;
}
.quiz-form-input::placeholder {
    color: #aaa;
}
.quiz-phone-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.quiz-form-select {
    width: 130px;
    min-width: 130px;
    padding: 13px 10px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 15px;
    color: #333;
    background: #ffffff;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
    appearance: auto;
}
.quiz-form-select:focus {
    border-color: #352A44;
}
.quiz-phone-row .quiz-form-input {
    flex: 1;
}
