/* GAF Score Calculator - Purple/Mental Health Theme */
.gaf-calculator-container {
    max-width: 900px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1e293b;
    line-height: 1.6;
}

/* Hero */
.gaf-hero {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    text-align: center;
    padding: 48px 32px;
    border-radius: 16px;
    margin-bottom: 32px;
}
.gaf-hero h1 { font-size: 2rem; margin: 0 0 8px; }
.hero-subtitle { font-size: 1.15rem; opacity: 0.9; margin: 0 0 20px; }
.hero-badges { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.badge {
    background: rgba(255,255,255,0.18);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}
.badge-icon { font-size: 1rem; }

/* Introduction */
.intro-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 28px;
}
.intro-section h2 { color: #5b21b6; margin-top: 0; }
.gaf-highlights { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.highlight-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #f5f3ff;
    padding: 16px;
    border-radius: 10px;
}
.highlight-icon { font-size: 1.6rem; }
.highlight-item strong { display: block; color: #5b21b6; font-size: 0.92rem; }
.highlight-item p { margin: 2px 0 0; font-size: 0.82rem; color: #64748b; }

/* Privacy */
.privacy-notice {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 28px;
}
.privacy-icon { font-size: 1.6rem; }
.privacy-notice strong { display: block; color: #166534; font-size: 0.95rem; }
.privacy-notice p { margin: 2px 0 0; font-size: 0.85rem; color: #4b5563; }

/* Form */
.calculator-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}
.calculator-form-section h2 { color: #5b21b6; font-size: 1.4rem; margin: 0 0 6px; }
.form-instructions { color: #64748b; margin: 0 0 24px; }

/* Domain Sections */
.domain-section {
    margin-bottom: 28px;
    border: 1px solid #e9e5f5;
    border-radius: 12px;
    padding: 20px;
    background: #faf8ff;
}
.domain-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.domain-icon { font-size: 1.6rem; }
.domain-header h3 { margin: 0; color: #5b21b6; font-size: 1.1rem; }

.question-text { font-weight: 600; color: #374151; margin: 0 0 14px; }

.options-list { display: flex; flex-direction: column; gap: 8px; }
.option-label { cursor: pointer; display: block; }
.option-label input { display: none; }
.option-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s;
    background: #fff;
}
.option-label input:checked + .option-box {
    border-color: #7c3aed;
    background: #f5f3ff;
}
.option-score {
    background: #ede9fe;
    color: #5b21b6;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.82rem;
    white-space: nowrap;
    min-width: 50px;
    text-align: center;
}
.option-desc { font-size: 0.88rem; color: #475569; }

.form-submit { text-align: center; }
.submit-btn {
    background: linear-gradient(135deg, #7c3aed, #5b21b6);
    color: #fff;
    border: none;
    padding: 14px 48px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(124,58,237,0.35);
}

/* Results */
.results-section {
    background: #fff;
    border: 2px solid #e9e5f5;
    border-radius: 14px;
    padding: 32px;
    margin-bottom: 28px;
    text-align: center;
}
.results-section h2 { color: #5b21b6; }

/* Score Circle */
.gaf-score-display { margin: 24px 0; }
.score-circle {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 8px solid #7c3aed;
    background: #f5f3ff;
}
.score-number { font-size: 3rem; font-weight: 800; color: #5b21b6; line-height: 1; }
.score-label { font-size: 0.82rem; color: #64748b; }

/* Gauge */
.gaf-gauge { position: relative; margin: 24px 0 40px; }
.gauge-bar {
    display: flex;
    height: 28px;
    border-radius: 14px;
    overflow: hidden;
}
.gauge-zone {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 600;
    color: #fff;
}
.severe-zone { background: #7f1d1d; }
.impaired-zone { background: #dc2626; }
.moderate-zone { background: #f97316; }
.mild-zone { background: #eab308; }
.good-zone { background: #22c55e; }
.gauge-marker {
    position: absolute;
    top: -8px;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: #1e293b;
    transition: left 0.6s ease;
}

/* Interpretation Card */
.interpretation-card {
    text-align: left;
    padding: 24px;
    border-radius: 12px;
    margin: 20px 0;
    border: 2px solid;
}
.interpretation-card.level-good { background: #f0fdf4; border-color: #22c55e; }
.interpretation-card.level-mild { background: #fefce8; border-color: #eab308; }
.interpretation-card.level-moderate { background: #fff7ed; border-color: #f97316; }
.interpretation-card.level-serious { background: #fef2f2; border-color: #ef4444; }
.interpretation-card.level-severe { background: #fef2f2; border-color: #7f1d1d; }
.interpretation-card h3 { margin: 0 0 8px; }
.interpretation-card p { margin: 0; color: #475569; }

/* Domain Breakdown */
.domain-breakdown { text-align: left; margin: 24px 0; }
.domain-breakdown h3 { color: #5b21b6; }
.domain-bar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}
.domain-bar-label { width: 110px; font-weight: 600; font-size: 0.9rem; color: #374151; }
.domain-bar-track {
    flex: 1;
    height: 20px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}
.domain-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.8s ease;
}
.domain-bar-fill.psychological { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.domain-bar-fill.social { background: linear-gradient(90deg, #67e8f9, #06b6d4); }
.domain-bar-fill.occupational { background: linear-gradient(90deg, #86efac, #22c55e); }
.domain-bar-score { font-weight: 700; font-size: 0.95rem; color: #5b21b6; width: 30px; }

/* Recommendations */
.recommendations-section {
    text-align: left;
    background: #f5f3ff;
    border: 1px solid #e9e5f5;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}
.recommendations-section h4 { margin: 0 0 12px; color: #5b21b6; }
.recommendations-section ul { margin: 0; padding-left: 18px; }
.recommendations-section li { margin-bottom: 6px; font-size: 0.92rem; color: #475569; }
.crisis-box {
    background: #fef2f2;
    border: 2px solid #fca5a5;
    border-radius: 10px;
    padding: 16px;
    margin-top: 16px;
}
.crisis-box h4 { color: #991b1b; margin: 0 0 8px; }
.crisis-box p { margin: 0; font-size: 0.9rem; color: #7f1d1d; }

.retake-btn {
    background: transparent;
    border: 2px solid #7c3aed;
    color: #7c3aed;
    padding: 10px 28px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: all 0.2s;
}
.retake-btn:hover { background: #7c3aed; color: #fff; }

/* Education Tabs */
.education-tabs {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 28px;
}
.tab-nav {
    display: flex;
    gap: 6px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
    overflow-x: auto;
}
.tab-btn {
    background: none;
    border: none;
    padding: 10px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active,
.tab-btn:hover { color: #7c3aed; border-bottom-color: #7c3aed; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.tab-content h3 { color: #5b21b6; margin-top: 0; }
.tab-content h4 { color: #374151; margin-top: 20px; }
.tab-content p { color: #475569; }
.tab-content ul { color: #475569; padding-left: 20px; }
.tab-content li { margin-bottom: 6px; }

/* Scale Grid */
.scale-grid { display: flex; flex-direction: column; gap: 8px; }
.scale-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 5px solid;
}
.scale-range { font-weight: 800; font-size: 0.95rem; min-width: 55px; }
.scale-desc { font-size: 0.88rem; color: #475569; }
.superior { background: #f0fdf4; border-left-color: #16a34a; }
.minimal { background: #f0fdf4; border-left-color: #22c55e; }
.transient { background: #fefce8; border-left-color: #84cc16; }
.mild { background: #fefce8; border-left-color: #eab308; }
.moderate { background: #fff7ed; border-left-color: #f97316; }
.serious { background: #fef2f2; border-left-color: #ef4444; }
.major { background: #fef2f2; border-left-color: #dc2626; }
.influenced { background: #fef2f2; border-left-color: #b91c1c; }
.danger { background: #fef2f2; border-left-color: #991b1b; }
.persistent { background: #fef2f2; border-left-color: #7f1d1d; }

/* FAQ */
.faq-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 28px;
}
.faq-section h2 { color: #5b21b6; margin-top: 0; }
.faq-item { border-bottom: 1px solid #e2e8f0; }
.faq-item:last-child { border-bottom: none; }
.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 16px 0;
    text-align: left;
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::after { content: '+'; font-size: 1.4rem; color: #7c3aed; font-weight: 300; }
.faq-item.active .faq-question::after { content: '\2212'; }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-item.active .faq-answer { max-height: 500px; }
.faq-answer p { padding: 0 0 16px; color: #475569; margin: 0; font-size: 0.95rem; }

/* Disclaimer */
.medical-disclaimer {
    background: #fef9ee;
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.medical-disclaimer h3 { color: #92400e; margin: 0 0 8px; font-size: 1rem; }
.medical-disclaimer p { margin: 0; font-size: 0.88rem; color: #78716c; }

/* Related */
.related-calculators { margin-bottom: 28px; }
.related-calculators h2 { color: #5b21b6; }
.related-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.related-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 12px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}
.related-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.related-icon { font-size: 2rem; margin-bottom: 8px; }
.related-title { font-weight: 700; color: #1e293b; font-size: 0.9rem; margin-bottom: 4px; }
.related-desc { color: #64748b; font-size: 0.78rem; }

/* References */
.references-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 28px;
}
.references-section h3 { margin: 0 0 12px; color: #475569; font-size: 1rem; }
.references-list { margin: 0; padding-left: 20px; }
.references-list li { font-size: 0.82rem; color: #64748b; margin-bottom: 8px; }
.references-list a { color: #7c3aed; }

/* Responsive */
@media (max-width: 768px) {
    .gaf-hero { padding: 32px 20px; }
    .gaf-hero h1 { font-size: 1.5rem; }
    .gaf-highlights { grid-template-columns: 1fr; }
    .calculator-form-section { padding: 20px; }
    .domain-section { padding: 14px; }
    .option-box { flex-direction: column; gap: 4px; align-items: flex-start; }
    .related-grid { grid-template-columns: repeat(2, 1fr); }
    .tab-btn { padding: 8px 10px; font-size: 0.78rem; }
    .score-circle { width: 120px; height: 120px; }
    .score-number { font-size: 2.2rem; }
    .domain-bar-label { width: 80px; font-size: 0.82rem; }
}
