/* ==========================================================================
   Aura Fit AI - Stylesheet
   Chủ đạo: Vàng Pastel Gà Con (Chick Pastel Yellow) & Hồng Pastel (Baby Pink)
   ========================================================================== */

:root {
  /* Pastel Chick Yellow Palette */
  --chick-50: #FFFDF5;
  --chick-100: #FFFBEB;
  --chick-200: #FEF9C3;
  --chick-300: #FEF08A;
  --chick-400: #FDE047;
  --chick-500: #FACC15;
  --chick-dark: #CA8A04;

  /* Pastel Baby Pink Palette */
  --pink-50: #FFF5F7;
  --pink-100: #FFF1F2;
  --pink-200: #FCE7F3;
  --pink-300: #FBCFE8;
  --pink-400: #F472B6;
  --pink-500: #FB7185;
  --pink-600: #E11D48;
  --pink-dark: #BE185D;

  /* Neutrals & Text */
  --bg-app: #FFFDF9;
  --bg-card: #FFFFFF;
  --bg-card-subtle: #FFFDF7;
  --text-main: #3F2D30;
  --text-muted: #786166;
  --text-light: #A48D92;
  --border-light: rgba(251, 113, 133, 0.18);
  --border-yellow: rgba(253, 224, 71, 0.35);

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #FEF08A 0%, #FBCFE8 50%, #FDA4AF 100%);
  --grad-pink: linear-gradient(135deg, #FCE7F3 0%, #FB7185 100%);
  --grad-yellow: linear-gradient(135deg, #FFFBEB 0%, #FEF08A 100%);
  --grad-chick-button: linear-gradient(135deg, #FDE047 0%, #FB7185 100%);
  --grad-badge: linear-gradient(135deg, #FEF9C3 0%, #FCE7F3 100%);
  --grad-aura: linear-gradient(135deg, #FDE047 0%, #F472B6 50%, #A78BFA 100%);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(251, 113, 133, 0.08);
  --shadow-md: 0 10px 24px -4px rgba(251, 113, 133, 0.14), 0 4px 10px rgba(250, 204, 21, 0.1);
  --shadow-glow: 0 0 20px rgba(253, 224, 71, 0.45), 0 0 35px rgba(244, 114, 182, 0.25);
  --shadow-float: 0 16px 36px -6px rgba(251, 113, 133, 0.2);

  /* Radii */
  --r-sm: 12px;
  --r-md: 18px;
  --r-lg: 26px;
  --r-full: 9999px;

  /* Dimensions */
  --app-max-width: 480px;
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Quicksand', 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #FDF6EE;
  background-image: 
    radial-gradient(#FDE047 1px, transparent 1px),
    radial-gradient(#FBCFE8 1px, #FDF6EE 1px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 0;
  overflow-x: hidden;
}

/* Desktop App Wrapper vs Fluid */
.app-container {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  background-color: var(--bg-app);
  box-shadow: 0 20px 50px rgba(186, 126, 137, 0.15);
  position: relative;
  display: flex;
  flex-direction: column;
  padding-bottom: 95px; /* space for bottom nav */
  transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-container.full-width-mode {
  max-width: 900px;
}

/* ==========================================================================
   Header & Top Bar
   ========================================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 249, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1.5px solid var(--border-light);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chick-avatar-mini {
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: 2px solid var(--pink-300);
  background: var(--chick-200);
  object-fit: cover;
  box-shadow: 0 3px 10px rgba(244, 114, 182, 0.25);
  animation: gentle-wobble 4s ease-in-out infinite;
  cursor: pointer;
}

.brand-info h1 {
  font-size: 1.15rem;
  font-weight: 800;
  background: linear-gradient(135deg, #EAB308 0%, #FB7185 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
}

.brand-info .tagline {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

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

.icon-btn {
  background: #FFFFFF;
  border: 1.5px solid var(--pink-200);
  border-radius: var(--r-full);
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, background-color 0.2s;
}

.icon-btn:active {
  transform: scale(0.92);
}

.aura-score-pill {
  background: var(--grad-badge);
  border: 1.5px solid var(--chick-300);
  border-radius: var(--r-full);
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #854D0E;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

/* ==========================================================================
   Tab Navigation (Bottom Bar)
   ========================================================================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1.5px solid var(--border-light);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px 14px;
  z-index: 100;
  box-shadow: 0 -4px 20px rgba(251, 113, 133, 0.1);
  transition: max-width 0.3s;
}

.app-container.full-width-mode .bottom-nav {
  max-width: 900px;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--r-md);
  position: relative;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item .nav-icon {
  font-size: 1.35rem;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-item.active {
  color: var(--pink-600);
}

.nav-item.active .nav-icon {
  transform: translateY(-4px) scale(1.15);
}

.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  width: 18px;
  height: 3.5px;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, #FDE047, #FB7185);
}

/* ==========================================================================
   Main Content Views
   ========================================================================== */
.view-section {
  display: none;
  padding: 16px;
  animation: fadeIn 0.3s ease-out;
}

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

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

/* Common Card */
.aura-card {
  background: var(--bg-card);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 16px;
  border: 1.5px solid rgba(251, 113, 133, 0.14);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.aura-card.yellow-tint {
  background: linear-gradient(145deg, #FFFFFF 0%, #FFFBEB 100%);
  border-color: rgba(253, 224, 71, 0.4);
}

.aura-card.pink-tint {
  background: linear-gradient(145deg, #FFFFFF 0%, #FFF5F7 100%);
  border-color: rgba(251, 113, 133, 0.25);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

/* ==========================================================================
   TAB 1: TODAY'S GLOW (HÔM NAY)
   ========================================================================== */
.mascot-hero-card {
  background: linear-gradient(135deg, #FFFBEB 0%, #FCE7F3 60%, #FFE4E6 100%);
  border-radius: var(--r-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 2px solid #FEF08A;
  box-shadow: var(--shadow-float);
  margin-bottom: 18px;
  position: relative;
  overflow: visible;
}

.hero-mascot-img {
  width: 95px;
  height: 95px;
  border-radius: var(--r-full);
  border: 3px solid #FFFFFF;
  box-shadow: 0 8px 20px rgba(251, 113, 133, 0.3);
  object-fit: cover;
  flex-shrink: 0;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: chick-bob 3s ease-in-out infinite;
}

.hero-mascot-img:active {
  transform: scale(0.88) rotate(-6deg);
}

.hero-dialogue {
  flex: 1;
}

.hero-greeting {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--pink-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-quote-bubble {
  background: rgba(255, 255, 255, 0.92);
  border: 1.5px solid var(--pink-200);
  border-radius: var(--r-md);
  padding: 10px 12px;
  margin-top: 6px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  position: relative;
  cursor: pointer;
}

.hero-quote-bubble::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 14px;
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 8px solid rgba(255, 255, 255, 0.92);
}

.touch-hint {
  font-size: 0.68rem;
  color: var(--pink-400);
  margin-top: 4px;
  font-weight: 600;
}

/* Quick Stats Grid */
.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.stat-box {
  background: #FFFFFF;
  border: 1.5px solid var(--border-light);
  border-radius: var(--r-md);
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.stat-box:hover {
  transform: translateY(-2px);
}

.stat-box.yellow-accent {
  border-color: rgba(250, 204, 21, 0.4);
  background: linear-gradient(160deg, #FFFFFF 60%, #FFFBEB 100%);
}

.stat-box.pink-accent {
  border-color: rgba(251, 113, 133, 0.3);
  background: linear-gradient(160deg, #FFFFFF 60%, #FFF5F7 100%);
}

.stat-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-icon {
  font-size: 1.25rem;
}

.stat-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.stat-target {
  font-size: 0.7rem;
  color: var(--text-light);
  font-weight: 600;
}

/* Progress bar inside stat box */
.stat-progress-bar {
  width: 100%;
  height: 6px;
  background: #F3E8E8;
  border-radius: var(--r-full);
  overflow: hidden;
  margin-top: 4px;
}

.stat-progress-fill {
  height: 100%;
  border-radius: var(--r-full);
  background: linear-gradient(90deg, #FDE047, #FB7185);
  transition: width 0.4s ease;
}

/* Water Tracker Card */
.water-tracker-card {
  background: linear-gradient(145deg, #FFFFFF 0%, #F0F9FF 100%);
  border: 1.5px solid #BAE6FD;
}

.water-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.water-glasses-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 12px 0;
}

.water-glass-btn {
  width: 38px;
  height: 48px;
  border-radius: 8px 8px 12px 12px;
  border: 2px solid #7DD3FC;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 2px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.water-glass-btn.filled {
  border-color: #38BDF8;
}

.water-glass-btn.filled .water-liquid {
  height: 80%;
  background: linear-gradient(180deg, #7DD3FC 0%, #0284C7 100%);
}

.water-glass-btn:active {
  transform: scale(0.9);
}

.water-liquid {
  width: 100%;
  height: 0%;
  border-radius: 0 0 8px 8px;
  transition: height 0.3s ease;
}

.water-glass-btn span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.68rem;
  font-weight: 700;
  color: #0369A1;
  pointer-events: none;
}

.water-btn-group {
  display: flex;
  gap: 8px;
}

.water-action-btn {
  background: #FFFFFF;
  border: 1.5px solid #7DD3FC;
  color: #0284C7;
  padding: 6px 14px;
  border-radius: var(--r-full);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}

.water-action-btn:hover {
  background: #E0F2FE;
}

.water-action-btn:active {
  transform: scale(0.93);
}

/* Daily Aura Quest */
.quest-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #FFFFFF;
  border: 1.5px solid rgba(251, 113, 133, 0.15);
  border-radius: var(--r-md);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.quest-item:hover {
  border-color: var(--pink-300);
}

.quest-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quest-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  border: 2px solid var(--pink-300);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: bold;
  color: #FFFFFF;
  background: #FFFFFF;
  transition: all 0.2s;
}

.quest-item.completed .quest-checkbox {
  background: var(--pink-500);
  border-color: var(--pink-500);
}

.quest-item.completed .quest-text {
  text-decoration: line-through;
  color: var(--text-light);
}

.quest-text {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-main);
}

.quest-reward {
  font-size: 0.75rem;
  font-weight: 700;
  color: #D97706;
  background: #FEF9C3;
  padding: 3px 8px;
  border-radius: var(--r-full);
}

/* ==========================================================================
   TAB 2: AI AURA SCAN (QUÉT THỂ VÓC & HÀO QUANG)
   ========================================================================== */
.scanner-banner {
  text-align: center;
  padding: 18px 12px;
  background: linear-gradient(135deg, #FEF9C3 0%, #FCE7F3 50%, #FED7AA 100%);
  border-radius: var(--r-lg);
  margin-bottom: 18px;
  border: 2px solid #FDE047;
}

.scanner-banner h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #831843;
  margin-bottom: 4px;
}

.scanner-banner p {
  font-size: 0.82rem;
  color: #9D174D;
  font-weight: 600;
}

.form-group-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: block;
}

.cute-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--pink-200);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-main);
  background: #FFFDF9;
  outline: none;
  transition: all 0.2s;
}

.cute-input:focus {
  border-color: var(--pink-400);
  box-shadow: 0 0 0 3px rgba(244, 114, 182, 0.2);
  background: #FFFFFF;
}

/* Body Shape Options */
.body-shape-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.shape-card-opt {
  border: 2px solid var(--border-light);
  border-radius: var(--r-md);
  background: #FFFFFF;
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.shape-card-opt .shape-emoji {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 4px;
}

.shape-card-opt .shape-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.shape-card-opt.selected {
  border-color: var(--pink-500);
  background: var(--pink-50);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(251, 113, 133, 0.25);
}

.shape-card-opt.selected .shape-name {
  color: var(--pink-600);
  font-weight: 800;
}

/* Goal Chips */
.goal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.goal-chip {
  padding: 8px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--pink-200);
  background: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.goal-chip.selected {
  background: var(--grad-chick-button);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: var(--shadow-button);
}

/* Action Scan Button */
.btn-scan-aura {
  width: 100%;
  padding: 14px 20px;
  border: none;
  border-radius: var(--r-full);
  background: linear-gradient(135deg, #FDE047 0%, #F472B6 50%, #FB7185 100%);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(244, 114, 182, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-scan-aura:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(244, 114, 182, 0.45);
}

.btn-scan-aura:active {
  transform: scale(0.96);
}

/* Scan Animation Modal / Box */
.scan-result-card {
  display: none;
  background: #FFFFFF;
  border: 2px solid var(--pink-300);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-top: 18px;
  box-shadow: var(--shadow-float);
  animation: popIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.aura-halo-display {
  text-align: center;
  padding: 20px 10px;
  position: relative;
}

.aura-halo-glow {
  width: 110px;
  height: 110px;
  margin: 0 auto 12px;
  border-radius: var(--r-full);
  background: radial-gradient(circle, #FEF08A 20%, #FBCFE8 60%, rgba(244, 114, 182, 0) 80%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  animation: aura-pulse 2.5s ease-in-out infinite;
}

@keyframes aura-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 25px rgba(253, 224, 71, 0.6); }
  50% { transform: scale(1.08); box-shadow: 0 0 45px rgba(244, 114, 182, 0.6); }
}

.aura-color-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--pink-600);
}

.aura-color-desc {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 4px;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 16px 0;
}

.metric-pill {
  background: var(--pink-50);
  border: 1px solid var(--pink-200);
  border-radius: var(--r-md);
  padding: 8px 6px;
  text-align: center;
}

.metric-pill .label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.metric-pill .val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--pink-600);
}

/* ==========================================================================
   TAB 3: WORKOUT & TIMER (TẬP LUYỆN)
   ========================================================================== */
.workout-category-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.workout-category-tabs::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  padding: 7px 14px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border-light);
  background: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.cat-chip.active {
  background: var(--pink-200);
  border-color: var(--pink-400);
  color: var(--pink-600);
}

/* Workout Cards */
.workout-card {
  background: #FFFFFF;
  border-radius: var(--r-lg);
  padding: 14px;
  margin-bottom: 12px;
  border: 1.5px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.workout-card:hover {
  transform: translateY(-3px);
  border-color: var(--pink-300);
  box-shadow: var(--shadow-md);
}

.workout-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-md);
  background: var(--grad-badge);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  flex-shrink: 0;
  border: 1.5px solid var(--chick-300);
}

.workout-details {
  flex: 1;
}

.workout-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
}

.workout-meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.workout-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--r-full);
  background: #FFFBEB;
  color: #B45309;
  font-weight: 700;
  display: inline-block;
  margin-top: 4px;
}

.workout-play-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--grad-chick-button);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

/* Workout Player Modal (Full screen overlay) */
.player-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 30, 35, 0.6);
  backdrop-filter: blur(8px);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 16px;
}

.player-modal.active {
  display: flex;
}

.player-content {
  background: #FFFFFF;
  width: 100%;
  max-width: 440px;
  border-radius: var(--r-lg);
  padding: 24px;
  border: 3px solid var(--chick-300);
  box-shadow: 0 25px 60px rgba(0,0,0,0.25);
  text-align: center;
  position: relative;
  animation: popIn 0.3s ease;
}

.player-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: #F3F4F6;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: var(--r-full);
  cursor: pointer;
  font-weight: bold;
}

/* Circular Timer */
.circular-timer-container {
  width: 180px;
  height: 180px;
  margin: 16px auto;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-svg {
  transform: rotate(-90deg);
  width: 100%;
  height: 100%;
}

.timer-bg-circle {
  fill: none;
  stroke: #FCE7F3;
  stroke-width: 10;
}

.timer-progress-circle {
  fill: none;
  stroke: url(#timerGradient);
  stroke-width: 10;
  stroke-linecap: round;
  transition: stroke-dashoffset 1s linear;
}

.timer-number-display {
  position: absolute;
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--pink-600);
}

.timer-number-display span {
  font-size: 0.9rem;
  display: block;
  color: var(--text-muted);
  font-weight: 600;
}

.exercise-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.exercise-guide {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.45;
  background: #FFFDF9;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px dashed var(--pink-200);
  margin-bottom: 18px;
}

.player-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.btn-ctrl {
  padding: 10px 22px;
  border-radius: var(--r-full);
  border: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-ctrl.primary {
  background: var(--grad-chick-button);
  color: #FFFFFF;
  box-shadow: var(--shadow-button);
}

.btn-ctrl.secondary {
  background: #F3F4F6;
  color: var(--text-main);
}

/* ==========================================================================
   TAB 4: NUTRITION & DETOX (DINH DƯỠNG)
   ========================================================================== */
.nutrition-summary-card {
  background: linear-gradient(135deg, #FFFBEB 0%, #FFF1F2 100%);
  border: 1.5px solid var(--pink-200);
}

.macro-bars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}

.macro-box {
  background: #FFFFFF;
  border-radius: var(--r-md);
  padding: 10px 8px;
  text-align: center;
  border: 1px solid var(--border-light);
}

.macro-box .m-name {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}

.macro-box .m-val {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 2px 0;
}

.macro-box .m-bar {
  height: 4px;
  border-radius: var(--r-full);
  background: #E5E7EB;
  overflow: hidden;
}

.macro-box .m-fill {
  height: 100%;
}

.fill-carb { background: #FBBF24; }
.fill-pro { background: #F472B6; }
.fill-fat { background: #34D399; }

/* Detox Water Carousel / Cards */
.detox-recipe-card {
  background: #FFFFFF;
  border-radius: var(--r-lg);
  padding: 14px;
  border: 1.5px solid var(--border-light);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.detox-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.detox-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-md);
  background: #FEF9C3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border: 1.5px solid #FDE047;
}

.detox-title {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-main);
}

.detox-benefit {
  font-size: 0.76rem;
  font-weight: 600;
  color: #059669;
  background: #ECFDF5;
  padding: 2px 8px;
  border-radius: var(--r-full);
  display: inline-block;
  margin-top: 3px;
}

.detox-ingredients {
  margin-top: 10px;
  font-size: 0.8rem;
  color: var(--text-muted);
  background: #FFFDF9;
  padding: 8px 12px;
  border-radius: var(--r-sm);
  border-left: 3px solid var(--pink-400);
}

/* ==========================================================================
   TAB 5: AI CHAT COACH (GÀ CON PIYO AI)
   ========================================================================== */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 190px);
  min-height: 450px;
}

.chat-header-coach {
  background: linear-gradient(135deg, #FFFBEB 0%, #FCE7F3 100%);
  border-radius: var(--r-md);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #FEF08A;
  margin-bottom: 10px;
}

.chat-coach-avatar {
  width: 42px;
  height: 42px;
  border-radius: var(--r-full);
  border: 2px solid #FFFFFF;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.coach-status-dot {
  width: 8px;
  height: 8px;
  background: #22C55E;
  border-radius: var(--r-full);
  display: inline-block;
  margin-right: 4px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 10px 4px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 86%;
  animation: fadeIn 0.25s ease;
}

.chat-msg.bot {
  align-self: flex-start;
}

.chat-msg.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.msg-bubble {
  padding: 11px 15px;
  border-radius: 18px;
  font-size: 0.88rem;
  line-height: 1.48;
  box-shadow: var(--shadow-sm);
}

.chat-msg.bot .msg-bubble {
  background: #FFFFFF;
  color: var(--text-main);
  border: 1.5px solid var(--pink-200);
  border-bottom-left-radius: 4px;
}

.chat-msg.user .msg-bubble {
  background: linear-gradient(135deg, #FDE047 0%, #FB7185 100%);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
  font-weight: 600;
}

/* Quick prompt chips */
.quick-prompt-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 8px 2px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.quick-prompt-bar::-webkit-scrollbar {
  display: none;
}

.quick-chip {
  padding: 6px 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--pink-300);
  background: #FFFFFF;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--pink-600);
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s;
}

.quick-chip:hover {
  background: var(--pink-100);
}

.quick-chip:active {
  transform: scale(0.94);
}

/* Chat Input Bar */
.chat-input-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  background: #FFFFFF;
  border: 2px solid var(--pink-200);
  border-radius: var(--r-full);
  padding: 5px 6px 5px 14px;
  box-shadow: var(--shadow-sm);
}

.chat-input-field {
  flex: 1;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  background: transparent;
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--r-full);
  border: none;
  background: var(--grad-chick-button);
  color: #FFFFFF;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s;
}

.chat-send-btn:active {
  transform: scale(0.9);
}

/* ==========================================================================
   TAB 6: SETTINGS & PROFILE (CÀI ĐẶT)
   ========================================================================== */
.profile-hero {
  text-align: center;
  padding: 20px 10px;
  margin-bottom: 16px;
}

.profile-avatar-large {
  width: 100px;
  height: 100px;
  border-radius: var(--r-full);
  border: 3.5px solid var(--pink-400);
  object-fit: cover;
  box-shadow: var(--shadow-float);
  margin-bottom: 10px;
}

.profile-name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
}

.profile-badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: var(--r-full);
  background: var(--grad-badge);
  font-size: 0.78rem;
  font-weight: 700;
  color: #854D0E;
  margin-top: 4px;
  border: 1.5px solid var(--chick-300);
}

.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(251, 113, 133, 0.12);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-info h4 {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
}

.setting-info p {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* Switch toggle */
.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #E2E8F0;
  border-radius: var(--r-full);
  transition: 0.3s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background: linear-gradient(90deg, #FDE047, #FB7185);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes chick-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes gentle-wobble {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(-4deg); }
  75% { transform: rotate(4deg); }
}

/* Responsive for Mobile */
@media (max-width: 480px) {
  body {
    background-image: none;
    background-color: var(--bg-app);
  }
  .app-container {
    box-shadow: none;
    max-width: 100% !important;
  }
  .bottom-nav {
    max-width: 100% !important;
  }
}
