:root {
    --primary-color: #0d253f;
    --primary-light: #1e3d59;
    --accent-teal: #17a2b8;
    --accent-teal-soft: #e6f7f9;
    --bg-color: #f8f9fa;
    --card-bg: #ffffff;
    --text-main: #2b2d42;
    --text-muted: #6c757d;
    --border-color: #e2e8f0;
    --danger-color: #e63946;
    --warning-color: #ffb703;
    --success-color: #2a9d8f;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo { text-decoration: none; font-weight: 700; color: var(--primary-color); font-size: 1.1rem; letter-spacing: 0.5px; }

.lang-switcher { display: flex; align-items: center; gap: 0.5rem; }
.lang-btn { background: none; border: none; font-weight: 600; cursor: pointer; color: var(--text-muted); padding: 4px 8px; min-height: 44px; font-size: 0.95rem; }
.lang-btn.active { color: var(--accent-teal); border-bottom: 2px solid var(--accent-teal); }

.app-main { flex: 1; max-width: 800px; width: 100%; margin: 0 auto; padding: 1.5rem 1rem; }

.card {
    background: var(--card-bg);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.hero-card { text-align: center; padding: 2.5rem 1.5rem; background: linear-gradient(135deg, #ffffff 0%, #f0f7ff 100%); }
.hero-title { color: var(--primary-color); font-size: 1.75rem; margin-bottom: 0.75rem; font-weight: 700; }
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-bottom: 2rem; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}
.btn-primary { background-color: var(--primary-color); color: #fff; }
.btn-primary:hover { background-color: var(--primary-light); }
.btn-secondary { background-color: #e9ecef; color: var(--text-main); }
.btn-accent { background-color: var(--accent-teal); color: #fff; }

.supporting-list { list-style: none; margin-top: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; color: var(--text-muted); }
.supporting-list li::before { content: "✓ "; color: var(--accent-teal); font-weight: bold; }

.form-group { margin-bottom: 1.25rem; text-align: left; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
.form-control { width: 100%; min-height: 48px; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: var(--radius-sm); font-size: 1rem; }
.form-control:focus { outline: none; border-color: var(--accent-teal); box-shadow: 0 0 0 3px rgba(23, 162, 184, 0.15); }

.checkbox-group { display: flex; gap: 0.75rem; align-items: flex-start; margin-bottom: 1rem; }
.checkbox-group input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; margin-top: 2px; }
.checkbox-group label { font-size: 0.875rem; color: var(--text-main); line-height: 1.4; }

.privacy-banner { background-color: var(--accent-teal-soft); border-left: 4px solid var(--accent-teal); padding: 1rem; border-radius: var(--radius-sm); font-size: 0.85rem; margin-bottom: 1.5rem; color: #0f5132; }

.progress-container { margin-bottom: 1.5rem; }
.progress-bar-bg { background-color: #e9ecef; height: 8px; border-radius: 4px; overflow: hidden; margin-bottom: 0.5rem; }
.progress-bar-fill { background-color: var(--accent-teal); height: 100%; width: 0%; transition: width 0.3s ease; }
.progress-text { display: flex; justify-content: space-between; font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }

.question-title { font-size: 1.2rem; font-weight: 600; color: var(--primary-color); margin-bottom: 1.5rem; }
.options-list { display: flex; flex-direction: column; gap: 0.75rem; }
.option-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    min-height: 48px;
    transition: all 0.2s;
}
.option-item:hover { background-color: #f1f5f9; }
.option-item.selected { border-color: var(--accent-teal); background-color: var(--accent-teal-soft); }
.option-item input { margin-right: 0.75rem; width: 18px; height: 18px; }

.button-group { display: flex; gap: 1rem; margin-top: 1.5rem; }

.error-message { color: var(--danger-color); font-size: 0.875rem; margin-top: 0.5rem; display: none; }

.result-card { border-top: 4px solid var(--primary-color); }
.score-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-weight: 700; font-size: 0.85rem; text-transform: uppercase; }
.badge-low, .badge-healthy { background-color: #d1e7dd; color: #0f5132; }
.badge-moderate { background-color: #fff3cd; color: #664d03; }
.badge-elevated { background-color: #f8d7da; color: #842029; }

.score-bar-bg { background-color: #e9ecef; height: 10px; border-radius: 5px; overflow: hidden; margin: 0.75rem 0; }
.score-bar-fill { height: 100%; width: 0%; border-radius: 5px; transition: width 0.5s ease-out; }

.overall-banner { text-align: center; padding: 1.5rem; background: var(--primary-color); color: white; border-radius: var(--radius-md); margin-bottom: 1.5rem; }
.overall-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }

.action-buttons { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1.5rem; }

.app-footer { background: var(--card-bg); border-top: 1px solid var(--border-color); padding: 1.5rem 1rem; text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: auto; }
.app-footer a { color: var(--text-muted); text-decoration: underline; }

.disclaimer-box { background-color: #f8f9fa; border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 1rem; font-size: 0.8rem; color: var(--text-muted); margin-top: 1.5rem; }