:root {
    --bg-color: #EDE8D0;
    --text-color: #1E1E1E;
}

/* Enable class-based dark mode */
html.dark {
    --bg-color: #1E1E1E;
    --text-color: #EDE8D0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Nanum Myeongjo', serif;
    transition: background-color 0.5s ease, color 0.5s ease;
}

.serif-en { font-family: 'Playfair Display', serif; }

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(10px); }
    30% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

.intro-animation { animation: fadeInOut 3.5s forwards; }

.glass-box {
    background: rgba(30, 30, 30, 0.03);
    border: 1px solid rgba(30, 30, 30, 0.06);
    backdrop-filter: blur(10px);
    transition: background-color 0.5s ease, border-color 0.5s ease;
}

html.dark .glass-box {
    background: rgba(237, 232, 208, 0.03);
    border: 1px solid rgba(237, 232, 208, 0.06);
}

.btn-option {
    border: 1px solid rgba(30, 30, 30, 0.12);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

html.dark .btn-option { border-color: rgba(237, 232, 208, 0.15); }

.btn-option:hover {
    background: rgba(30, 30, 30, 0.05);
    transform: translateY(-1px);
}

html.dark .btn-option:hover { background: rgba(237, 232, 208, 0.05); }

.btn-option.selected {
    background: var(--text-color);
    color: var(--bg-color);
    border-color: var(--text-color);
}

/* Theme-aware primary buttons */
.btn-primary {
    background-color: var(--text-color);
    color: var(--bg-color);
    border: 1px solid var(--text-color);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px rgba(0,0,0,0.3);
}

.progress-fill {
    height: 100%;
    background: var(--text-color);
    width: 0%;
    transition: width 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.step-container { display: none; }
.step-container.active { display: block; animation: stepFade 0.6s forwards; }

@keyframes stepFade {
    from { opacity: 0; transform: scale(0.98); }
    to { opacity: 1; transform: scale(1); }
}
