/* ==========================================================================
   Chubby Bear Oracle Web App Stylesheet
   Themes: Starry Night, Autumn Cottage, Spring Garden
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Mitr:wght@400;500;600&family=Outfit:wght@400;600;700;800&family=Prompt:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');

/* Theme 1: Spring Garden (ทุ่งดอกไม้เร้นลับ) - Default */
:root, [data-theme="spring"] {
  --bg-dark: #0f1a14;
  --bg-gradient: radial-gradient(circle at 50% 0%, #1e3626 0%, #0f1a14 60%, #060a08 100%);
  --panel-bg: rgba(18, 32, 23, 0.75);
  --glass-border: rgba(52, 211, 153, 0.3);
  --glass-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
  
  --primary-gold: #34d399;
  --primary-gold-light: #d1fae5;
  --accent-pink: #f472b6;
  --accent-blue: #38bdf8;
  --accent-green: #10b981;

  --text-main: #f0fdf4;
  --text-muted: #a7f3d0;
  --text-gold: #6ee7b7;

  --card-width: 220px;
  --card-height: 330px;
  
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-full: 9999px;
  
  --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Theme 2: Summer Fireflies (ค่ำคืนฤดูร้อนสว่างไสว) */
[data-theme="summer"] {
  --bg-dark: #1a160d;
  --bg-gradient: radial-gradient(circle at 50% 0%, #362a12 0%, #1a160d 60%, #0b0905 100%);
  --panel-bg: rgba(30, 24, 15, 0.75);
  --glass-border: rgba(250, 204, 21, 0.3);
  --glass-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
  
  --primary-gold: #facc15;
  --primary-gold-light: #fef08a;
  --accent-pink: #f43f5e;
  --accent-blue: #0ea5e9;
  --accent-green: #22c55e;

  --text-main: #fefce8;
  --text-muted: #fde047;
  --text-gold: #fbbf24;
}

/* Theme 3: Autumn Whispers (เสียงกระซิบใบไม้ร่วง) */
[data-theme="autumn"] {
  --bg-dark: #1c100b;
  --bg-gradient: radial-gradient(circle at 50% 0%, #3a1e12 0%, #1c100b 60%, #0d0705 100%);
  --panel-bg: rgba(34, 18, 12, 0.75);
  --glass-border: rgba(249, 115, 22, 0.3);
  --glass-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
  
  --primary-gold: #f97316;
  --primary-gold-light: #ffedd5;
  --accent-pink: #e11d48;
  --accent-blue: #0284c7;
  --accent-green: #059669;

  --text-main: #fff7ed;
  --text-muted: #fdba74;
  --text-gold: #fb923c;
}

/* Theme 4: Winter Crystals (ผลึกน้ำแข็งเหมันต์) */
[data-theme="winter"] {
  --bg-dark: #0d131a;
  --bg-gradient: radial-gradient(circle at 50% 0%, #192a3b 0%, #0d131a 60%, #05080a 100%);
  --panel-bg: rgba(15, 22, 30, 0.75);
  --glass-border: rgba(96, 165, 250, 0.3);
  --glass-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7);
  
  --primary-gold: #60a5fa;
  --primary-gold-light: #dbeafe;
  --accent-pink: #c084fc;
  --accent-blue: #3b82f6;
  --accent-green: #34d399;

  --text-main: #f0f9ff;
  --text-muted: #93c5fd;
  --text-gold: #93c5fd;
}

/* Reset & Global Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Prompt', 'Mitr', sans-serif;
  background: var(--bg-dark);
  background-image: var(--bg-gradient);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
  transition: background 0.5s ease, color 0.5s ease;
}

/* Header Navigation Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 10, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--glass-border);
  padding: 0.8rem 1.5rem;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.header-container {
  max-width: 1250px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-main);
}

.brand-icon {
  font-size: 2.2rem;
  filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
  animation: floatBounce 3s ease-in-out infinite;
}

@keyframes floatBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.brand-title h1 {
  font-family: 'Outfit', 'Prompt', sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--primary-gold-light);
  letter-spacing: -0.5px;
}

.brand-title p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Navigation Tabs */
.nav-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.35rem 0.5rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  flex: 1;
  max-width: 680px;
  justify-content: space-between;
  align-items: center;
  gap: 0.25rem;
}

.nav-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Prompt', sans-serif;
  font-weight: 500;
  padding: 0.4rem 0.6rem;
  border-radius: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  text-align: center;
  line-height: 1.15;
  flex: 1;
  min-width: 72px;
}

.nav-btn .nav-icon {
  font-size: 1.15rem;
  line-height: 1;
}

.nav-btn .nav-label {
  font-size: clamp(0.72rem, 0.8vw, 0.82rem);
  display: -webkit-box;
  -webkit-line-clamp: 2; /* Strict maximum of 2 lines */
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.nav-btn:hover {
  color: var(--text-main);
  background: rgba(245, 158, 11, 0.15);
}

.nav-btn.active {
  background: var(--primary-gold);
  color: #1a0f0a;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Controls Tool Group (Theme & Sound & Ambient Stack) */
.controls-group {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.controls-column {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  align-items: stretch;
  min-width: 175px;
}

.theme-selector-chips {
  display: flex;
  justify-content: space-between;
  gap: 0.2rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.theme-chip-btn {
  background: transparent;
  border: none;
  font-size: 0.95rem;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.theme-chip-btn.active {
  background: var(--primary-gold);
  box-shadow: 0 0 8px var(--primary-gold);
}

.ambient-player-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  background: rgba(0, 0, 0, 0.4);
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.ambient-select {
  background: transparent;
  color: var(--text-main);
  border: none;
  font-family: 'Prompt', sans-serif;
  font-size: 0.8rem;
  outline: none;
  cursor: pointer;
  width: 100%;
}

.ambient-select option {
  background: var(--bg-dark);
  color: var(--text-main);
}

.tool-btn {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-gold);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  transition: var(--transition-smooth);
}

.tool-btn:hover {
  transform: scale(1.1);
  background: rgba(245, 158, 11, 0.2);
  border-color: var(--primary-gold);
}

/* Main Container Layout */
.main-content {
  max-width: 1250px;
  margin: 2rem auto;
  padding: 0 1.5rem 4rem;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.4s ease-out forwards;
}

.tab-pane.active {
  display: block;
}

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

/* Hero Cards */
.hero-card {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2rem;
  text-align: center;
  box-shadow: var(--glass-shadow);
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}

.hero-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary-gold-light);
  margin-bottom: 0.6rem;
}

.hero-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}

/* Switches & Buttons */
.toggle-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
  cursor: pointer;
}

.toggle-switch-wrap input {
  cursor: pointer;
  accent-color: var(--primary-gold);
  width: 18px;
  height: 18px;
}

.primary-btn {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #d97706 100%);
  color: #1a0f0a;
  font-family: 'Prompt', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  padding: 0.8rem 2rem;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.primary-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 28px rgba(245, 158, 11, 0.5);
}

.secondary-btn {
  background: var(--panel-bg);
  color: var(--text-main);
  border: 1px solid var(--glass-border);
  font-family: 'Prompt', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.secondary-btn:hover {
  border-color: var(--primary-gold);
  background: rgba(245, 158, 11, 0.15);
}

/* Spread Selector Cards */
.spread-selector {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.spread-card {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.spread-card:hover, .spread-card.active {
  transform: translateY(-4px);
  border-color: var(--primary-gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.spread-icon { font-size: 2.3rem; margin-bottom: 0.6rem; }
.spread-title { font-size: 1.15rem; font-weight: 700; color: var(--text-gold); }
.spread-desc { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.3rem; }

/* Interactive Card Table Area */
.reading-table {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem 1.5rem;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.6);
}

.table-instruction {
  text-align: center;
  color: var(--text-gold);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 2rem;
  animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
  from { opacity: 0.7; }
  to { opacity: 1; text-shadow: 0 0 12px var(--primary-gold); }
}

/* Interactive Card Deck Fan Spread */
.deck-fan-spread {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  padding: 2rem 0;
  max-width: 1000px;
  perspective: 1200px;
}

.deck-fan-card {
  width: 110px;
  height: 165px;
  margin: 0 -25px;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s;
  transform-origin: center bottom;
}

.deck-fan-card:hover {
  transform: translateY(-30px) scale(1.15) rotate(0deg) !important;
  z-index: 50 !important;
  filter: drop-shadow(0 10px 20px var(--primary-gold));
}

/* Card Slot Layout */
.cards-slot-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
}

.card-slot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.slot-label {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--primary-gold-light);
  background: rgba(245, 158, 11, 0.15);
  padding: 0.3rem 1rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

/* 3D Flip Card Component */
.oracle-card-wrapper, .oracle-card {
  width: var(--card-width);
  height: var(--card-height);
  perspective: 1000px;
  cursor: pointer;
  position: relative;
}

.oracle-card-inner, .card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

.oracle-card-inner.flipped, .card-inner.flipped {
  transform: rotateY(180deg);
}

.card-face, .card-back, .card-front {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.card-back { transform: rotateY(0deg); }
.card-front { transform: rotateY(180deg); }

.oracle-card-svg.is-reversed-svg {
  /* Reversed card visually flipped */
}

/* Reading Result Interpretation Box */
.reading-result-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-top: 2.5rem;
  box-shadow: var(--glass-shadow);
  display: none;
  animation: fadeIn 0.5s ease-out forwards;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.reading-result-panel.active { display: block; }

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px dashed var(--glass-border);
  padding-bottom: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.result-title {
  font-size: 1.4rem;
  color: var(--primary-gold-light);
  font-weight: 700;
}

.result-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.card-detail-block {
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  margin-bottom: 1.4rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.card-detail-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-gold);
  margin-bottom: 0.4rem;
}

.reversed-tag {
  background: #ef4444;
  color: #fff;
  font-size: 0.75rem;
  padding: 0.15rem 0.6rem;
  border-radius: var(--radius-full);
  margin-left: 0.5rem;
}

.keyword-badge {
  background: rgba(245, 158, 11, 0.15);
  color: var(--primary-gold-light);
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  border: 1px solid var(--glass-border);
}

.advice-box {
  background: rgba(244, 63, 94, 0.1);
  border-left: 3px solid var(--accent-pink);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.7;
  word-wrap: break-word;
}

.reversed-advice-box {
  background: rgba(239, 68, 68, 0.15);
  border-left: 3px solid #ef4444;
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
  margin-top: 1rem;
  line-height: 1.7;
  word-wrap: break-word;
}

.affirmation-box {
  background: rgba(16, 185, 129, 0.1);
  border-left: 3px solid var(--accent-green);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
  margin-top: 1rem;
  font-style: italic;
  line-height: 1.7;
  word-wrap: break-word;
}

/* Journal Reflection Input Box */
.journal-input-section {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 1.5rem;
}

.journal-textarea {
  width: 100%;
  background: var(--bg-dark);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 0.8rem;
  color: var(--text-main);
  font-family: 'Prompt', sans-serif;
  font-size: 0.9rem;
  outline: none;
  resize: vertical;
  min-height: 80px;
}

/* Card Deck Explorer */
.explorer-controls {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  align-items: center;
  justify-content: space-between;
}

.search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 260px;
}

.search-input {
  width: 100%;
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  padding: 0.75rem 1.2rem 0.75rem 2.8rem;
  color: var(--text-main);
  font-family: 'Prompt', sans-serif;
  font-size: 0.95rem;
  outline: none;
}

.search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1.6rem;
}

.card-grid-item {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.card-grid-item:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--primary-gold);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.card-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 0.8rem;
}

/* Energy Tracker Dashboard Styles */
.tracker-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.tracker-card {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  text-align: center;
}

.tracker-val {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary-gold-light);
}

.progress-bar-bg {
  background: rgba(0, 0, 0, 0.4);
  height: 10px;
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 0.5rem;
}

.progress-bar-fill {
  height: 100%;
  background: var(--primary-gold);
  border-radius: var(--radius-full);
  transition: width 0.6s ease;
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.history-item {
  background: var(--panel-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}

/* Modal Popup */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(10, 5, 3, 0.85);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card-content {
  background: var(--panel-bg);
  border: 1px solid var(--primary-gold);
  border-radius: 24px;
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  position: relative;
}

.modal-close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(245, 158, 11, 0.2);
  border: none;
  color: var(--text-gold);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-btn:hover {
  background: var(--accent-pink);
  color: #fff;
}

/* Story Canvas Export Modal */
.export-preview-container {
  text-align: center;
}

.export-preview-img {
  max-width: 100%;
  max-height: 60vh;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
  margin: 1rem 0;
}

/* Responsive */
@media (max-width: 900px) {
  .header-container { flex-direction: column; align-items: stretch; }
  .controls-group { justify-content: center; flex-wrap: wrap; }
  .nav-tabs { overflow-x: auto; white-space: nowrap; justify-content: flex-start; }
  .modal-card-content { grid-template-columns: 1fr; }
  :root { --card-width: 180px; --card-height: 270px; }
}

/* ==========================================================================
   Situational & Topic-Based Oracle Readings UI
   ========================================================================== */

.topic-selector-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
}

.topic-selector-label {
  color: var(--text-gold);
  font-weight: 700;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.topic-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.topic-chip-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-border);
  color: var(--text-muted);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-full);
  font-family: 'Prompt', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.topic-chip-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-main);
  border-color: var(--primary-gold);
  transform: translateY(-1px);
}

.topic-chip-btn.active {
  background: linear-gradient(135deg, var(--primary-gold) 0%, #10b981 100%);
  color: #061a10;
  font-weight: 700;
  border-color: transparent;
  box-shadow: 0 4px 15px rgba(52, 211, 153, 0.4);
}

/* Specific category highlights */
.topic-chip-btn[data-topic="love"].active {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(244, 63, 94, 0.4);
}

.topic-chip-btn[data-topic="work"].active {
  background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.topic-chip-btn[data-topic="finance"].active {
  background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
  color: #241a02;
  box-shadow: 0 4px 15px rgba(250, 204, 21, 0.4);
}

.topic-chip-btn[data-topic="health"].active {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.topic-chip-btn[data-topic="bookOfAnswers"].active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 50%, #78350f 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(217, 119, 6, 0.5);
}

/* Situational Reading Card Presentation */
.situation-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin: 1rem 0;
  text-align: left;
}

.situation-box.highlight-topic {
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid var(--primary-gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.situation-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  color: var(--text-gold);
}

.situation-love { border-left: 4px solid #f43f5e; }
.situation-work { border-left: 4px solid #3b82f6; }
.situation-finance { border-left: 4px solid #facc15; }
.situation-health { border-left: 4px solid #10b981; }
.situation-book {
  border-left: 4px solid #f59e0b;
  background: radial-gradient(circle at 50% 0%, rgba(245, 158, 11, 0.12) 0%, rgba(30, 20, 10, 0.4) 100%);
  border: 1px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.book-page-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fef3c7;
  background: rgba(217, 119, 6, 0.3);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(245, 158, 11, 0.4);
  margin-bottom: 0.6rem;
}

.book-quote-text {
  font-family: 'Prompt', serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fffbeb;
  line-height: 1.5;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
  margin: 0.5rem 0 0.75rem;
}

.book-quote-text::before {
  content: '“';
  font-size: 1.8rem;
  color: #f59e0b;
  line-height: 0;
  margin-right: 0.2rem;
  vertical-align: -0.2rem;
}

.book-quote-text::after {
  content: '”';
  font-size: 1.8rem;
  color: #f59e0b;
  line-height: 0;
  margin-left: 0.2rem;
  vertical-align: -0.2rem;
}

.book-guidance-text {
  font-size: 0.92rem;
  color: #fde68a;
  line-height: 1.65;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  border-left: 3px solid #f59e0b;
}

.love-sub-block {
  background: rgba(244, 63, 94, 0.06);
  border-radius: var(--radius-md);
  padding: 0.75rem 1rem;
  margin-top: 0.5rem;
}

.love-badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.3rem;
}

.badge-single {
  background: rgba(236, 72, 153, 0.25);
  color: #f472b6;
  border: 1px solid rgba(236, 72, 153, 0.4);
}

.badge-couple {
  background: rgba(244, 63, 94, 0.25);
  color: #fb7185;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* Modal Situations Navigation Tabs */
.modal-situations-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  margin: 1rem 0;
  border-bottom: 1px solid var(--glass-border);
}

.modal-situations-tab {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-md);
  font-family: 'Prompt', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.modal-situations-tab:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.modal-situations-tab.active {
  background: var(--panel-bg);
  border-color: var(--primary-gold);
  color: var(--text-gold);
}

