:root {
    --primary: #2563EB; /* Blue 600 */
    --primary-hover: #1D4ED8;
    --secondary: #10B981; /* Emerald */
    --background: #F8FAFC; /* Slate 50 */
    --text-main: #0F172A; /* Slate 900 */
    --text-muted: #64748B; /* Slate 500 */
    --card-bg: #FFFFFF;
    --border-color: #E2E8F0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background-color: var(--background);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: hidden;
    position: relative;
    padding: 1rem;
}

.background-animation {
    display: none;
}

.container.glass {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 600px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

/* Screens */
.screen {
    display: none;
    animation: fadeIn 0.4s ease-out;
}
.screen.active {
    display: block;
}
.screen.hidden {
    display: none !important;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Typography */
h1 {
    font-size: 1.8rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--text-main);
    line-height: 1.3;
}
.subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}
.intro-box {
    background: #F1F5F9;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.intro-box p {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: var(--text-muted);
    font-size: 0.95rem;
}
.intro-box strong {
    color: var(--primary);
}

/* Buttons */
.primary-btn, .secondary-btn {
    width: 100%;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}
.primary-btn {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}
.primary-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
}
.primary-btn.outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    margin-top: 1rem;
    box-shadow: none;
}
.primary-btn.outline:hover {
    background: #EFF6FF;
}
.secondary-btn {
    background: #F1F5F9;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.secondary-btn:hover {
    background: #E2E8F0;
}

/* Assessment Elements */
.progress-bar {
    height: 8px;
    background: #E2E8F0;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 16.66%;
    transition: width 0.4s ease;
}
.dimension-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.dimension-header h2 {
    font-size: 1.3rem;
    color: var(--text-main);
    font-weight: 700;
}
.dimension-progress {
    background: #F1F5F9;
    color: var(--text-muted);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.dimension-desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

.question-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
}
.question-list::-webkit-scrollbar {
    width: 6px;
}
.question-list::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}
.question-item {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.q-text {
    font-size: 1rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    font-weight: 500;
}

/* Range Slider */
.range-container {
    padding: 0.5rem 0;
}
.score-display {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1rem;
}
.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #E2E8F0;
    outline: none;
}
.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.1s, border-color 0.2s;
}
.range-slider.unanswered::-webkit-slider-thumb {
    border: 3px solid #CBD5E1; /* Gray border for unanswered */
    background: #F8FAFC;
    box-shadow: none;
}
.range-slider::-webkit-slider-thumb:active {
    transform: scale(1.1);
}
.range-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}
.nav-buttons {
    display: flex;
    gap: 1rem;
}

/* Result Screen */
.score-card {
    text-align: center;
    margin-bottom: 1.5rem;
}
.total-score {
    margin-bottom: 0.5rem;
}
.score-number {
    font-size: 4rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.score-unit {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-left: 0.2rem;
}
.level-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1rem;
}

.radar-container {
    background: #F8FAFC;
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
    height: 320px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.diagnosis-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}
.diagnosis-item {
    background: #FFFFFF;
    border-left: 4px solid #EF4444; 
    padding: 1.2rem;
    border-radius: 0 8px 8px 0;
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02);
}
.diagnosis-item h3 {
    font-size: 1.05rem;
    color: #EF4444;
    margin-bottom: 0.5rem;
}
.diagnosis-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-main);
}

@media (max-width: 480px) {
    .container.glass {
        padding: 1.5rem;
        border-radius: 16px;
        border: none;
        box-shadow: none;
    }
    body {
        background-color: var(--card-bg);
        padding: 0;
    }
}
