/* ==========================================================================
   Bond Quest - Premium Dark Financial Theme & Glassmorphism System
   ========================================================================== */

/* 1. 디자인 시스템 토큰 정의 (CSS 변수) */
:root {
  --font-main: 'Outfit', 'Inter', -apple-system, sans-serif;
  --font-mono: 'Orbitron', monospace;

  /* Harmonious Color Palette */
  --bg-primary: #070a13;
  --bg-secondary: #0d1325;
  --bg-glass: rgba(13, 22, 44, 0.65);
  --bg-glass-hover: rgba(20, 32, 64, 0.8);
  --border-glass: rgba(255, 255, 255, 0.07);
  --border-glass-active: rgba(0, 210, 255, 0.3);

  /* Neon Glow Accent Colors */
  --neon-blue: #00d2ff;
  --neon-blue-glow: rgba(0, 210, 255, 0.35);
  --neon-green: #00f2fe; /* cyan-green mix */
  --emerald: #10b981;
  --emerald-glow: rgba(16, 185, 129, 0.3);
  --neon-red: #ff3366;
  --neon-red-glow: rgba(255, 51, 102, 0.3);
  --neon-amber: #f59e0b;
  --neon-amber-glow: rgba(245, 158, 11, 0.3);
  --purple: #8b5cf6;

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Shadows */
  --shadow-neon: 0 0 15px var(--neon-blue-glow);
  --shadow-emerald: 0 0 15px var(--emerald-glow);
  --shadow-red: 0 0 15px var(--neon-red-glow);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 2. 초기 리셋 및 글로벌 스타일 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* 스크롤바 커스텀 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 210, 255, 0.3);
}

/* 3. 백그라운드 오로라 이펙트 */
.aurora-bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.12;
  mix-blend-mode: screen;
  animation: float-aurora 25s infinite alternate ease-in-out;
}

.aurora-1 {
  top: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
}

.aurora-2 {
  bottom: -10%;
  right: -10%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, var(--purple) 0%, transparent 70%);
  animation-duration: 35s;
  animation-delay: -5s;
}

.aurora-3 {
  top: 40%;
  left: 30%;
  width: 45vw;
  height: 45vw;
  background: radial-gradient(circle, var(--emerald) 0%, transparent 70%);
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes float-aurora {
  0% { transform: translate(0, 0) scale(1) rotate(0deg); }
  50% { transform: translate(5%, 8%) scale(1.1) rotate(180deg); }
  100% { transform: translate(-5%, -5%) scale(0.9) rotate(360deg); }
}

/* 4. 헤더 레이아웃 */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 19, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glass);
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.25rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.logo-icon {
  font-size: 2.25rem;
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue-glow);
}

.logo-text {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 900;
  letter-spacing: 2px;
}

.accent-text {
  color: var(--neon-blue);
  text-shadow: 0 0 12px var(--neon-blue-glow);
}

.main-nav {
  display: flex;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.35rem;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1.25rem;
  border-radius: 20px;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.nav-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-btn.active {
  color: var(--bg-primary);
  background: var(--neon-blue);
  font-weight: 600;
  box-shadow: var(--shadow-neon);
}

.header-status {
  display: flex;
  align-items: center;
}

.user-rank-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 30px;
  color: #c084fc;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-icon {
  font-size: 1.15rem;
}

/* 5. 메인 레이아웃 및 뼈대 */
.app-content-container {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
}

.app-footer {
  border-top: 1px solid var(--border-glass);
  background: rgba(7, 10, 19, 0.6);
  backdrop-filter: blur(10px);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  text-align: center;
}

.copyright {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

/* 6. 공통 컴포넌트: Glass Card */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 2rem;
  transition: var(--transition-smooth);
}

.glass-card.hoverable:hover {
  transform: translateY(-4px);
  background: var(--bg-glass-hover);
  border-color: var(--border-glass-active);
  box-shadow: 0 10px 30px rgba(0, 210, 255, 0.08);
}

.glow-blue {
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.15);
}

/* 로더 애니메이션 */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: auto;
  gap: 1.5rem;
  min-height: 400px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(0, 210, 255, 0.1);
  border-top: 3px solid var(--neon-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: var(--shadow-neon);
}

.loader-text {
  color: var(--text-secondary);
  font-size: 1rem;
  font-family: var(--font-mono);
  letter-spacing: 1px;
}

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

/* 7. 공통 UI 요소: 타이틀, 버튼, 태그 */
h1, h2, h3, h4 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--text-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 2rem;
}

/* 공통 버튼 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  transition: var(--transition-smooth);
  text-decoration: none;
}

.btn-primary {
  background: var(--neon-blue);
  color: var(--bg-primary);
  box-shadow: var(--shadow-neon);
}

.btn-primary:hover {
  background: #00b8e6;
  box-shadow: 0 0 25px rgba(0, 210, 255, 0.6);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: var(--emerald);
  color: var(--bg-primary);
  box-shadow: var(--shadow-emerald);
}

.btn-success:hover {
  background: #0ea672;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.6);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--neon-red);
  color: var(--text-primary);
  box-shadow: var(--shadow-red);
}

.btn-danger:hover {
  background: #e62254;
  box-shadow: 0 0 25px rgba(255, 51, 102, 0.6);
  transform: translateY(-2px);
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* 태그 및 등급 */
.tag {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.tag-blue { background: rgba(0, 210, 255, 0.15); color: var(--neon-blue); border: 1px solid rgba(0, 210, 255, 0.3); }
.tag-green { background: rgba(16, 185, 129, 0.15); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-red { background: rgba(255, 51, 102, 0.15); color: var(--neon-red); border: 1px solid rgba(255, 51, 102, 0.3); }
.tag-amber { background: rgba(245, 158, 11, 0.15); color: var(--neon-amber); border: 1px solid rgba(245, 158, 11, 0.3); }

/* ==========================================================================
   8. [Home] 대시보드 뷰 스타일링
   ========================================================================== */
.home-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
}

.hero-card {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, rgba(13, 22, 44, 0.8) 0%, rgba(26, 15, 46, 0.8) 100%);
  border: 1px solid rgba(0, 210, 255, 0.15);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-info {
  max-width: 60%;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: 2.75rem;
  margin-bottom: 0.75rem;
  line-height: 1.1;
}

.hero-desc {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.hero-artwork {
  font-size: 8rem;
  color: rgba(0, 210, 255, 0.1);
  position: absolute;
  right: 5%;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  animation: pulse-logo 4s infinite alternate ease-in-out;
}

@keyframes pulse-logo {
  0% { transform: translateY(-50%) scale(1); opacity: 0.1; }
  100% { transform: translateY(-47%) scale(1.05); opacity: 0.2; }
}

.dashboard-steps {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.step-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
}

.step-number {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.05);
  min-width: 40px;
}

.step-details {
  flex: 1;
}

.step-details h3 {
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.step-details p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.step-status {
  display: flex;
  align-items: center;
}

/* 오늘의 채권 퀴즈 카드 */
.quiz-widget {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.quiz-question-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 1.25rem;
  border-radius: 12px;
}

.quiz-question {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.quiz-answers {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition-smooth);
}

.quiz-option-btn:hover {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.3);
}

.quiz-option-btn.correct {
  background: rgba(16, 185, 129, 0.2);
  border-color: var(--emerald);
  color: var(--emerald);
  font-weight: 600;
}

.quiz-option-btn.incorrect {
  background: rgba(255, 51, 102, 0.2);
  border-color: var(--neon-red);
  color: var(--neon-red);
}

.score-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.score-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.score-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.score-value {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
}

.score-value.up {
  color: var(--emerald);
}

.score-value.down {
  color: var(--neon-red);
}

.reset-progress-btn {
  width: 100%;
  margin-top: 1.25rem;
}

/* ==========================================================================
   9. [Story] 초보자 스토리 모드 스타일링
   ========================================================================== */
.story-container {
  max-width: 800px;
  margin: 0 auto;
  width: 100%;
}

.story-progress-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.story-progress-bar {
  flex: 1;
  height: 6px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
  margin: 0 1.5rem;
  position: relative;
  overflow: hidden;
}

.story-progress-fill {
  height: 100%;
  background: var(--neon-blue);
  box-shadow: var(--shadow-neon);
  width: 0%;
  transition: var(--transition-smooth);
}

.story-card-wrapper {
  perspective: 1000px;
  min-height: 650px;
}

.story-card {
  position: relative;
  width: 100%;
  min-height: 650px;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.story-card.flipped {
  transform: rotateY(180deg);
}

.story-front, .story-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.story-back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, rgba(13, 22, 44, 0.75) 0%, rgba(16, 32, 64, 0.85) 100%);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.story-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.story-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.scenario-bubble {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1.5rem;
  border-radius: 12px;
  border-left: 4px solid var(--neon-blue);
}

.scenario-text {
  font-size: 1.15rem;
  line-height: 1.7;
}

.concept-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.concept-table th, .concept-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.concept-table th {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}

.concept-table td {
  font-size: 0.95rem;
}

.story-actions {
  display: flex;
  gap: 1rem;
}

.card-inventory {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.inv-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  animation: slide-up 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   10. [Mission] 기초 미션 모드 스타일링
   ========================================================================== */
.mission-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

.mission-sidebar {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mission-nav-item {
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
  padding: 1.25rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: var(--transition-smooth);
  text-align: left;
  color: var(--text-secondary);
}

.mission-nav-item:hover:not(.locked) {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.mission-nav-item.active {
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.3);
  color: var(--text-primary);
  box-shadow: 0 0 15px rgba(0, 210, 255, 0.05);
}

.mission-nav-item.locked {
  opacity: 0.5;
  cursor: not-allowed;
}

.mission-icon-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.02);
}

.mission-nav-item.completed .mission-icon-box {
  background: rgba(16, 185, 129, 0.15);
  color: var(--emerald);
}

.mission-nav-item.active .mission-icon-box {
  color: var(--neon-blue);
}

.mission-nav-info h4 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.mission-nav-info p {
  font-size: 0.75rem;
}

/* 미션 세부 카드 */
.mission-card {
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mission-header-section {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 1.25rem;
  margin-bottom: 1.5rem;
}

.mission-title-area h2 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.mission-title-area p {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.mission-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* 상황 미션 박스 */
.mission-sim-box {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
  border-radius: 12px;
}

.financial-dashboard-view {
  background: #090e1a;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1.25rem;
  margin-top: 1rem;
}

.view-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.view-row:last-child {
  border: none;
}

.view-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.view-value {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.9rem;
}

.view-value.up { color: var(--emerald); }
.view-value.down { color: var(--neon-red); }

/* 피드백 박스 */
.feedback-box {
  padding: 1.25rem;
  border-radius: 10px;
  margin-top: 1rem;
  animation: slide-up 0.4s ease-out;
}

.feedback-box.correct {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--text-primary);
}

.feedback-box.incorrect {
  background: rgba(255, 51, 102, 0.12);
  border: 1px solid rgba(255, 51, 102, 0.25);
  color: var(--text-primary);
}

.feedback-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.feedback-desc {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* ==========================================================================
   11. [Simulator] 채권 가격/금리 실시간 시뮬레이터 스타일링
   ========================================================================== */
.simulator-layout {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 2.5rem;
}

.control-panel {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.control-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.control-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.control-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--neon-blue);
}

/* 커스텀 range input */
.slider-input {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  outline: none;
  transition: var(--transition-smooth);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--neon-blue);
  cursor: pointer;
  box-shadow: 0 0 10px var(--neon-blue-glow);
  transition: var(--transition-smooth);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: 0 0 15px var(--neon-blue);
}

.select-input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-glass);
  color: var(--text-primary);
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-family: var(--font-main);
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.select-input:focus {
  border-color: var(--neon-blue);
}

.select-input option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* 시뮬레이터 뷰보드 */
.sim-viewboard {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.dash-box {
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid rgba(255, 255, 255, 0.03);
  padding: 1.25rem;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dash-box-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

.dash-box-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
}

.dash-box-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.dash-box-change.up { color: var(--emerald); }
.dash-box-change.down { color: var(--neon-red); }

/* 시각 시뮬레이터 게이지 및 그래프 */
.graph-card {
  flex: 1;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.chart-container {
  width: 100%;
  height: 220px;
  position: relative;
  display: flex;
  align-items: flex-end;
  margin-top: 1rem;
}

/* SVG 라인 차트 스타일링 */
.svg-chart {
  width: 100%;
  height: 100%;
}

.chart-line {
  fill: none;
  stroke: var(--neon-blue);
  stroke-width: 3;
  filter: drop-shadow(0 0 5px var(--neon-blue-glow));
}

.chart-area {
  fill: url(#chart-gradient);
  opacity: 0.2;
}

.chart-grid {
  stroke: rgba(255, 255, 255, 0.04);
  stroke-width: 1;
}

.chart-axis {
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 1;
}

.chart-label {
  fill: var(--text-secondary);
  font-size: 10px;
  font-family: var(--font-main);
}

.chart-point {
  fill: var(--neon-blue);
  stroke: var(--text-primary);
  stroke-width: 2;
  r: 5;
  filter: drop-shadow(0 0 4px var(--neon-blue-glow));
}

.chart-point-label {
  fill: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

/* ==========================================================================
   12. [Challenge] 8라운드 채권 운용 트레이딩 게임 대시보드
   ========================================================================== */
.challenge-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.left-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.right-panel {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

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

.round-badge {
  background: linear-gradient(135deg, var(--purple) 0%, rgba(139, 92, 246, 0.4) 100%);
  color: var(--text-primary);
  padding: 0.5rem 1.25rem;
  border-radius: 20px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.1rem;
  border: 1px solid rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 15px rgba(139, 92, 246, 0.2);
}

/* 경제 뉴스 스크린 */
.news-screen {
  background: linear-gradient(to bottom, #0f152a 0%, #060914 100%);
  border: 1px solid rgba(245, 158, 11, 0.2);
  position: relative;
  overflow: hidden;
}

.news-screen::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--neon-amber);
  box-shadow: 0 0 10px var(--neon-amber);
  animation: scanning 3s infinite linear;
}

@keyframes scanning {
  0% { top: 0%; }
  100% { top: 100%; }
}

.news-ticker {
  display: inline-block;
  background: rgba(245, 158, 11, 0.1);
  color: var(--neon-amber);
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border: 1px solid rgba(245, 158, 11, 0.3);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 1px;
}

.news-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.news-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 게임 자산 현황판 */
.game-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.game-stat-box {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: 12px;
}

.game-stat-lbl {
  color: var(--text-secondary);
  font-size: 0.75rem;
  margin-bottom: 0.25rem;
}

.game-stat-val {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.15rem;
}

/* 채권 매매 테이블 */
.trade-table-container {
  overflow-x: auto;
}

.trade-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.trade-table th, .trade-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.trade-table th {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
}

.trade-table td {
  font-size: 0.875rem;
}

.trade-name-cell {
  font-weight: 600;
}

.trade-val-cell {
  font-family: var(--font-mono);
}

.trade-actions {
  display: flex;
  gap: 0.4rem;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  font-size: 1.15rem;
}

/* 포트폴리오 섹션 */
.portfolio-card {
  background: rgba(13, 19, 37, 0.5);
}

.portfolio-empty {
  padding: 2.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.scenario-picker {
  max-width: 980px;
  margin: 0 auto;
  width: 100%;
}

.scenario-deck-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.scenario-deck-card {
  min-height: 220px;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font: inherit;
  appearance: none;
}

.scenario-deck-card strong {
  font-size: 1.15rem;
  overflow-wrap: anywhere;
}

.scenario-deck-card span:not(.material-icons-round) {
  color: var(--text-secondary);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.scenario-deck-icon {
  color: var(--neon-blue);
  font-size: 2rem;
}

@media (max-width: 768px) {
  .scenario-deck-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   13. 최종 리포트 및 투자성향 분석 화면
   ========================================================================== */
.report-container {
  max-width: 1000px;
  margin: 0 auto;
  width: 100%;
}

.report-header {
  text-align: center;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 2rem;
}

.report-title {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.report-badge-container {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.25);
  padding: 0.75rem 1.75rem;
  border-radius: 30px;
}

.report-badge-text {
  font-weight: 700;
  font-size: 1.25rem;
  color: #c084fc;
}

.report-badge-icon {
  font-size: 1.75rem;
  color: #c084fc;
}

.report-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.score-radar-box {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 300px;
}

.report-analysis-box {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.analysis-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-primary);
}

.lessons-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.lesson-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 1rem;
  border-radius: 10px;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.lesson-item span {
  color: var(--neon-blue);
  margin-top: 0.15rem;
}

.report-actions {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

/* ==========================================================================
   14. [Study] 채권 학습 매뉴얼
   ========================================================================== */
.study-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.study-toc {
  position: sticky;
  top: 120px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.study-toc-heading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--neon-blue);
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 1px;
}

.study-toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.study-toc-link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: var(--transition-smooth);
  font-size: 0.9rem;
  line-height: 1.35;
}

.study-toc-link:hover {
  color: var(--text-primary);
  background: rgba(0, 210, 255, 0.08);
  border-color: rgba(0, 210, 255, 0.2);
}

.study-toc-link.active {
  color: var(--bg-primary);
  background: var(--neon-blue);
  border-color: rgba(0, 210, 255, 0.55);
  box-shadow: var(--shadow-neon);
  font-weight: 700;
}

.study-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-width: 0;
}

.study-hero {
  border-color: rgba(0, 210, 255, 0.18);
}

.study-hero h1 {
  font-size: 2.25rem;
  margin: 0.85rem 0 0.75rem;
}

.study-hero p,
.study-summary {
  color: var(--text-secondary);
  line-height: 1.75;
}

.study-section {
  scroll-margin-top: 120px;
}

.study-section h2 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.study-keypoints {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.25rem;
}

.study-keypoint {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.study-keypoint span {
  color: var(--emerald);
  font-size: 1.15rem;
  margin-top: 0.1rem;
}

.study-keypoint p {
  color: var(--text-primary);
  line-height: 1.55;
  font-size: 0.95rem;
}

.study-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.18);
}

.study-tip span {
  color: var(--neon-amber);
}

.study-tip p {
  color: var(--text-primary);
  line-height: 1.55;
  font-size: 0.95rem;
}

.glossary-section h2 {
  margin-bottom: 0.75rem;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.glossary-category {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 10px;
  padding: 1rem;
}

.glossary-category h3 {
  color: var(--neon-blue);
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.glossary-term-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.glossary-term {
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.glossary-term:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.glossary-term strong {
  display: block;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.glossary-term span {
  display: block;
  color: var(--neon-amber);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}

.glossary-term p {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.88rem;
}

/* ==========================================================================
   15. [Deck Challenge] 카드덱 채권 챌린지
   ========================================================================== */
.deck-game-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 2rem;
  align-items: start;
}

.deck-main,
.deck-side {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.deck-intro {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.deck-intro-hero {
  min-height: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  border-color: rgba(255, 51, 102, 0.2);
}

.deck-intro-hero .section-title {
  margin-top: 0.9rem;
}

.deck-intro-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.deck-rule-card {
  min-height: 190px;
}

.deck-rule-card > span {
  color: var(--neon-blue);
  font-size: 2rem;
  margin-bottom: 0.85rem;
}

.deck-rule-card h3 {
  margin-bottom: 0.6rem;
}

.deck-rule-card p,
.deck-flow-card span {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.92rem;
}

.deck-flow-card h3 {
  margin-bottom: 1rem;
}

.deck-flow-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.deck-flow-steps div {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.deck-flow-steps strong {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--neon-blue);
  color: var(--bg-primary);
  font-family: var(--font-mono);
}

.deck-header-card {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1.5rem;
}

.deck-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.deck-metrics .game-stat-lbl {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.deck-board {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 1.25rem;
}

.market-card h2 {
  font-size: 1.55rem;
  margin-bottom: 0.75rem;
}

.market-card p {
  color: var(--text-secondary);
  line-height: 1.6;
}

.deck-lesson {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.25rem;
  padding: 1rem;
  border-radius: 10px;
  background: rgba(0, 210, 255, 0.06);
  border: 1px solid rgba(0, 210, 255, 0.16);
  color: var(--text-primary);
  line-height: 1.5;
}

.deck-lesson span:first-child {
  color: var(--neon-blue);
}

.portfolio-deck-card h3,
.hand-card-area h3,
.deck-side h3 {
  margin-bottom: 0.9rem;
}

.portfolio-meter {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.8rem;
}

.portfolio-meter-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.portfolio-meter-row strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.portfolio-meter-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.portfolio-meter-track div {
  height: 100%;
  border-radius: inherit;
}

.deck-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.deck-section-title span {
  color: var(--neon-amber);
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.deck-hand {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 0.85rem;
}

.deck-player-card {
  min-height: 190px;
  text-align: left;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(20, 32, 64, 0.86), rgba(9, 14, 26, 0.92));
  color: var(--text-primary);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  transition: var(--transition-smooth);
  font-family: var(--font-main);
}

.deck-player-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 210, 255, 0.35);
  box-shadow: 0 14px 26px rgba(0, 0, 0, 0.28), var(--shadow-neon);
}

.deck-card-icon {
  color: var(--neon-blue);
  font-size: 1.9rem;
}

.deck-player-card strong {
  font-size: 1rem;
}

.deck-player-card small {
  color: var(--neon-amber);
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.deck-player-card p {
  color: var(--text-secondary);
  line-height: 1.45;
  font-size: 0.82rem;
}

.played-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.played-card-chip {
  border: 1px solid rgba(0, 210, 255, 0.18);
  background: rgba(0, 210, 255, 0.06);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
}

.deck-resolve-btn {
  width: 100%;
}

.deck-log-card {
  min-height: 190px;
}

.deck-last-log {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.deck-last-log p {
  font-family: var(--font-mono);
  font-weight: 800;
}

.deck-last-log .up {
  color: var(--emerald);
}

.deck-last-log .down {
  color: var(--neon-red);
}

.deck-last-log span,
.muted-text {
  color: var(--text-secondary);
  line-height: 1.55;
  font-size: 0.9rem;
}

/* ==========================================================================
   16. 반응형 레이아웃 미디어 쿼리
   ========================================================================== */
@media (max-width: 1024px) {
  .home-layout,
  .mission-layout,
  .simulator-layout,
  .challenge-grid,
  .report-grid,
  .study-layout,
  .deck-game-layout,
  .deck-board,
  .deck-intro-grid,
  .deck-flow-steps,
  .glossary-grid {
    grid-template-columns: 1fr;
  }

  .deck-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .deck-hand {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .study-toc {
    position: static;
  }

  .study-toc-list {
    max-height: none;
  }
  
  .mission-sidebar {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 0.5rem;
  }
  
  .mission-nav-item {
    flex-shrink: 0;
    width: 220px;
  }
  
  .hero-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2.5rem 1.5rem;
  }
  
  .hero-info {
    max-width: 100%;
  }
  
  .hero-artwork {
    position: relative;
    right: 0;
    top: 0;
    transform: none;
    align-self: flex-end;
    font-size: 5rem;
    margin-top: -2rem;
  }
}

@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }
  
  .main-nav {
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    border-radius: 12px;
  }
  
  .nav-btn {
    padding: 0.5rem 0.85rem;
  }
  
  .app-content-container {
    padding: 1.5rem 1rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .deck-header-card {
    flex-direction: column;
  }

  .deck-metrics,
  .deck-hand {
    grid-template-columns: 1fr;
  }
}
