/* ==========================================================================
   MILLET CHALLENGE PORTAL - PREMIUM DESIGN SYSTEM (VANILLA CSS)
   Theme: Earthy Natural Premium (Sage Green, Oats, Sand, Gold, Slate Forest)
   ========================================================================== */

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

:root {
  /* Color Palette (Light Mode Default) */
  --bg-primary: hsl(38, 30%, 96%);
  --bg-secondary: hsl(40, 25%, 98%);
  --card-bg: hsla(0, 0%, 100%, 0.75);
  --card-border: hsla(135, 15%, 80%, 0.5);
  
  --primary: hsl(135, 28%, 38%);       /* Sage Green */
  --primary-light: hsl(135, 25%, 88%);
  --primary-dark: hsl(135, 30%, 20%);
  --accent: hsl(38, 85%, 52%);         /* Millet Gold */
  --accent-light: hsl(38, 90%, 94%);
  --text-main: hsl(135, 30%, 15%);
  --text-muted: hsl(135, 10%, 45%);
  --white: #ffffff;
  
  /* Status Colors */
  --success: hsl(145, 60%, 35%);
  --success-bg: hsl(145, 50%, 93%);
  --warning: hsl(35, 90%, 45%);
  --danger: hsl(0, 75%, 50%);
  --danger-bg: hsl(0, 80%, 95%);
  
  /* Shadow & Blur System */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 10px 15px -3px rgba(34, 54, 40, 0.05), 0 4px 6px -2px rgba(34, 54, 40, 0.03);
  --shadow-lg: 0 20px 25px -5px rgba(34, 54, 40, 0.08), 0 10px 10px -5px rgba(34, 54, 40, 0.04);
  --glass-blur: blur(16px);
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Theme Variables */
[data-theme="dark"] {
  --bg-primary: hsl(140, 24%, 6%);
  --bg-secondary: hsl(140, 20%, 9%);
  --card-bg: hsla(140, 15%, 10%, 0.7);
  --card-border: hsla(135, 15%, 20%, 0.6);
  
  --primary: hsl(135, 25%, 50%);
  --primary-light: hsl(135, 20%, 16%);
  --primary-dark: hsl(135, 25%, 70%);
  --accent: hsl(38, 85%, 55%);
  --accent-light: hsl(38, 20%, 14%);
  --text-main: hsl(42, 20%, 90%);
  --text-muted: hsl(135, 8%, 65%);
  
  --success: hsl(145, 60%, 45%);
  --success-bg: hsl(145, 30%, 12%);
  --danger: hsl(0, 75%, 60%);
  --danger-bg: hsl(0, 30%, 12%);
  
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.4);
}

/* Base Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  transition: var(--transition);
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--text-main);
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--primary-light);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* ==========================================================================
   LAYOUT: Header & Floating Navigation
   ========================================================================== */

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--card-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--card-border);
  transition: var(--transition);
  padding: 1rem 2rem;
}

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

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

.logo-icon {
  font-size: 2rem;
  animation: pulse-slow 3s infinite ease-in-out;
}

.logo-text h1 {
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.logo-text p {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.35rem;
  border-radius: 30px;
  border: 1px solid var(--card-border);
}

.nav-btn {
  padding: 0.6rem 1.2rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.nav-btn:hover {
  color: var(--primary);
}

.nav-btn.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-main);
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: rotate(15deg) scale(1.05);
  background: var(--primary-light);
  color: var(--primary);
}

/* Main Layout Wrapper */
main {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 0 1.5rem 5rem;
}

.tab-content {
  display: none;
  animation: fade-in 0.4s ease-out forwards;
}

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

/* ==========================================================================
   COMPONENT: Dashboard & Daily Stepper
   ========================================================================== */

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  color: var(--white);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, hsla(38, 85%, 52%, 0.15) 0%, transparent 60%);
  pointer-events: none;
}

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

.welcome-info h2 {
  font-size: 2.2rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.welcome-info p {
  color: var(--primary-light);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.welcome-stats {
  display: flex;
  gap: 1.5rem;
}

.welcome-stat-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.welcome-stat-card .stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary-light);
}

.welcome-stat-card .stat-val {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
}

.progress-widget {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.progress-ring-container {
  position: relative;
  width: 70px;
  height: 70px;
}

.progress-ring-circle {
  transition: stroke-dashoffset 0.35s;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
}

.progress-ring-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--white);
}

/* Stepper Controller */
.stepper-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  gap: 1rem;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  position: relative;
  flex: 1;
  min-width: 70px;
}

.step-node {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition);
  position: relative;
  z-index: 2;
}

.step-item::after {
  content: '';
  position: absolute;
  top: 22px;
  left: calc(50% + 22px);
  right: calc(-50% + 22px);
  height: 2px;
  background: var(--card-border);
  z-index: 1;
}

.step-item:last-child::after {
  display: none;
}

.step-item:hover .step-node {
  transform: scale(1.1);
  border-color: var(--primary);
  color: var(--primary);
}

.step-item.active .step-node {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 0 0 4px var(--primary-light);
}

.step-item.completed .step-node {
  background: var(--success);
  border-color: var(--success);
  color: var(--white);
}

.step-item.completed::after {
  background: var(--success);
}

.step-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  transition: var(--transition);
}

.step-item.active .step-label {
  color: var(--primary);
  font-weight: 700;
}

/* Daily Details Dashboard Card */
.challenge-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}

.challenge-media {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-sm);
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.challenge-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition);
  cursor: zoom-in;
}

.challenge-media:hover .challenge-image {
  transform: scale(1.02);
}

.media-overlay-zoom {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.6);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0;
  transition: var(--transition);
  pointer-events: none;
}

.challenge-media:hover .media-overlay-zoom {
  opacity: 1;
}

.challenge-details-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.day-badge {
  align-self: flex-start;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: 1px solid rgba(245, 158, 11, 0.2);
  margin-bottom: 1rem;
}

.challenge-title {
  font-size: 2rem;
  line-height: 1.25;
  margin-bottom: 1rem;
  color: var(--text-main);
}

.challenge-desc {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 1.5rem;
}

.millet-day-info {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.millet-day-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--card-border);
}

.millet-day-info-row:last-child {
  border-bottom: none;
}

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

.info-val {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
}

.challenge-action-box {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.challenge-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.challenge-checkbox {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.8rem;
  transition: var(--transition);
}

.real-checkbox {
  display: none;
}

.real-checkbox:checked + .challenge-checkbox {
  background: var(--success);
  border-color: var(--success);
}

.real-checkbox:checked + .challenge-checkbox::before {
  content: '✓';
  font-weight: 900;
}

.action-buttons {
  display: flex;
  gap: 1rem;
}

.btn-primary {
  flex: 1;
  background: var(--primary);
  color: var(--white);
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  color: var(--text-main);
  padding: 0.8rem 1.2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-secondary:hover {
  background: var(--primary-light);
  color: var(--primary);
}

/* ==========================================================================
   COMPONENT: Leaderboard & Participant Tracker
   ========================================================================== */

.tracker-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.tracker-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.search-filter-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 600px;
}

.search-input-wrapper {
  position: relative;
  flex: 1;
}

.search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.search-icon-svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.filter-btn-group {
  display: flex;
  gap: 0.5rem;
  background: var(--bg-secondary);
  padding: 0.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
}

.filter-pill {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: var(--transition);
}

.filter-pill:hover {
  color: var(--primary);
}

.filter-pill.active {
  background: var(--primary);
  color: var(--white);
}

/* Participant Grid List */
.participant-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.participant-card {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 180px;
}

.participant-card:hover {
  transform: translateY(-4px);
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

.card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.avatar-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--card-border);
}

.rank-badge {
  font-size: 0.7rem;
  font-weight: 700;
  background: var(--accent-light);
  color: var(--accent);
  padding: 0.2rem 0.5rem;
  border-radius: 10px;
}

.p-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.p-email {
  font-size: 0.75rem;
  color: var(--text-muted);
  word-break: break-all;
  margin-bottom: 1rem;
}

.progress-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-track-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track-val {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--primary);
}

.progress-bar-outer {
  width: 100%;
  height: 6px;
  background: var(--card-border);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar-inner {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 3px;
  transition: width 0.8s ease-out;
}

.bubble-timeline {
  display: flex;
  gap: 4px;
}

.bubble-day {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card-border);
  border: 1px solid var(--card-border);
  position: relative;
  cursor: help;
}

.bubble-day.logged {
  background: var(--success);
  border-color: var(--success);
}

.bubble-day.empty {
  background: var(--bg-primary);
}

/* Tooltip */
.bubble-day::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) scale(0.85);
  background: var(--text-main);
  color: var(--white);
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.bubble-day:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}

/* Participant Detail Slide Drawer / Modal */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  animation: fade-in 0.3s ease-out forwards;
}

.drawer {
  position: fixed;
  top: 0;
  right: -450px;
  width: 450px;
  height: 100vh;
  background: var(--bg-secondary);
  border-left: 1px solid var(--card-border);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 2.5rem;
}

.drawer.open {
  right: 0;
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.close-drawer-btn {
  font-size: 1.5rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.close-drawer-btn:hover {
  color: var(--danger);
  transform: rotate(90deg);
}

.drawer-content {
  overflow-y: auto;
  flex: 1;
}

.meal-log-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.meal-log-day-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
}

.meal-day-num {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}

.meal-type-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.meal-type-item:last-child {
  margin-bottom: 0;
}

.meal-emoji {
  font-size: 1.1rem;
}

.meal-desc {
  font-size: 0.9rem;
}

.meal-desc.na {
  color: var(--text-muted);
  font-style: italic;
}

/* ==========================================================================
   COMPONENT: Millet Encyclopedia
   ========================================================================== */

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

.millet-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.millet-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: var(--primary);
  box-shadow: var(--shadow-lg);
}

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

.millet-emoji-icon {
  font-size: 2.2rem;
  background: var(--primary-light);
  width: 55px;
  height: 55px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--card-border);
}

.gi-tag {
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.millet-card h3 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
}

.millet-languages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: var(--bg-secondary);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.25rem;
  border: 1px solid var(--card-border);
}

.lang-row {
  font-size: 0.75rem;
}

.lang-lbl {
  color: var(--text-muted);
  font-weight: 600;
}

.lang-val {
  font-weight: 700;
  color: var(--text-main);
}

.millet-fact {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  flex: 1;
}

.millet-nutrients-row {
  margin-bottom: 1rem;
}

.nutrient-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.nutrient-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.nutrient-pill {
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
}

.millet-card-action {
  width: 100%;
  text-align: center;
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid var(--card-border);
  transition: var(--transition);
  margin-top: 1rem;
}

.millet-card:hover .millet-card-action {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ==========================================================================
   COMPONENT: Health & BMI Utilities
   ========================================================================== */

.utilities-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
}

.utility-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.utility-card h3 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* BMI Calculator */
.bmi-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-input {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--card-border);
  background: var(--bg-secondary);
  color: var(--text-main);
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
  outline: none;
}

.bmi-result-box {
  margin-top: 1.5rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  border: 1px solid var(--card-border);
  display: none;
  animation: fade-in 0.3s ease-out forwards;
}

.bmi-result-box.active {
  display: block;
}

.bmi-score-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.bmi-score-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
}

.bmi-score-status {
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.3rem 0.8rem;
  border-radius: 12px;
}

.bmi-score-status.normal {
  background: var(--success-bg);
  color: var(--success);
}

.bmi-score-status.warning {
  background: var(--accent-light);
  color: var(--warning);
}

.bmi-score-status.danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.bmi-recommendation {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-top: 1px dashed var(--card-border);
  padding-top: 1rem;
}

/* Hydration Tracker */
.hydration-widget {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.water-cup-outer {
  position: relative;
  width: 140px;
  height: 180px;
  border: 6px solid var(--text-main);
  border-top: none;
  border-radius: 0 0 20px 20px;
  background: rgba(255, 255, 255, 0.05);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.water-cup-fill {
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, hsl(195, 80%, 65%) 0%, hsl(200, 85%, 50%) 100%);
  transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.water-cup-fill::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  width: 100%;
  height: 24px;
  background: hsl(195, 80%, 65%);
  border-radius: 50%;
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.4);
  animation: wave 2s infinite ease-in-out;
}

.water-target-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text-main);
  mix-blend-mode: difference;
  z-index: 10;
  pointer-events: none;
}

.water-controls-row {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.water-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-secondary);
  border: 2px solid var(--card-border);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.water-btn:hover {
  transform: scale(1.1);
  background: var(--primary-light);
  color: var(--primary);
  border-color: var(--primary);
}

.water-stats-lbl {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ==========================================================================
   INTERACTIVE UTILITIES: Image Zoom Modal & Confetti
   ========================================================================== */

.zoom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fade-in 0.3s ease-out forwards;
}

.zoom-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.zoom-modal-img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 85vh;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
  object-fit: contain;
}

.close-zoom-btn {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--white);
  font-size: 2rem;
  transition: var(--transition);
}

.close-zoom-btn:hover {
  transform: scale(1.1);
  color: var(--accent);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

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

@keyframes pulse-slow {
  0%, 100% { transform: scale(1); opacity: 0.95; }
  50% { transform: scale(1.05); opacity: 1; }
}

@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.9) translateY(2px); }
}

/* ==========================================================================
   RESPONSIVE DESIGN (Media Queries)
   ========================================================================== */

@media (max-width: 1024px) {
  .challenge-card {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
  }
  
  .challenge-media {
    min-height: 300px;
  }
  
  .utilities-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .welcome-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 2rem;
  }
  
  .welcome-info {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  header {
    padding: 1rem;
  }
  
  .nav-container {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  nav {
    width: 100%;
    justify-content: space-around;
  }
  
  .nav-btn {
    padding: 0.5rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .welcome-stats {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .tracker-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-filter-box {
    flex-direction: column;
    max-width: 100%;
  }
  
  .drawer {
    width: 100%;
    right: -100%;
  }
}
