:root {
    --bg-color: #fff4f7;
    --container-bg: #ffffff;
    --text-color: #2d3436;
    --text-muted: #636e72;
    --accent-primary: #ff7675;
    --accent-secondary: #fab1a0;
    --accent-blue: #74b9ff;
    --border-color: #f1f2f6;
    --shadow: 0 15px 35px rgba(255, 118, 117, 0.1);
}

body.light-mode {
    --bg-color: #1e272e;
    --container-bg: #2d3436;
    --text-color: #f1f2f6;
    --text-muted: #a4b0be;
}

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

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Noto Sans KR', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    overflow-x: hidden;
}

/* 배경 블롭 (모바일에서는 시야 방해를 위해 투명도 낮춤) */
.background-blobs {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    filter: blur(100px);
    opacity: 0.3;
}
.blob { position: absolute; width: 300px; height: 300px; border-radius: 50%; }
.blob1 { background: var(--accent-secondary); top: -5%; left: -5%; }
.blob2 { background: var(--accent-blue); bottom: -5%; right: -5%; }

/* --- Mobile Mode Override --- */
body.mobile-mode {
    padding: 0.5rem !important;
}
body.mobile-mode .container {
    border-radius: 1.5rem !important;
    padding: 2rem 1rem !important;
}

/* --- Main Container (Strict 1-Column) --- */
.container {
    width: 100%;
    max-width: 500px;
    background: var(--container-bg);
    border-radius: 2rem;
    padding: 2.5rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
    z-index: 10;
}

/* --- Header Section (Vertical Stack) --- */
.header { text-align: center; }
.main-title {
    font-family: 'Gaegu', cursive;
    font-size: 2.4rem;
    color: var(--accent-primary);
    line-height: 1.2;
    margin: 1rem 0;
}
.main-subtitle { font-size: 1rem; color: var(--text-muted); line-height: 1.5; }

.guide-box {
    background: #fff8f9;
    padding: 1rem;
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    text-align: left;
}
body.light-mode .guide-box { background: rgba(0,0,0,0.2); }

/* --- Buttons (Always Full Width & Vertical) --- */
.gender-choice { display: flex; flex-direction: column; gap: 1rem; }
.choice-column { display: flex; flex-direction: column; gap: 0.8rem; }

.choice-btn {
    width: 100%;
    padding: 1.2rem;
    border-radius: 1.2rem;
    border: 2px solid var(--border-color);
    background: #fff;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}
body.light-mode .choice-btn { background: #3d4451; color: #fff; }

.choice-btn:hover { border-color: var(--accent-primary); transform: scale(1.02); }
.choice-btn .emoji { font-size: 2rem; }
.choice-btn strong { font-size: 1.1rem; }

/* --- Quiz Progress --- */
.progress-bar { width: 100%; height: 8px; background: #eee; border-radius: 10px; margin-top: 1rem; }
.progress-fill { height: 100%; background: var(--accent-primary); border-radius: 10px; width: 0%; transition: width 0.3s; }

.question-title { font-size: 1.3rem; font-weight: 700; text-align: center; margin-bottom: 2rem; }
.bubble-answers-column { display: flex; flex-direction: column; gap: 0.8rem; }

.answer-btn {
    width: 100%;
    padding: 1.1rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    background: #fff;
    font-size: 1rem;
    color: var(--text-color);
    cursor: pointer;
    text-align: left;
}
body.light-mode .answer-btn { background: #3d4451; color: #fff; }
.answer-btn:hover { background: #fff0f3; border-color: var(--accent-primary); color: var(--accent-primary); }

/* --- Result Screen --- */
.res-title { font-family: 'Gaegu', cursive; font-size: 2.2rem; color: var(--accent-primary); margin-bottom: 0.5rem; text-align: center; }
.res-desc { 
    background: #fdf2f5; 
    padding: 1.2rem; 
    border-radius: 1rem; 
    line-height: 1.6; 
    font-size: 0.95rem; 
    margin: 1rem 0;
}
body.light-mode .res-desc { background: rgba(0,0,0,0.2); }

.retry-bubble {
    width: 100%;
    padding: 1rem;
    background: var(--accent-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
}

/* --- Footer (Purely Vertical Stack) --- */
.cute-footer {
    width: 100%;
    max-width: 500px;
    padding: 3rem 0;
    display: flex;
    flex-direction: column; /* 무조건 수직 */
    align-items: center;
    gap: 1rem; /* 요소 간 간격 */
    text-align: center;
}

.footer-links {
    display: flex;
    flex-direction: column; /* 링크들도 세로로 */
    gap: 0.8rem;
    width: 100%;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.5rem;
}
.sep { display: none; } /* 세로 배치이므로 구분선 제거 */

.cute-footer p { font-size: 0.8rem; color: var(--text-muted); opacity: 0.5; }

/* --- Controls & Utilities --- */
.view-mode-toggle {
    position: fixed;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 1000;
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 50px;
    border: 1px solid var(--accent-primary);
    background: #fff;
    color: var(--accent-primary);
    font-weight: 700;
}

.controls-overlay { position: fixed; bottom: 1rem; left: 1rem; z-index: 1000; }
.theme-toggle-btn { padding: 0.6rem; border-radius: 50%; border: none; background: #fff; box-shadow: var(--shadow); cursor: pointer; }
.theme-toggle-btn svg { width: 20px; height: 20px; fill: var(--accent-primary); }

.hidden { display: none !important; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.screen-container { animation: fadeIn 0.4s ease-out; }
