:root {
    --bg-color: #FAF7F2;
    --primary-color: #D4A373;
    --accent-color: #BC8F8F;
    --text-main: #3D3D3D;
    --text-light: #666666;
    --card-bg: rgba(255, 255, 255, 0.7);
    --transition-soft: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans KR', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.result-title,
.sub-badge {
    font-family: 'Noto Serif KR', serif;
}

.app-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(circle at top right, #fff5f5 0%, transparent 40%),
        radial-gradient(circle at bottom left, #f3ece4 0%, transparent 40%);
}

.section {
    display: none;
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.section.active {
    display: block;
}

/* ---------------- Hero ---------------- */
.sub-badge {
    display: inline-block;
    padding: 6px 16px;
    background-color: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 50px;
    font-size: 14px;
    color: var(--primary-color);
    margin-bottom: 24px;
    font-weight: 500;
}

.main-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-main);
    word-break: keep-all;
}

.description {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 40px;
    word-break: keep-all;
}

/* ---------------- Card Container ---------------- */
.test-container, .result-container {
    background: #fff;
    padding: 40px 30px;
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.05);
}

.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    width: 0%;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
    transition: width 0.3s ease;
    margin-bottom: 8px;
}

#progress-text {
    font-size: 12px;
    color: var(--text-light);
}

.question-card {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.q-number {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 18px;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.5rem;
    margin-bottom: 40px;
    word-break: keep-all;
    font-weight: 500;
}

/* ---------------- Button Styles ---------------- */
.btn-primary,
.btn-option,
.btn-cta,
.btn-retry {
    cursor: pointer;
    border: none;
    border-radius: 15px;
    font-size: 1.1rem;
    font-weight: 500;
    transition: var(--transition-soft);
}

.btn-primary {
    padding: 16px 48px;
    background-color: var(--text-main);
    color: #fff;
}

.btn-primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-option {
    padding: 20px;
    background-color: #fff;
    color: var(--text-main);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    text-align: left;
    line-height: 1.5;
    word-break: keep-all;
}

.btn-option:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* ---------------- Email Form ---------------- */
.email-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.email-input {
    padding: 18px;
    border: 2px solid #f3ece4;
    border-radius: 15px;
    font-size: 1.05rem;
    outline: none;
    transition: var(--transition-soft);
    text-align: center;
}

.email-input:focus {
    border-color: var(--accent-color);
    background-color: #fff;
}

.consent-group {
    text-align: left;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.consent-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    cursor: pointer;
}

.btn-detail {
    background: none;
    border: none;
    color: var(--text-light);
    text-decoration: underline;
    font-size: 0.8rem;
    cursor: pointer;
    margin-left: 4px;
}

/* ---------------- Result ---------------- */
.result-container {
    padding: 50px 30px;
}

.gauge-container {
    position: relative;
    width: 200px;
    margin: 0 auto 30px;
}

.prob-label {
    text-align: center;
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.1rem;
    margin-top: -10px;
    margin-bottom: 30px;
}

.probability-text {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.result-type-name {
    font-size: 1.8rem;
    margin-bottom: 25px;
    color: var(--accent-color);
    line-height: 1.3;
}

.result-description {
    color: var(--text-main);
    text-align: left;
    font-size: 1.05rem;
    margin-bottom: 40px;
    line-height: 1.8;
}

.divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 40px 0;
}

.cta-box {
    background-color: #FAF7F2;
    padding: 30px 20px;
    border-radius: 20px;
    border: 1px dashed var(--accent-color);
    margin-bottom: 30px;
}

.cta-msg {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.btn-cta {
    display: inline-block;
    padding: 18px;
    background-color: var(--accent-color);
    color: #fff;
    text-decoration: none;
    width: 100%;
    border-radius: 15px;
    font-weight: bold;
    box-shadow: 0 10px 20px rgba(188, 143, 143, 0.2);
}

.btn-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(188, 143, 143, 0.3);
}

.btn-retry {
    padding: 10px 20px;
    background: none;
    color: var(--text-light);
    font-size: 0.9rem;
    text-decoration: underline;
}

.btn-share {
    width: 100%;
    padding: 14px;
    margin-bottom: 20px;
    background: #fff;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 15px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-soft);
}

.btn-share:hover {
    background: var(--accent-color);
    color: #fff;
}

/* ---------------- Modal ---------------- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 25px;
    width: 100%;
    max-width: 500px;
}

.modal-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.modal-body-text {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 25px;
    white-space: pre-line;
    text-align: left;
}

/* ---------------- Animations ---------------- */
.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

.back-link {
    display: block;
    width: 100%;
    max-width: 600px;
    margin: 0 auto 16px;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-light);
    text-decoration: none;
}

.back-link:hover {
    color: var(--text-main);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3ece4;
    border-top: 5px solid var(--accent-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.gauge-stroke {
    transition: stroke-dashoffset 2s ease-out;
}

@media (max-width: 480px) {
    .main-title { font-size: 2rem; }
    .question-text { font-size: 1.3rem; }
}
.actions-box {
    background-color: #FAF7F2;
    border-radius: 16px;
    padding: 20px 22px;
    margin: 26px 0 0;
}

.actions-title {
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1rem;
}

.actions-box ol {
    margin: 0;
    padding-left: 20px;
}

.actions-box li {
    margin-bottom: 9px;
    line-height: 1.7;
}

.actions-box li:last-child {
    margin-bottom: 0;
}
