:root {
  --toss-blue: #0050FF;
  --toss-blue-light: #E8F0FE;
  --toss-gray-100: #F2F4F6;
  --toss-gray-200: #E5E8EB;
  --toss-gray-600: #4E5968;
  --toss-gray-700: #333D4B;
  --toss-gray-800: #191F28;
  --white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
  line-height: 1.5;
  color: var(--toss-gray-800);
  background-color: var(--toss-gray-100);
  overflow-x: hidden;
}

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

/* Page Switching */
.page {
  display: none;
  padding: 40px 0 100px;
  animation: fadeIn 0.4s ease-in-out;
}

.page.active {
  display: block;
}

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

/* Header */
header {
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--toss-gray-200);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo a {
  font-size: 20px;
  font-weight: 700;
  color: var(--toss-gray-800);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 24px;
}

.nav-menu a {
  text-decoration: none;
  color: var(--toss-gray-600);
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--toss-gray-800);
}

/* Chat Section (Toss Style) */
.chat-wrapper {
  background: var(--white);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  min-height: 500px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--toss-gray-200);
  margin-top: 20px;
}

.chat-header {
  padding: 24px;
  border-bottom: 1px solid var(--toss-gray-100);
}

.chat-header h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--toss-gray-800);
}

.chat-header p {
  font-size: 14px;
  color: var(--toss-gray-600);
  margin-top: 4px;
}

.chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message { max-width: 85%; }
.message.bot { align-self: flex-start; }
.message.user { align-self: flex-end; }

.bubble {
  padding: 14px 20px;
  border-radius: 20px;
  font-size: 16px;
  font-weight: 500;
}

.bot .bubble {
  background-color: var(--toss-gray-100);
  color: var(--toss-gray-800);
  border-top-left-radius: 4px;
}

.user .bubble {
  background-color: var(--toss-blue);
  color: var(--white);
  border-top-right-radius: 4px;
}

.chat-input-area {
  padding: 20px 24px;
  background: var(--white);
  display: flex;
  gap: 12px;
}

.chat-input-area input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background-color: var(--toss-gray-100);
  border-radius: 14px;
  outline: none;
  font-size: 16px;
  font-family: inherit;
}

.chat-input-area input::placeholder { color: var(--toss-gray-600); }

.btn {
  padding: 14px 24px;
  border-radius: 14px;
  border: none;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
  font-family: inherit;
}

.btn.primary {
  background-color: var(--toss-blue);
  color: var(--white);
}

.btn.primary:hover { opacity: 0.9; }

.quick-chips {
  padding: 0 24px 24px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}
.quick-chips::-webkit-scrollbar { display: none; }

.chip {
  padding: 10px 18px;
  border-radius: 20px;
  background-color: var(--toss-blue-light);
  color: var(--toss-blue);
  border: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

/* Toss Style Cards (Study, Calc, FAQ) */
.section-title {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 32px;
  color: var(--toss-gray-800);
  letter-spacing: -0.5px;
  text-align: center;
}

.guide-card, .ref-item, .calc-box, .faq-list details {
  background: var(--white);
  border-radius: 24px;
  padding: 28px;
  border: none;
  margin-bottom: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* Content Roadmap Styles */
.card-tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--toss-blue-light);
  color: var(--toss-blue);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 15px;
}

.card-tag.warning {
  background-color: #FFF0F0;
  color: #FF4D4F;
}

.guide-card.border-warning {
  border: 1px solid #FFEBEB;
}

.content-list {
  list-style: none;
  margin-top: 15px;
}

.content-list li {
  font-size: 14px;
  color: var(--toss-gray-600);
  margin-bottom: 8px;
}

.info-box {
  background-color: #F8F9FA;
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--toss-gray-200);
}

.section-header {
  margin-bottom: 30px;
  text-align: left;
}

.section-header h3 {
  font-size: 24px;
  font-weight: 700;
}

.section-header p {
  color: var(--toss-gray-600);
  margin-top: 5px;
}

.mt-30 { margin-top: 30px; }
.mt-50 { margin-top: 50px; }

.guide-card h4 { font-size: 18px; margin-bottom: 10px; color: var(--toss-gray-800); }
.guide-card p { font-size: 15px; color: var(--toss-gray-600); }

.input-group { margin-bottom: 20px; }
.input-group label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--toss-gray-600); }
.input-group input {
  width: 100%;
  padding: 16px;
  background-color: var(--toss-gray-100);
  border: none;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 500;
}

.result-box {
  margin-top: 24px;
  background-color: var(--toss-blue-light);
  border-radius: 18px;
  padding: 24px;
}

.faq-list summary { font-size: 17px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-list summary::after { content: '↓'; color: var(--toss-gray-600); transition: 0.3s; }
details[open] summary::after { transform: rotate(180deg); }

footer { padding: 60px 0; background-color: var(--white); border-top: 1px solid var(--toss-gray-200); text-align: left; }
footer .logo { margin-bottom: 12px; }
footer p { font-size: 13px; color: var(--toss-gray-600); }

@media (max-width: 768px) {
  .nav-menu { display: none; } /* 모바일은 나중에 햄버거 메뉴 추가 가능 */
  .chat-wrapper { height: calc(100vh - 120px); border-radius: 0; margin-top: 0; border: none; }
  .bubble { font-size: 15px; }
}
