/* ==========================================================================
   DESIGN SYSTEM & VARIABLES - "BUM INTO THE UNKNOWN"
   ========================================================================== */

:root {
  /* Color Palette - Premium Warm Cream & High Contrast Contrasts */
  --bg-cream: #FFFDF9;
  --bg-card: #FFFFFF;
  --text-dark: #2A2A2A;
  --text-muted: #555555;
  
  /* Brand Theme Colors */
  --primary-coral: #FF6F61;
  --primary-coral-dark: #E05649;
  --primary-coral-light: #FFEDE9;
  --accent-teal: #14B8A6;
  --accent-teal-light: #E0F2FE;
  --accent-blue: #4F46E5;
  --accent-blue-light: #EEF2FF;
  --accent-yellow: #F59E0B;
  --accent-yellow-light: #FEF3C7;
  
  /* Category Palette */
  --color-basics: #4F46E5;
  --color-basics-bg: #EEF2FF;
  --color-calling: #FF8B77;
  --color-calling-bg: #FFF3F0;
  --color-social: #5C6BC0;
  --color-social-bg: #EEF0FC;
  --color-payment: #26A69A;
  --color-payment-bg: #EAF8F6;
  --color-ai: #EC4899;
  --color-ai-bg: #FDF2F8;

  /* Typography */
  --font-heading: 'Quicksand', 'Nunito', system-ui, -apple-system, sans-serif;
  --font-body: 'Nunito', system-ui, -apple-system, sans-serif;
  
  /* Shadows & Radius */
  --shadow-soft: 0 8px 30px rgba(42, 42, 42, 0.05);
  --shadow-medium: 0 12px 40px rgba(255, 111, 97, 0.12);
  --shadow-depth: 0 16px 48px rgba(0, 0, 0, 0.08);
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-full: 9999px;

  /* Timing */
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Base Accessibility Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-cream);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 20px; /* Highly readable body font size */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.25;
  color: var(--text-dark);
}

a {
  color: var(--primary-coral);
  text-decoration: none;
  transition: var(--transition-smooth);
}

a:hover {
  text-decoration: underline;
}

button {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  background: none;
  transition: var(--transition-smooth);
  min-height: 48px; /* Tap targets standard */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   APP HEADER & NAVIGATION
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--primary-coral-light);
  z-index: 100;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.logo-avatar {
  width: 50px;
  height: 50px;
  border-radius: var(--radius-full);
  background-color: var(--primary-coral-light);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-bounce);
}

.logo-group:hover .logo-avatar {
  transform: scale(1.15) rotate(8deg);
}

.header-mascot {
  width: 100%;
  height: 100%;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: var(--primary-coral);
}

.logo-tagline {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Journey Stats Badge */
.stats-badge {
  background-color: var(--primary-coral-light);
  border: 2px solid var(--primary-coral);
  color: var(--primary-coral-dark);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 16px;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}

.stats-badge:hover {
  transform: translateY(-2px);
  background-color: var(--primary-coral);
  color: #fff;
}

/* Bilingual Switcher */
.lang-switcher {
  display: inline-flex;
  background-color: var(--primary-coral-light);
  border-radius: var(--radius-full);
  padding: 4px;
  border: 2px solid var(--primary-coral-light);
}

.lang-btn {
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: var(--radius-full);
  color: var(--primary-coral-dark);
  min-height: 36px;
  transition: var(--transition-smooth);
}

.lang-btn.active {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(255, 111, 97, 0.3);
}

/* ==========================================================================
   VIEW ROUTING LAYOUTS
   ========================================================================== */

.app-main-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease-out;
}

.view-section.active {
  display: block;
}

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

.content-wrapper {
  margin-top: 32px;
}

/* ==========================================================================
   KINETIC HERO SECTION (WOW MOMENT)
   ========================================================================== */

.hero-container {
  position: relative;
  background: radial-gradient(circle at 50% 50%, #FFFDF5 0%, #FFF3EC 100%);
  border-radius: var(--radius-lg);
  padding: 80px 24px;
  text-align: center;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 3px solid var(--primary-coral-light);
  margin-bottom: 48px;
}

/* Portal of Light Background Graphics */
.hero-portal-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.portal-light-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, rgba(255, 237, 233, 0.8) 0%, rgba(255, 253, 249, 0) 70%);
  filter: blur(20px);
  animation: pulsePortal 6s infinite ease-in-out;
}

.portal-ray {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 800px;
  height: 800px;
  background: conic-gradient(from 0deg at 50% 50%, 
                             rgba(255, 111, 97, 0.05) 0deg, 
                             rgba(255, 253, 249, 0) 60deg, 
                             rgba(20, 184, 166, 0.05) 120deg, 
                             rgba(255, 253, 249, 0) 180deg, 
                             rgba(255, 111, 97, 0.05) 240deg, 
                             rgba(255, 253, 249, 0) 300deg);
  transform-origin: center center;
  margin-top: -400px;
  margin-left: -400px;
  animation: rotateRay 30s linear infinite;
  opacity: 0.8;
}

.portal-particle {
  position: absolute;
  border-radius: var(--radius-full);
  background-color: var(--primary-coral);
  opacity: 0.3;
}

.p-1 { width: 12px; height: 12px; top: 20%; left: 30%; animation: floatSparks 8s infinite linear; }
.p-2 { width: 18px; height: 18px; top: 70%; left: 75%; animation: floatSparks 11s infinite linear; }
.p-3 { width: 8px; height: 8px; top: 15%; left: 80%; animation: floatSparks 6s infinite linear; }

@keyframes pulsePortal {
  0%, 100% { transform: translate(-50%, -50%) scale(1.0); opacity: 0.6; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.9; }
}

@keyframes rotateRay {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes floatSparks {
  0% { transform: translateY(0) rotate(0deg); opacity: 0.2; }
  50% { opacity: 0.5; }
  100% { transform: translateY(-80px) rotate(360deg); opacity: 0; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  margin: 0 auto;
}

/* Kinetic typography wordmark "BUM INTO THE UNKNOWN" */
.kinetic-wordmark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 24px;
  gap: 8px;
}

.word-bum {
  font-size: 84px;
  letter-spacing: -2px;
  color: var(--primary-coral);
  display: inline-block;
  animation: bumBurst 3.5s cubic-bezier(0.175, 0.885, 0.32, 1.5) infinite;
  text-shadow: 0 10px 30px rgba(255, 111, 97, 0.2);
}

.word-into {
  font-size: 24px;
  font-weight: 600;
  color: var(--accent-teal);
  letter-spacing: 4px;
  opacity: 0.9;
  text-shadow: none;
}

.word-unknown {
  font-size: 48px;
  font-weight: 800;
  letter-spacing: 6px;
  background: linear-gradient(135deg, var(--text-dark) 20%, var(--primary-coral) 80%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: revealPortal 7s ease-in-out infinite alternate;
}

@keyframes bumBurst {
  0%, 100% { transform: scale(1.0); }
  25% { transform: scale(1.18) rotate(-3deg); filter: brightness(1.1); }
  35% { transform: scale(0.95) rotate(2deg); }
  45% { transform: scale(1.05) rotate(0deg); }
}

@keyframes revealPortal {
  0% { letter-spacing: 2px; filter: brightness(0.9); }
  100% { letter-spacing: 8px; filter: brightness(1.2); }
}

.hero-subtitle {
  font-size: 22px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto 36px auto;
  font-weight: 500;
}

/* ==========================================================================
   OVERSIZED FRIENDLY SEARCH BAR
   ========================================================================== */

.search-container {
  position: relative;
  max-width: 620px;
  margin: 0 auto;
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 4px solid var(--primary-coral-light);
  border-radius: var(--radius-full);
  padding: 8px 16px 8px 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.03);
  transition: var(--transition-bounce);
}

.search-wrapper:focus-within {
  border-color: var(--primary-coral);
  transform: translateY(-4px);
  box-shadow: var(--shadow-medium);
}

.search-icon {
  font-size: 24px;
  margin-right: 12px;
}

.main-search-bar {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 19px;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-weight: 500;
  padding: 8px 0;
}

.main-search-bar::placeholder {
  color: #A0A0A0;
}

.clear-search-btn {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background-color: var(--primary-coral-light);
  color: var(--primary-coral-dark);
  font-size: 14px;
  min-height: auto;
  padding: 0;
  display: flex;
}

.clear-search-btn:hover {
  background-color: var(--primary-coral);
  color: #fff;
}

/* Search Dropdown / Autocomplete suggestions */
.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  background-color: var(--bg-card);
  border: 2px solid var(--primary-coral);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-depth);
  z-index: 50;
  text-align: left;
  overflow: hidden;
  max-height: 320px;
  overflow-y: auto;
  animation: slideDown 0.3s ease-out;
}

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

.suggestion-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--primary-coral-light);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.suggestion-item:last-child {
  border-bottom: none;
}

.suggestion-item:hover {
  background-color: var(--primary-coral-light);
}

.suggestion-info {
  display: flex;
  flex-direction: column;
}

.suggestion-title {
  font-weight: 700;
  font-size: 18px;
  color: var(--text-dark);
}

.suggestion-cat {
  font-size: 13px;
  color: var(--primary-coral-dark);
  font-weight: 600;
}

/* ==========================================================================
   BEGINNER PATH CARD ("Bắt đầu từ đây")
   ========================================================================== */

.beginner-path-section {
  margin-bottom: 64px;
}

.beginner-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--accent-teal-light) 0%, #FFFFFF 100%);
  border: 3px solid var(--accent-teal);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: var(--transition-bounce);
  gap: 24px;
  position: relative;
  overflow: hidden;
}

.beginner-card::before {
  content: '';
  position: absolute;
  top: -50px;
  right: -50px;
  width: 150px;
  height: 150px;
  border-radius: var(--radius-full);
  background-color: rgba(20, 184, 166, 0.05);
  pointer-events: none;
}

.beginner-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 16px 40px rgba(20, 184, 166, 0.15);
}

.beginner-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: flex-start;
}

.badge {
  background-color: var(--accent-teal);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.beginner-content h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-dark);
}

.beginner-content p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
}

.btn-primary {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(255, 111, 97, 0.3);
  gap: 8px;
}

.btn-primary:hover {
  background-color: var(--primary-coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 111, 97, 0.4);
}

.beginner-mascot {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mascot-svg-inline {
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.05));
}

.float-animation {
  animation: floatMascot 4s ease-in-out infinite;
}

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

.waving-arm {
  transform-origin: 40px 120px;
  animation: waveLeftArm 3s ease-in-out infinite;
}

@keyframes waveLeftArm {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(20deg); }
}

/* ==========================================================================
   CATEGORY CARDS GRID
   ========================================================================== */

.section-title-group {
  margin-bottom: 28px;
}

.section-title-group h2 {
  font-size: 36px;
  margin-bottom: 6px;
}

.section-title-group p {
  color: var(--text-muted);
  font-size: 19px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.category-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  gap: 20px;
  border: 3px solid transparent;
  text-align: left;
}

.category-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-medium);
}

.cat-icon-container {
  font-size: 40px;
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  transition: var(--transition-bounce);
}

.category-card:hover .cat-icon-container {
  transform: scale(1.12) rotate(-5deg);
}

/* Category individual colors */
.cat-basics { border-color: var(--color-basics-bg); }
.cat-basics .cat-icon-container { background-color: var(--color-basics-bg); }
.cat-basics:hover { border-color: var(--color-basics); }

.cat-calling { border-color: var(--color-calling-bg); }
.cat-calling .cat-icon-container { background-color: var(--color-calling-bg); }
.cat-calling:hover { border-color: var(--color-calling); }

.cat-social { border-color: var(--color-social-bg); }
.cat-social .cat-icon-container { background-color: var(--color-social-bg); }
.cat-social:hover { border-color: var(--color-social); }

.cat-payment { border-color: var(--color-payment-bg); }
.cat-payment .cat-icon-container { background-color: var(--color-payment-bg); }
.cat-payment:hover { border-color: var(--color-payment); }

.cat-ai { border-color: var(--color-ai-bg); }
.cat-ai .cat-icon-container { background-color: var(--color-ai-bg); }
.cat-ai:hover { border-color: var(--color-ai); }

.cat-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-info h3 {
  font-size: 22px;
  font-weight: 800;
}

.cat-info p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.cat-arrow {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--primary-coral);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ==========================================================================
   CATEGORY VIEW PAGE & GUIDES GRID
   ========================================================================== */

.plain-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.bc-divider {
  color: #CCC;
}

.bc-active {
  color: var(--primary-coral-dark);
}

.category-header-details {
  margin-bottom: 40px;
}

.cat-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  color: #fff;
  background-color: var(--primary-coral);
  margin-bottom: 12px;
}

.section-title {
  font-size: 40px;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 20px;
}

/* Guide Cards */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 48px;
}

.guide-item-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 32px;
  border: 3px solid var(--primary-coral-light);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: var(--transition-bounce);
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: left;
}

.guide-item-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-coral);
  box-shadow: var(--shadow-medium);
}

.guide-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.guide-card-time {
  background-color: var(--accent-teal-light);
  color: var(--accent-teal);
  font-size: 14px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
}

.guide-card-difficulty {
  color: var(--accent-yellow);
  font-weight: 700;
  font-size: 15px;
}

.guide-card-title {
  font-size: 24px;
  font-weight: 800;
}

.guide-card-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

.guide-card-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  border-top: 1px solid var(--primary-coral-light);
  padding-top: 16px;
}

.completion-status-text {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.completion-status-text.completed {
  color: var(--accent-teal);
}

.guide-start-btn {
  background-color: var(--primary-coral-light);
  color: var(--primary-coral-dark);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
}

.guide-item-card:hover .guide-start-btn {
  background-color: var(--primary-coral);
  color: #fff;
}

.btn-secondary {
  border: 3px solid var(--primary-coral-light);
  color: var(--primary-coral-dark);
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

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

.category-bottom-action {
  display: flex;
  justify-content: center;
}

/* ==========================================================================
   GUIDE PAGE & BILINGUAL LAYOUT
   ========================================================================== */

.guide-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  margin-top: 24px;
  align-items: start;
}

/* LEFT SIDE: Instruction Details */
.guide-instruction-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* Progress bar with sliding mascot head */
.guide-progress-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.progress-bar-wrapper {
  position: relative;
  height: 16px;
  background-color: var(--primary-coral-light);
  border-radius: var(--radius-full);
  overflow: visible; /* To allow mascot head to overhang */
}

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

.progress-mascot-head {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid #FFFFFF;
  box-shadow: 0 4px 10px rgba(0,0,0,0.15);
  background-color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: left 0.5s ease-out;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-muted);
}

.progress-percentage {
  color: var(--primary-coral-dark);
}

/* Instruction Step Card */
.step-card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 36px;
  border: 3px solid var(--primary-coral-light);
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.step-badge {
  align-self: flex-start;
  background-color: var(--primary-coral-light);
  color: var(--primary-coral-dark);
  font-size: 14px;
  font-weight: 800;
  padding: 6px 16px;
  border-radius: var(--radius-full);
}

.step-title-text {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-dark);
  line-height: 1.4;
}

/* Audio wave reader */
.read-aloud-bar {
  display: flex;
}

.btn-read-aloud {
  background-color: var(--accent-blue-light);
  border: 2px solid var(--accent-blue);
  color: var(--accent-blue);
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  gap: 8px;
}

.btn-read-aloud:hover {
  background-color: var(--accent-blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.audio-wave-anim {
  font-size: 20px;
}

.speaking .audio-wave-anim {
  animation: jitterAudio 0.6s infinite alternate;
}

@keyframes jitterAudio {
  0% { transform: scale(0.9); }
  100% { transform: scale(1.2); }
}

/* Mascot tip box */
.mascot-tip-box {
  display: flex;
  background-color: var(--accent-yellow-light);
  border-radius: var(--radius-md);
  padding: 20px;
  gap: 16px;
  align-items: flex-start;
  border: 2px dashed var(--accent-yellow);
}

.tip-mascot-avatar {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.mini-mascot-animation {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.05));
  animation: nudgeMascot 4s infinite alternate;
}

@keyframes nudgeMascot {
  0% { transform: rotate(-3deg) translateY(0); }
  100% { transform: rotate(3deg) translateY(-3px); }
}

.tip-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tip-content strong {
  font-size: 16px;
  color: var(--text-dark);
}

.tip-content p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Confirmation action */
.confirmation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.reassurance-text {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 500;
  font-style: italic;
}

.btn-success-action {
  width: 100%;
  background-color: var(--accent-teal);
  color: #FFFFFF;
  padding: 18px;
  border-radius: var(--radius-md);
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 6px 20px rgba(20, 184, 166, 0.3);
  gap: 10px;
}

.btn-success-action:hover {
  background-color: #0F9F8F;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20, 184, 166, 0.4);
}

.btn-success-action.next-guide-btn {
  background-color: var(--primary-coral);
  box-shadow: 0 6px 20px rgba(255, 111, 97, 0.3);
}

.btn-success-action.next-guide-btn:hover {
  background-color: var(--primary-coral-dark);
}

/* ==========================================================================
   FAITHFUL EMBEDDED PHONE SIMULATOR UI
   ========================================================================== */

.simulator-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.simulator-instructions-header {
  font-size: 16px;
  color: var(--text-muted);
  font-weight: 700;
  text-align: center;
}

/* Phone Mock Shell */
.phone-wrapper {
  position: relative;
}

.phone-frame {
  width: 340px;
  height: 680px;
  border: 12px solid #2D2D2D;
  border-radius: 40px;
  background-color: #000;
  box-shadow: var(--shadow-depth);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Phone details for state-of-the-art mockups */
.phone-speaker {
  width: 80px;
  height: 6px;
  background-color: #4D4D4D;
  border-radius: var(--radius-full);
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 12;
}

.phone-camera-notch {
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background-color: #1A1A1A;
  position: absolute;
  top: 6px;
  left: 70%;
  z-index: 12;
}

.phone-screen-container {
  flex: 1;
  background-color: #FFF;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Phone status bar */
.phone-status-bar {
  height: 28px;
  background-color: #F8F9FA;
  padding: 0 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #333333;
  z-index: 10;
  border-bottom: 1px solid #EAEAEA;
}

.status-icons {
  display: flex;
  gap: 6px;
}

.phone-app-viewport {
  flex: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Phone Home indicator line */
.phone-home-indicator {
  width: 120px;
  height: 5px;
  background-color: #333333;
  border-radius: var(--radius-full);
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}

/* Dim Overlay & Target Hotspot Coaching mark */
.simulator-dim-overlay {
  position: absolute;
  top: 28px; /* Below status bar */
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.45);
  z-index: 20;
  transition: opacity 0.3s ease;
  pointer-events: auto;
}

/* Pulsing red coaching mark hotspot */
.pulsing-hotspot {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background-color: rgba(255, 111, 97, 0.3);
  border: 3px solid var(--primary-coral);
  cursor: pointer;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: auto;
}

.hotspot-ring {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  border: 4px solid var(--primary-coral);
  animation: pulseRing 1.5s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
  box-sizing: border-box;
}

@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.5); opacity: 0; }
}

/* Click Missed Shake animation */
.phone-frame.shake {
  animation: shakeFrame 0.5s ease-in-out;
}

@keyframes shakeFrame {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

/* In-Simulator Hint Bubble */
.simulator-hint-bubble {
  position: absolute;
  bottom: 24px;
  left: 16px;
  right: 16px;
  background-color: var(--text-dark);
  color: #FFFFFF;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  z-index: 30;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  animation: bounceBubble 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes bounceBubble {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1.0); opacity: 1; }
}

/* App interfaces inside phone viewport */
.app-view-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Zalo simulator specific layout */
.zalo-nav-header {
  height: 48px;
  background-color: #0068FF;
  color: #FFF;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
  font-size: 16px;
  font-weight: 700;
}

.zalo-search-box {
  flex: 1;
  background-color: rgba(255,255,255,0.15);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.8);
}

.zalo-chat-list {
  display: flex;
  flex-direction: column;
  flex: 1;
  background-color: #FFF;
}

.zalo-chat-item {
  display: flex;
  align-items: center;
  padding: 14px 12px;
  border-bottom: 1px solid #F0F0F0;
  gap: 12px;
}

.zalo-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #12C2E9 0%, #C471ED 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

.zalo-avatar-circle.av-mom {
  background: linear-gradient(135deg, #FF6F61 0%, #FFB7B2 100%);
}

.zalo-chat-detail {
  flex: 1;
  display: flex;
  flex-direction: column;
  text-align: left;
}

.zalo-chat-name {
  font-weight: 700;
  font-size: 15px;
  color: #222;
}

.zalo-chat-msg {
  font-size: 13px;
  color: #777;
}

/* Zalo chat room layout */
.zalo-chat-room {
  background-color: #E2E9F3;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.zalo-room-header {
  height: 52px;
  background-color: #0068FF;
  color: #FFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.zalo-room-title {
  font-weight: 700;
  font-size: 16px;
}

.zalo-room-actions {
  display: flex;
  gap: 16px;
  font-size: 20px;
}

.zalo-messages-area {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zalo-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.4;
  text-align: left;
}

.zalo-bubble.received {
  align-self: flex-start;
  background-color: #FFF;
  border-top-left-radius: 4px;
  color: #222;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.zalo-bubble.sent {
  align-self: flex-end;
  background-color: #D6E8FF;
  border-top-right-radius: 4px;
  color: #111;
}

.zalo-room-input {
  height: 52px;
  background-color: #FFF;
  border-top: 1px solid #D0D0D0;
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 12px;
}

.zalo-input-box {
  flex: 1;
  font-size: 14px;
  color: #AAA;
  text-align: left;
}

.zalo-input-emoji { font-size: 22px; }

/* Calling active window overlay */
.zalo-calling-window {
  height: 100%;
  background: radial-gradient(circle, #2D3E50 0%, #1A252F 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  color: #FFF;
  padding: 40px 24px;
}

.calling-user-profile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.calling-avatar {
  width: 110px;
  height: 110px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #FF6F61 0%, #FFB7B2 100%);
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: #fff;
  font-weight: 700;
}

.calling-name {
  font-size: 22px;
  font-weight: 800;
}

.calling-state {
  font-size: 14px;
  color: #A0D0FF;
  animation: pulseText 1.5s infinite alternate;
}

@keyframes pulseText {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.calling-actions-grid {
  display: flex;
  gap: 32px;
}

.call-btn-circle {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-full);
  background-color: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.call-btn-circle.hangup {
  background-color: #FF3B30;
}

/* Gemini app simulator specific layout */
.gemini-app-container {
  height: 100%;
  background-color: #131314;
  color: #E3E3E3;
  display: flex;
  flex-direction: column;
}

.gemini-header {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid #2D2D2E;
}

.gemini-logo {
  font-weight: 800;
  font-size: 18px;
  background: linear-gradient(90deg, #4285F4, #9B51E0, #E05649);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gemini-chat-area {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
}

.gemini-greeting {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  text-align: left;
  line-height: 1.4;
  margin-bottom: 24px;
}

.gemini-prompt-box {
  background-color: #1E1F20;
  border: 1px solid #3C4043;
  border-radius: 24px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gemini-input-placeholder {
  font-size: 13px;
  color: #8E918F;
  text-align: left;
  flex: 1;
}

.gemini-send-btn {
  width: 32px;
  height: 32px;
  background-color: #2F3032;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #8E918F;
}

.gemini-send-btn.active {
  background-color: #FFFFFF;
  color: #131314;
}

.gemini-response-bubble {
  background-color: #1E1F20;
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  animation: slideUp 0.4s ease-out;
}

.gemini-stars {
  font-size: 14px;
  margin-bottom: 6px;
}

/* ==========================================================================
   DR. BUM MASCOT PLAYGROUND & EMOTION SANDBOX
   ========================================================================== */

.playground-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: center;
}

.playground-intro {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.playground-intro h1 {
  font-size: 44px;
}

.playground-intro p {
  color: var(--text-muted);
  font-size: 19px;
}

.emotion-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.btn-emotion {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  border: 2px solid var(--primary-coral-light);
  background-color: #FFFFFF;
  color: var(--text-dark);
  font-weight: 700;
  gap: 8px;
}

.btn-emotion:hover {
  transform: translateY(-2px);
  border-color: var(--primary-coral);
  box-shadow: var(--shadow-soft);
}

.btn-emotion.active {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  border-color: var(--primary-coral);
  box-shadow: 0 4px 15px rgba(255, 111, 97, 0.35);
}

/* Speech Box */
.playground-speech-box {
  background-color: var(--primary-coral-light);
  border-radius: var(--radius-md);
  padding: 24px;
  position: relative;
  border-left: 6px solid var(--primary-coral);
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quote-mark {
  position: absolute;
  top: -8px;
  left: 20px;
  font-size: 60px;
  font-family: Georgia, serif;
  color: rgba(255, 111, 97, 0.2);
  line-height: 1;
}

.playground-speech-box p {
  font-size: 18px;
  color: var(--text-dark);
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
  position: relative;
  z-index: 2;
}

.btn-play-voice {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  padding: 10px 22px;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(255, 111, 97, 0.2);
  transition: var(--transition-smooth);
}

.btn-play-voice:hover {
  background-color: var(--primary-coral-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 111, 97, 0.3);
}

.playground-footer {
  margin-top: 16px;
}

/* Mascot SVG Display */
.playground-mascot-showcase {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.mascot-card-bg {
  background: radial-gradient(circle at 50% 50%, #FFF, #FFF8F6);
  border: 3px solid var(--primary-coral-light);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-medium);
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.large-mascot-svg {
  width: 100%;
  max-width: 260px;
  height: auto;
}

/* Dynamic SVG selectors triggered by JS emotion classes */
/* Hidden elements by default */
.mascot-sparks,
.mascot-eyes-happy,
.mascot-eyes-thinking,
.mascot-mouth-cheer,
.mascot-mouth-think,
.hand-left-cheering,
.hand-right-cheering,
.hand-right-pointing,
.hand-left-think {
  display: none;
}

/* 1. IDLE EXPRESSION (Default) */
.large-mascot-svg.mascot-idle .mascot-eyes-normal { display: block; }
.large-mascot-svg.mascot-idle .mascot-mouth-smile { display: block; }
.large-mascot-svg.mascot-idle .hand-left-wave {
  display: block;
  transform-origin: 50px 190px;
  animation: waveArmLoop 4s ease-in-out infinite;
}
.large-mascot-svg.mascot-idle .hand-right-rest { display: block; }

@keyframes waveArmLoop {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(16deg); }
}

/* 2. CHEERING EXPRESSION */
.large-mascot-svg.mascot-cheering .mascot-sparks { display: block; }
.large-mascot-svg.mascot-cheering .mascot-eyes-happy { display: block; }
.large-mascot-svg.mascot-cheering .mascot-eyes-normal { display: none; }
.large-mascot-svg.mascot-cheering .mascot-mouth-cheer { display: block; }
.large-mascot-svg.mascot-cheering .mascot-mouth-smile { display: none; }
.large-mascot-svg.mascot-cheering .hand-left-cheering {
  display: block;
  transform-origin: 60px 170px;
  animation: cheeringArm 0.6s infinite alternate;
}
.large-mascot-svg.mascot-cheering .hand-right-cheering {
  display: block;
  transform-origin: 240px 170px;
  animation: cheeringArm 0.6s infinite alternate-reverse;
}
.large-mascot-svg.mascot-cheering .mascot-main-body {
  animation: jumpBody 0.6s infinite alternate;
  transform-origin: center center;
}

@keyframes cheeringArm {
  0% { transform: translateY(0) rotate(-5deg); }
  100% { transform: translateY(-10px) rotate(8deg); }
}

@keyframes jumpBody {
  0% { transform: translateY(0) scale(1.0); }
  100% { transform: translateY(-8px) scale(1.02); }
}

/* 3. THINKING EXPRESSION */
.large-mascot-svg.mascot-thinking .mascot-eyes-thinking { display: block; }
.large-mascot-svg.mascot-thinking .mascot-eyes-normal { display: none; }
.large-mascot-svg.mascot-thinking .mascot-mouth-think { display: block; }
.large-mascot-svg.mascot-thinking .mascot-mouth-smile { display: none; }
.large-mascot-svg.mascot-thinking .hand-left-think { display: block; }
.large-mascot-svg.mascot-thinking .hand-right-rest { display: block; }
.large-mascot-svg.mascot-thinking .mascot-glasses {
  transform-origin: 150px 146px;
  animation: tiltGlasses 3s infinite alternate;
}

@keyframes tiltGlasses {
  0% { transform: rotate(0deg) translateY(0); }
  100% { transform: rotate(-3deg) translateY(2px); }
}

/* 4. POINTING EXPRESSION */
.large-mascot-svg.mascot-pointing .mascot-eyes-normal { display: block; }
.large-mascot-svg.mascot-pointing .mascot-mouth-smile { display: block; }
.large-mascot-svg.mascot-pointing .hand-left-rest { display: block; }
.large-mascot-svg.mascot-pointing .hand-right-pointing {
  display: block;
  transform-origin: 245px 180px;
  animation: pointPulse 2s infinite alternate;
}

@keyframes pointPulse {
  0% { transform: scale(0.98); }
  100% { transform: scale(1.04) translateX(3px); }
}

/* Bubble speech card below mascot */
.playground-bubble-thought {
  position: relative;
  background-color: var(--accent-teal-light);
  border: 2px solid var(--accent-teal);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 700;
  color: #0F766E;
  max-width: 260px;
  text-align: center;
  box-shadow: 0 4px 15px rgba(20, 184, 166, 0.05);
  margin-top: 16px;
}

.playground-bubble-thought::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 10px 10px 10px;
  border-style: solid;
  border-color: transparent transparent var(--accent-teal) transparent;
}

.playground-bubble-thought::after {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  border-width: 0 9px 9px 9px;
  border-style: solid;
  border-color: transparent transparent var(--accent-teal-light) transparent;
}

/* ==========================================================================
   CONFETTI, TOAST AND RESPONSIVE MEDIA QUERIES
   ========================================================================== */

.confetti-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1000;
  pointer-events: none;
}

/* Toast styling */
.toast-notification {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333333;
  color: #FFFFFF;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-depth);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 500;
  animation: slideUp 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Honor prefers-reduced-motion everywhere */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-delay: 0s !important;
    animation-duration: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0s !important;
    scroll-behavior: auto !important;
  }
  .portal-ray,
  .portal-particle,
  .waving-arm,
  .float-animation,
  .kinetic-wordmark span,
  .pulsing-hotspot,
  .hotspot-ring {
    animation: none !important;
    transform: none !important;
  }
  .word-bum {
    font-size: 72px;
  }
}

/* Responsive Media Queries (Mobile First Focus) */
@media (max-width: 900px) {
  body {
    font-size: 18px; /* Slightly smaller base for mid-range phones */
  }

  .app-main-content {
    padding: 16px;
  }

  .hero-container {
    padding: 48px 16px;
  }

  .word-bum {
    font-size: 56px;
  }

  .word-unknown {
    font-size: 32px;
  }

  .beginner-card {
    flex-direction: column;
    padding: 24px;
    text-align: center;
  }

  .beginner-content {
    align-items: center;
  }

  .guide-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .playground-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* View notes mobile responsive overrides */
  .magic-cards-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .magic-card-item {
    height: 360px !important;
  }

  .notes-dashboard {
    padding: 24px !important;
  }

  .notes-header {
    flex-direction: column !important;
    text-align: center !important;
    gap: 24px !important;
  }

  .notes-title {
    font-size: 28px !important;
  }
}

/* ==========================================================================
   NOTES FOR DR. BUM VIEW STYLE (PREMIUM TAROT & HEALING SPACE)
   ========================================================================== */

.header-nav {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-right: 12px;
}

.nav-link {
  font-size: 15px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  transition: var(--transition-bounce);
  gap: 6px;
  background: transparent;
  border: 2px solid transparent;
  min-height: 40px;
}

.nav-link:hover {
  background-color: var(--primary-coral-light);
  color: var(--primary-coral-dark);
  transform: translateY(-2px);
  text-decoration: none;
}

.nav-link.active {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  box-shadow: 0 4px 15px rgba(255, 111, 97, 0.25);
}

/* Dashboard Notes Panel */
.notes-dashboard {
  background: radial-gradient(circle at 50% 50%, #FFFDF7 0%, #FFF4ED 100%);
  border-radius: var(--radius-lg);
  padding: 48px;
  border: 3px solid var(--primary-coral-light);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

/* Night theme styling for notes view */
.notes-dashboard.theme-night {
  background: radial-gradient(circle at 50% 50%, #1E2030 0%, #0F101A 100%) !important;
  border-color: #313552 !important;
  color: #E2E8F0 !important;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3) !important;
}

.notes-dashboard.theme-night .notes-title {
  color: #FFFFFF !important;
}

.notes-dashboard.theme-night .notes-subtitle {
  color: #94A3B8 !important;
}

.notes-dashboard.theme-night .magic-cards-instruction {
  color: #CBD5E1 !important;
}

.notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  border-bottom: 2px dashed rgba(255, 111, 97, 0.15);
  padding-bottom: 32px;
  margin-bottom: 32px;
}

.notes-dashboard.theme-night .notes-header {
  border-bottom-color: rgba(92, 107, 192, 0.2);
}

.notes-title-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.badge-notes {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(255, 111, 97, 0.2);
}

.notes-dashboard.theme-night .badge-notes {
  background-color: #5C6BC0;
  box-shadow: 0 4px 10px rgba(92, 107, 192, 0.3);
}

.notes-title {
  font-size: 40px;
  font-weight: 800;
  color: var(--text-dark);
}

.notes-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 500;
}

.notes-mascot-box {
  flex-shrink: 0;
}

.notes-mascot-svg {
  filter: drop-shadow(0 8px 20px rgba(255, 111, 97, 0.15));
  transition: var(--transition-bounce);
}

.notes-dashboard.theme-night .notes-mascot-svg {
  filter: drop-shadow(0 8px 24px rgba(92, 107, 192, 0.25));
}

/* Magic Cards Grid */
.magic-cards-section {
  text-align: center;
}

.magic-cards-instruction {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 24px;
}

.magic-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
  perspective: 1500px; /* Essential for 3D flip card effect */
}

/* The Magic Flip Card Item */
.magic-card-item {
  height: 380px;
  cursor: pointer;
  perspective: 1500px;
  border-radius: var(--radius-md);
  position: relative;
  outline: none;
}

/* Float Animations for Cards to feel alive */
.magic-card-item:nth-child(1) { animation: floatCard 6s ease-in-out infinite; }
.magic-card-item:nth-child(2) { animation: floatCard 7s ease-in-out infinite 0.5s; }
.magic-card-item:nth-child(3) { animation: floatCard 6.5s ease-in-out infinite 0.2s; }

.magic-card-item.flipped {
  animation: none !important; /* Stop floating when card is flipped */
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.magic-card-item.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden; /* Hide the back side of card when facing front */
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 24px;
  box-shadow: var(--shadow-soft);
  border: 3px solid transparent;
}

/* CARD FRONT: Mystic Glowing Design */
.card-front {
  background: linear-gradient(135deg, #FFEBE7 0%, #FFD4CC 100%);
  border-color: var(--primary-coral-light);
  color: var(--primary-coral-dark);
}

.notes-dashboard.theme-night .card-front {
  background: linear-gradient(135deg, #25283E 0%, #151624 100%) !important;
  border-color: #3A3F64 !important;
  color: #38BDF8 !important;
}

.card-symbol {
  font-size: 68px;
  margin-bottom: 16px;
  animation: pulseSymbol 2.5s infinite ease-in-out;
  filter: drop-shadow(0 4px 10px rgba(255, 111, 97, 0.2));
}

.notes-dashboard.theme-night .card-symbol {
  filter: drop-shadow(0 4px 10px rgba(56, 189, 248, 0.3));
}

.card-label {
  font-size: 16px;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--primary-coral-dark);
  letter-spacing: 2px;
}

.notes-dashboard.theme-night .card-label {
  color: #38BDF8;
}

.card-glowing-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border-radius: var(--radius-md);
  border: 3px solid var(--primary-coral);
  opacity: 0;
  transition: var(--transition-bounce);
  pointer-events: none;
}

.notes-dashboard.theme-night .card-glowing-ring {
  border-color: #38BDF8;
}

.magic-card-item:hover .card-glowing-ring {
  opacity: 0.8;
  transform: scale(1.04);
  box-shadow: 0 0 25px rgba(255, 111, 97, 0.4);
}

.notes-dashboard.theme-night .magic-card-item:hover .card-glowing-ring {
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.5);
}

/* CARD BACK: Detailed message */
.card-back {
  background-color: #FFFFFF;
  border: 3px solid var(--primary-coral);
  transform: rotateY(180deg); /* Render turned back */
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
}

.notes-dashboard.theme-night .card-back {
  background-color: #1A1B2E !important;
  border-color: #5C6BC0 !important;
}

.card-revealed-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: space-between;
}

.revealed-icon {
  font-size: 44px;
  background-color: var(--primary-coral-light);
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
  margin-bottom: 8px;
}

.notes-dashboard.theme-night .revealed-icon {
  background-color: rgba(92, 107, 192, 0.15);
}

.revealed-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-dark);
}

.notes-dashboard.theme-night .revealed-title {
  color: #FFFFFF;
}

.revealed-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted);
  line-height: 1.5;
  margin: 8px 0;
  text-align: left;
}

.notes-dashboard.theme-night .revealed-text {
  color: #CBD5E1;
}

.btn-read-aloud-note {
  background-color: var(--primary-coral-light);
  color: var(--primary-coral-dark);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  min-height: auto;
  gap: 6px;
  width: 100%;
  border: 2px solid transparent;
  transition: var(--transition-smooth);
}

.btn-read-aloud-note:hover {
  background-color: var(--primary-coral);
  color: #FFFFFF;
  transform: translateY(-1px);
}

.notes-dashboard.theme-night .btn-read-aloud-note {
  background-color: rgba(92, 107, 192, 0.15);
  color: #9FA8DA;
}

.notes-dashboard.theme-night .btn-read-aloud-note:hover {
  background-color: #5C6BC0;
  color: #FFFFFF;
}

/* Shuffle Redraw Button Group */
.cards-action-area {
  margin-top: 36px;
  animation: fadeIn 0.4s ease-out;
}

/* ==========================================================================
   INTERACTIVE MINI WIDGETS
   ========================================================================== */

.notes-special-interactive {
  margin-top: 40px;
  border-top: 2px dashed rgba(255, 111, 97, 0.15);
  padding-top: 32px;
}

.notes-dashboard.theme-night .notes-special-interactive {
  border-top-color: rgba(92, 107, 192, 0.2);
}

/* Water cups progress tracker */
.water-tracker-container {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.04) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 3px dashed var(--accent-teal);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notes-dashboard.theme-night .water-tracker-container {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08) 0%, rgba(26, 27, 46, 0.8) 100%) !important;
}

.water-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  gap: 8px;
}

.water-cups-row {
  display: flex;
  gap: 14px;
  font-size: 32px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 12px 0;
}

.cup-icon {
  opacity: 0.25;
  transition: var(--transition-bounce);
  cursor: pointer;
  user-select: none;
}

.cup-icon.filled {
  opacity: 1;
  transform: scale(1.22) rotate(4deg);
  filter: drop-shadow(0 6px 12px rgba(20, 184, 166, 0.35));
}

.btn-drink {
  background-color: var(--accent-teal);
  color: #FFFFFF;
  padding: 10px 24px;
  border-radius: var(--radius-full);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.25);
  min-height: auto;
}

.btn-drink:hover {
  background-color: #0D9488;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 16px rgba(20, 184, 166, 0.35);
}

/* Sleep alarm reminder */
.sleep-reminder-container {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.04) 0%, rgba(255, 255, 255, 0.8) 100%);
  border: 3px dashed var(--accent-yellow);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.notes-dashboard.theme-night .sleep-reminder-container {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(26, 27, 46, 0.8) 100%) !important;
}

.sleep-clock {
  font-size: 36px;
  font-weight: 800;
  color: var(--accent-yellow);
  font-family: monospace;
  letter-spacing: 2px;
  background-color: #2A2A2A;
  padding: 8px 24px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent-yellow);
  box-shadow: var(--shadow-soft);
  user-select: none;
}

.sleep-warning {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  max-width: 500px;
}

.notes-dashboard.theme-night .sleep-warning {
  color: #FEF3C7;
}

/* Dynamic cap and eyes for Mascot */
.notes-mascot-svg #notes-mascot-nightcap,
.notes-mascot-svg #notes-mascot-nightcap-ball {
  transform-origin: 100px 105px;
  animation: capWiggle 4s ease-in-out infinite;
}

/* Animations declarations */
@keyframes floatCard {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes pulseSymbol {
  0%, 100% { transform: scale(1.0); }
  50% { transform: scale(1.15); }
}

@keyframes capWiggle {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-3deg) translateY(-2px); }
}

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

