:root {
    --primary-color: #6c5ce7;
    --bg-color: #f8f9fa;
    --text-color: #2d3436;
    --tag-bg: #eef2ff;
    --tag-color: #5f27cd;
}
body { font-family: 'Pretendard', sans-serif; background-color: var(--bg-color); margin: 0; color: var(--text-color); }
button { font-family: 'Pretendard', sans-serif; cursor: pointer; }
.hidden { display: none !important; }

header { background: white; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: sticky; top: 0; z-index: 100; }
.logo { font-size: 20px; font-weight: 800; color: var(--primary-color); cursor: pointer; }
.lang-switch button { background: #eee; border: none; padding: 6px 12px; border-radius: 20px; font-size: 12px; font-weight: bold; color: #777; margin-left:5px;}
.lang-switch button.active { background: var(--primary-color); color: white; }

.container { max-width: 600px; margin: 0 auto; padding: 20px; min-height: 80vh; }

.hero-section { text-align: center; margin-bottom: 30px; margin-top: 20px; }
.hero-title { font-size: 32px; font-weight: 900; margin-bottom: 10px; color: var(--primary-color); letter-spacing: -1px; }
.hero-desc { color: #636e72; font-size: 16px; line-height: 1.5; }

.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }
.menu-card { background: white; padding: 25px 20px; border-radius: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.03); transition: 0.2s; cursor: pointer; text-align: center; border: 2px solid transparent; position: relative; overflow: hidden; }
.menu-card:hover { transform: translateY(-5px); border-color: var(--primary-color); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.card-icon { font-size: 36px; display: block; margin-bottom: 12px; }
.card-title { font-size: 16px; font-weight: 800; display: block; margin-bottom: 6px; color: #2d3436; word-break: keep-all;}
.card-desc { font-size: 12px; color: #999; line-height: 1.3; font-weight: 500; }
.new-badge { position: absolute; top: 10px; left: 10px; background: #ff7675; color: white; font-size: 10px; padding: 2px 6px; border-radius: 4px; font-weight: bold; }

.test-box { background: white; padding: 30px; border-radius: 24px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); text-align: center; margin-top: 20px;}
.test-page-title { font-size: 1.2rem; font-weight: 800; color: var(--primary-color); margin-top: 0; margin-bottom: 25px; word-break: keep-all; }

.progress-bar { width: 100%; height: 6px; background: #eee; border-radius: 10px; margin-bottom: 40px; overflow: hidden; }
.fill { height: 100%; background: var(--primary-color); width: 0%; transition: width 0.3s; }
#q-text { font-size: 22px; font-weight: 700; margin-bottom: 40px; word-break: keep-all; line-height: 1.4; }
.btn-answer { background: #f8f9fa; border: 2px solid #edf2f7; color: #333; width: 100%; padding: 20px; border-radius: 16px; margin: 8px 0; font-size: 16px; transition: 0.2s; font-weight: 600; text-align: left;}
.btn-answer:hover { background: #eef2ff; border-color: var(--primary-color); color: var(--primary-color); }

.result-box { background: #fff; border: 2px solid #f1f3f5; padding: 30px 20px; border-radius: 20px; margin: 30px 0 20px 0; }
.res-tags { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.tag { background: var(--tag-bg); color: var(--tag-color); padding: 5px 12px; border-radius: 15px; font-size: 13px; font-weight: bold; }
.match-box { background: linear-gradient(135deg, #fff0f6 0%, #fff5f7 100%); border: 2px dashed #fcc2d7; padding: 20px; border-radius: 15px; margin-bottom: 20px; color: #d6336c; }
.match-title { font-size: 14px; font-weight: bold; margin-bottom: 5px; color: #faa2c1; }
.match-mbti { font-size: 20px; font-weight: 900; }

.fortune-tabs { display: flex; gap: 10px; margin-bottom: 20px; }
.fortune-tab { flex: 1; padding: 12px; border: none; border-radius: 12px; background: #eee; color: #888; font-weight: bold; }
.fortune-tab.active { background: var(--primary-color); color: white; }
.fortune-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.fortune-btn { padding: 15px 5px; border: 1px solid #eee; background: white; border-radius: 10px; font-size: 14px; }
.fortune-btn:hover { border-color: var(--primary-color); color: var(--primary-color); font-weight: bold; }

.weather-box { background: linear-gradient(to right, #74ebd5, #ACB6E5); padding: 15px; border-radius: 15px; color: white; margin-bottom: 20px; display: flex; justify-content: space-between; align-items: center; box-shadow: 0 4px 15px rgba(116, 235, 213, 0.4); }
.weather-info { text-align: left; }
.weather-temp { font-size: 28px; font-weight: 900; }
.weather-desc { font-size: 14px; opacity: 0.9; }

.luck-row { margin-bottom: 15px; }
.luck-score { display: flex; align-items: center; }
.luck-label { width: 50px; font-weight: bold; text-align: left; font-size: 14px; }
.luck-bar-bg { flex: 1; height: 10px; background: #eee; border-radius: 5px; overflow: hidden; margin-left: 10px; }
.luck-bar-fill { height: 100%; background: #ffd700; width: 0%; transition: width 1s; }
.luck-text { font-size: 13px; color: #666; margin-top: 5px; margin-left: 60px; line-height: 1.4; word-break: keep-all; font-weight: 500; }

.recommend-box { background: #fff; border: 1px solid #eee; border-radius: 15px; padding: 20px; margin-bottom: 20px; text-align: left; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.03); cursor: pointer; transition: 0.2s; }
.recommend-box:hover { transform: translateY(-3px); border-color: var(--primary-color); }
.rec-img { width: 60px; height: 60px; background: #eee; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.rec-text h3 { margin: 0 0 5px 0; font-size: 14px; color: #333; }
.rec-text p { margin: 0; font-size: 12px; color: #888; }
.rec-badge { background: #ffeaa7; color: #d35400; padding: 2px 6px; border-radius: 4px; font-size: 10px; font-weight: bold; margin-bottom: 4px; display: inline-block; }

.btn-restart { background: var(--primary-color); color: white; border: none; padding: 18px; width: 100%; border-radius: 16px; font-size: 18px; font-weight: bold; margin-top: 10px; box-shadow: 0 4px 15px rgba(108, 92, 231, 0.3); }
.btn-home { background: white; color: #666; border: 2px solid #eee; padding: 15px; width: 100%; border-radius: 16px; font-size: 16px; font-weight: bold; margin-top: 10px; }
.share-box { display: flex; gap: 10px; margin-bottom: 30px; }
.btn-share { flex: 1; padding: 15px; border-radius: 12px; border: none; font-weight: bold; font-size: 14px; cursor: pointer; transition: 0.2s; }
.share-link { background: #2d3436; color: white; }

@media (max-width: 400px) { .menu-grid { grid-template-columns: 1fr; } }