/* --- CSS Variables --- */
:root {
  --text: #ffffff;
  --bg: #121212;
  --primary: #6e6eff;
  --primary-hover: #5a5aff;
  --bg-soft: #1e1e1e;
  --line: #3a3a3c;
  --muted: #8d8d93;
  --radius: 10px;
}

.light-mode {
  --text: #1d1d1f;
  --bg: #f5f5f7;
  --primary: #0066cc;
  --primary-hover: #005bb5;
  --bg-soft: #ffffff;
  --line: #d2d2d7;
  --muted: #6e6e73;
}

/* --- Base & Reset --- */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", sans-serif;
  background-color: var(--bg);
  color: var(--text);
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  transition: background-color 0.3s, color 0.3s;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.hidden { display: none; }

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

.btn-primary:hover { background-color: var(--primary-hover); transform: translateY(-2px); }

.btn-secondary {
  background-color: var(--bg-soft);
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-secondary:hover { background-color: var(--line); }

.btn-util {
    background: none;
    border: none;
    color: var(--muted);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius);
}
.btn-util:hover { color: var(--text); background-color: var(--bg-soft); }

/* --- Header --- */
.site-header {
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
  background-color: rgba(18, 18, 18, 0.8);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.light-mode .site-header { background-color: rgba(245, 245, 247, 0.8); }

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav a {
  color: var(--muted);
  margin: 0 12px;
  font-weight: 500;
}
.nav a:hover, .nav a.active { color: var(--text); }

/* --- Hero Section --- */
.hero { padding: 80px 0; }
.hero-inner { display: flex; justify-content: space-between; align-items: center; gap: 40px; }
.hero-copy { max-width: 580px; }
.eyebrow { color: var(--primary); font-weight: 700; letter-spacing: 1.5px; }
.hero h1 { font-size: 48px; line-height: 1.2; margin: 12px 0; font-weight: 800; }
.hero-desc { font-size: 18px; color: var(--muted); max-width: 500px; }
.hero-cta { margin-top: 32px; }

.hero-card {
  width: 380px;
  height: 380px;
  background: linear-gradient(135deg, var(--bg-soft), #3a3a3c80);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.light-mode .hero-card { background: linear-gradient(135deg, var(--bg-soft), #e0e0e0); }

.saju-preview { font-family: serif; font-size: 28px; text-align: center; line-height: 1.3; color: var(--muted); font-weight: 500; display: flex; gap: 20px; }
.saju-preview span:nth-child(2) { color: var(--text); font-weight: 600; }

/* --- Form Section --- */
.section { padding: 80px 0; border-top: 1px solid var(--line); }
main > .section:first-child { border-top: none; }
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: 36px; margin: 0 0 8px 0; font-weight: 700; }
.section-head p { font-size: 18px; color: var(--muted); max-width: 600px; margin: 0 auto; }

.form-grid-simplified { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 800px; margin: 0 auto; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-weight: 500; margin-bottom: 8px; color: var(--muted); }
.form-group input { padding: 12px; background-color: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); font-size: 16px; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: center; gap: 16px; margin-top: 20px; }

/* --- Result Section --- */
.result-section { border-top: 2px solid var(--primary); }
.result-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 32px; }
.result-top h2 { font-size: 32px; margin: 0 0 8px; }

.summary-box {
    background-color: var(--bg-soft);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--line);
    margin-bottom: 32px;
}

.saju-palja {
    display: flex;
    justify-content: space-around;
    background-color: var(--bg);
    padding: 20px;
    border-radius: var(--radius);
    font-family: serif;
    font-size: 24px; text-align: center; line-height: 1.3; color: var(--muted);
}
.saju-palja span { font-weight: 500; }
.saju-palja span small { font-size: 14px; color: var(--primary); font-family: sans-serif; }
.saju-palja span:nth-child(2) { color: var(--text); font-weight: 600; }
.ilgan-summary { text-align: center; margin-top: 1rem; font-size: 18px; }

/* --- Dashboard & Detail --- */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 32px; }
.dashboard-card { background-color: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.badge { background-color: var(--primary); color: #ffffff; padding: 4px 8px; border-radius: 5px; font-size: 12px; font-weight: 600; align-self: flex-start; }
.dashboard-card h3 { margin: 16px 0 8px; font-size: 22px; }
.score-row { display: flex; align-items: baseline; margin-bottom: 12px; }
.score { font-size: 40px; font-weight: 700; color: var(--primary); }
.card-summary { flex-grow: 1; color: var(--muted); font-size: 15px; }
.card-actions button { width: 100%; padding: 10px; background-color: var(--line); color: var(--text); border: none; border-radius: var(--radius); cursor: pointer; font-weight: 600; }
.card-actions button:hover { background-color: #4a4a4c; }
.light-mode .card-actions button:hover { background-color: #e0e0e0; }

.detail-panel { background-color: var(--bg-soft); border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); }
.detail-panel h3 { margin-top: 0; }
.detail-content { color: var(--muted); }
.detail-content p strong { color: var(--text); }

/* --- FAQ Section --- */
.faq-list { max-width: 800px; margin: 0 auto; }
.faq-list details { background-color: var(--bg-soft); border-radius: var(--radius); margin-bottom: 12px; border: 1px solid var(--line); }
.faq-list summary { padding: 16px; font-weight: 600; cursor: pointer; font-size: 18px; }
.faq-list p { padding: 0 16px 16px; margin: 0; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

/* --- Static Content Page --- */
.content-page {
  max-width: 800px;
  background-color: var(--bg-soft);
  border: 1px solid var(--line);
  padding: 30px 40px;
  border-radius: var(--radius);
  margin: 0 auto;
}

.content-page h1 {
  font-size: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.content-page h2 {
  font-size: 24px;
  color: var(--primary);
  margin-top: 40px;
  margin-bottom: 16px;
  border-left: 4px solid var(--primary);
  padding-left: 12px;
}

.content-page p, .content-page li {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.content-page ul {
  padding-left: 24px;
  list-style-type: '✓ ';
}

.content-page li { padding-left: 8px; margin-bottom: 8px; }
.content-page a { font-weight: 600; }

/* --- Footer --- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0; color: var(--muted); font-size: 14px; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-nav a { color: var(--muted); margin-left: 24px; }
.footer-nav a:hover { color: var(--text); }

/* --- Responsive --- */
@media (max-width: 768px) {
    .hero-inner { flex-direction: column; text-align: center; }
    .hero-cta { justify-content: center; }
    .form-grid-simplified { grid-template-columns: 1fr; }
    .result-top, .footer-inner { flex-direction: column; align-items: center; text-align: center; gap: 16px; }
    .saju-palja { font-size: 20px; }
    .content-page { padding: 20px; }
}
