/* ==========================================================================
   HM WORKOUT - ULTRA-LUXURY PROFESSIONAL DESIGN SYSTEM
   Typography: Google Fonts 'Space Grotesk' (Headings) & 'Plus Jakarta Sans' (Body)
   Aesthetic: All-Light Luxury Pearl, Precision GIF Alignment & Fit
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@500;600;700&display=swap');

:root {
  /* Light Luxury Color Palette */
  --bg-light: #faf8f5;
  --bg-card: rgba(255, 255, 255, 0.95);
  --bg-glass: rgba(255, 255, 255, 0.88);
  --border-glass: rgba(217, 119, 6, 0.2);
  --border-subtle: rgba(226, 232, 240, 0.85);
  
  --gold: #d97706;
  --gold-dark: #b45309;
  --gold-light: #f59e0b;
  --gold-glow: rgba(217, 119, 6, 0.22);

  --primary: #0284c7;
  --primary-glow: rgba(2, 132, 199, 0.2);
  --accent: #059669;
  --accent-glow: rgba(5, 150, 105, 0.2);
  --warning: #d97706;
  --danger: #dc2626;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #64748b;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.07);
  --shadow-lg: 0 20px 40px rgba(217, 119, 6, 0.1);

  --transition-fast: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  padding-bottom: 90px;
  background-image: 
    radial-gradient(circle at 10% 10%, rgba(245, 158, 11, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(2, 132, 199, 0.06) 0%, transparent 40%),
    radial-gradient(circle at 50% 40%, rgba(5, 150, 105, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
  letter-spacing: -0.011em;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

/* Light Glassmorphism Panels */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.35rem;
  box-shadow: var(--shadow-md);
}

.glass-panel-gold {
  background: linear-gradient(135deg, rgba(254, 243, 199, 0.6) 0%, rgba(224, 242, 254, 0.5) 100%);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 119, 6, 0.3);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
}

/* Header & Top Bar */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(217, 119, 6, 0.15);
  padding: 0.85rem 1.25rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

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

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo .logo-icon {
  font-size: 1.9rem;
}

.luxury-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #b45309 0%, #0284c7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.domain-dot {
  color: var(--accent);
  -webkit-text-fill-color: var(--accent);
}

.user-tag-gold {
  background: rgba(217, 119, 6, 0.1);
  border: 1px solid rgba(217, 119, 6, 0.35);
  color: var(--gold-dark);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
}

/* Hero Banner & Progress Ring */
.hero-banner {
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-text {
  flex: 1;
  min-width: 280px;
}

.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.25);
}

.hero-text h2 {
  font-size: 1.5rem;
  margin-bottom: 0.4rem;
  color: #0f172a;
}

.hero-text p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.hero-stats {
  min-width: 220px;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat-value {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--gold-dark);
}

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

.progress-bar-track {
  width: 100%;
  height: 9px;
  background: rgba(226, 232, 240, 0.8);
  border-radius: var(--radius-full);
  margin-top: 0.6rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #d97706 0%, #059669 100%);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

/* Main Layout Container */
.main-container {
  max-width: 1200px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

/* Navigation Tabs */
.app-nav {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
  scrollbar-width: none;
}

.app-nav::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  flex: 1;
  min-width: 120px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 0.75rem 1rem;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
  text-align: center;
}

.nav-tab:hover {
  color: var(--gold-dark);
  background: rgba(245, 158, 11, 0.08);
}

.nav-tab.active {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 6px 18px var(--gold-glow);
}

/* View Sections */
.view-section {
  display: none;
  animation: fadeIn 0.35s ease;
}

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

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

/* Week Filters */
.week-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
}

.week-btn {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-fast);
}

.week-btn.active, .week-btn:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 4px 14px var(--primary-glow);
}

/* 28-Day Cards Grid */
.day-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.day-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.day-card:hover {
  transform: translateY(-5px);
  border-color: var(--gold);
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.15);
}

.day-card.selected {
  border: 2px solid var(--gold);
  background: rgba(254, 243, 199, 0.4);
}

.day-card.completed {
  border-color: var(--accent);
}

.day-card.completed::after {
  content: '✓ DONE';
  position: absolute;
  top: 10px;
  right: -25px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 25px;
  transform: rotate(45deg);
}

.day-card.rest-day {
  background: #f8fafc;
  opacity: 0.9;
}

.day-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.day-badge {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--gold-dark);
}

.intensity-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(226, 232, 240, 0.6);
  color: var(--text-muted);
  font-weight: 600;
}

.day-card-title {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #0f172a;
}

.day-card-focus {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.day-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(226, 232, 240, 0.8);
}

/* Custom Checkbox */
.checkbox-container {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-container input {
  display: none;
}

.checkmark {
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  display: inline-block;
  position: relative;
  background: #fff;
  transition: var(--transition-fast);
}

.checkbox-container input:checked + .checkmark {
  background: var(--accent);
  border-color: var(--accent);
}

.checkbox-container input:checked + .checkmark::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-decoration: none;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px var(--gold-glow);
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.35);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  background: #0369a1;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px var(--accent-glow);
}

.btn-outline {
  background: #fff;
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
}

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

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.btn-xs {
  padding: 0.25rem 0.6rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* Day Detail Section */
.detail-header-card {
  margin-bottom: 1.5rem;
}

.detail-title-group {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.week-tag {
  font-size: 0.8rem;
  color: var(--gold-dark);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-day-title {
  font-size: 1.5rem;
  margin: 0.2rem 0;
  color: #0f172a;
}

.detail-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.detail-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Section Cards & Exercise Grids */
.section-card {
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.sub-badge {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.section-diabetes-note {
  font-size: 0.85rem;
  color: #0284c7;
  font-weight: 600;
  margin-bottom: 1rem;
}

.exercise-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.exercise-mini-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.exercise-mini-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(217, 119, 6, 0.15);
}

/* PERFECT IMAGE FIT & ALIGNMENT CONTAINERS */
.ex-photo-wrap {
  position: relative;
  width: 100%;
  height: 230px;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.ex-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  padding: 0.4rem;
  transition: transform 0.4s ease;
}

.exercise-mini-card:hover .ex-photo-img {
  transform: scale(1.03);
}

.motion-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  z-index: 2;
}

.ex-mini-content {
  padding: 1rem;
  flex: 1;
}

.ex-cat-tag {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
  text-transform: uppercase;
}

.ex-mini-content h5 {
  font-size: 1.05rem;
  margin: 0.3rem 0;
  color: #0f172a;
}

.ex-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: #0284c7;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.ex-desc-short {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

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

/* Cardio Subblock with Photo */
.cardio-subblock {
  background: rgba(224, 242, 254, 0.5);
  border: 1px dashed rgba(2, 132, 199, 0.3);
  padding: 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
  flex-wrap: wrap;
}

.cardio-photo-wrap {
  position: relative;
  width: 260px;
  height: 180px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cardio-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

.cardio-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.5rem;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.rest-banner {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.rest-banner h3 {
  font-size: 1.5rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.rest-tips {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.tip-box {
  background: rgba(241, 245, 249, 0.8);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 1rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-main);
}

/* Full Exercise Directory Cards */
.exercise-full-card {
  margin-bottom: 1.5rem;
}

.ex-card-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

.ex-photo-wrap-large {
  position: relative;
  width: 100%;
  max-width: 650px;
  height: 320px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ex-photo-img-large {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.5rem;
}

.motion-badge-large {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border: 1px solid var(--gold);
  color: var(--gold-dark);
  font-size: 0.85rem;
  font-weight: 800;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-full);
}

.ex-target {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.ex-card-body {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.meta-row {
  display: flex;
  gap: 1.5rem;
  margin: 0.75rem 0;
  font-weight: 700;
  color: var(--primary);
}

.diabetes-safety-alert {
  background: rgba(254, 243, 199, 0.8);
  border-left: 4px solid var(--warning);
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: #78350f;
  font-weight: 600;
}

/* Kerala Diet Photo Cards */
.meal-card-photo {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  background: #ffffff;
}

.meal-photo-wrap {
  width: 240px;
  height: 160px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
}

.meal-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.meal-content-wrap {
  flex: 1;
  min-width: 250px;
}

.diet-hero {
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.7) 0%, rgba(254, 243, 199, 0.7) 100%);
  border-color: rgba(5, 150, 105, 0.3);
}

.diet-intro {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.rule-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  border-radius: var(--radius-md);
}

.rule-card h4 {
  color: var(--gold-dark);
  font-size: 0.95rem;
  margin-bottom: 0.4rem;
}

.rule-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.meal-timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.meal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.4rem;
}

.meal-time {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary);
}

.meal-body ul {
  list-style: none;
  margin: 0.5rem 0;
}

.meal-body li {
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.meal-diabetes-note {
  font-size: 0.8rem;
  color: #0284c7;
  font-weight: 600;
  margin-top: 0.5rem;
}

.timing-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.timing-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  padding: 0.85rem;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

/* Blood Sugar Tracker */
.bs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

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

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  color: #0f172a;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.95rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.bs-log-card {
  background: #ffffff;
  border-left: 4px solid #64748b;
  border-radius: var(--radius-sm);
  padding: 0.85rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-sm);
}

.bs-log-card.bs-normal {
  border-left-color: var(--accent);
}

.bs-log-card.bs-low {
  border-left-color: var(--warning);
  background: rgba(254, 243, 199, 0.4);
}

.bs-log-card.bs-high {
  border-left-color: var(--danger);
  background: rgba(254, 226, 226, 0.4);
}

.bs-log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.bs-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: #0f172a;
}

.bs-type-badge {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-full);
  background: rgba(226, 232, 240, 0.8);
  font-weight: 700;
}

.bs-date {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.bs-message {
  font-size: 0.85rem;
}

/* Timer Modal Overlay & Animated GIF Box */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
}

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

.timer-card {
  width: 90%;
  max-width: 500px;
  text-align: center;
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 1.75rem 1.5rem;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 15px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.75rem;
  cursor: pointer;
}

/* Timer GIF Demonstration Box - Perfect Fit & Alignment */
.timer-gif-wrap {
  width: 100%;
  height: 240px;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: 0.85rem 0;
  background: #ffffff;
  border: 2px solid var(--gold);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.timer-gif-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.4rem;
}

.timer-circle {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 5px solid var(--gold);
  margin: 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 20px var(--gold-glow);
  background: #faf8f5;
}

.timer-display-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--gold-dark);
  letter-spacing: 2px;
}

.timer-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}

/* Mobile Sticky Bottom Navigation Bar */
@media (max-width: 640px) {
  .app-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    margin-bottom: 0;
    border-radius: 0;
    border-top: 1px solid var(--border-subtle);
    z-index: 99;
    padding: 0.5rem;
    justify-content: space-around;
  }
  
  .nav-tab {
    min-width: auto;
    font-size: 0.75rem;
    padding: 0.5rem 0.2rem;
  }

  .detail-title-group {
    flex-direction: column;
  }

  .detail-actions {
    width: 100%;
  }

  .detail-actions .btn {
    width: 100%;
  }

  .cardio-photo-wrap, .meal-photo-wrap {
    width: 100%;
    height: 160px;
  }

  .ex-photo-wrap {
    height: 190px;
  }

  .timer-gif-wrap {
    height: 180px;
  }
}
