:root {
  --primary: #1e6f8e;
  --primary-dark: #154d63;
  --accent: #2d9f6f;
  --accent-light: #4ecb8d;
  --bg: #f7fafc;
  --card: #ffffff;
  --text: #1a2a3a;
  --text-muted: #5a6a7a;
  --border: #e2e8f0;
  --hold: #2d9f6f;
  --relax: #1e6f8e;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
header {
  background: linear-gradient(135deg, #0f3c4c 0%, #1e6f8e 50%, #2d9f6f 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  animation: slideDown 0.6s ease;
}
@keyframes slideDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
nav {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.5px; }
.logo span { opacity: 0.85; font-weight: 400; }
nav a { color: white; text-decoration: none; margin-left: 1.5rem; opacity: 0.9; transition: opacity 0.2s; }
nav a:hover { opacity: 1; }
.hero {
  background-color: #1e6f8e;
  color: white;
  padding: 6rem 1.5rem 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  display: none;
}
@keyframes waveMove {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.05) translateY(-10px); }
}
.hero-content { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 0.75rem; font-weight: 700; animation: fadeUp 0.8s ease 0.2s both; }
.hero p { font-size: 1.2rem; max-width: 680px; margin: 0 auto 2rem; opacity: 0.95; animation: fadeUp 0.8s ease 0.4s both; }
.btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.85rem 1.75rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s ease;
  animation: fadeUp 0.8s ease 0.6s both;
  min-height: 48px; /* Better touch target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: center;
}
select, input[type="number"] {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
  min-height: 44px;
}
.btn:hover { background: var(--accent-light); transform: translateY(-3px); box-shadow: 0 8px 20px rgba(45,159,111,0.3); }
.btn-secondary { background: transparent; border: 2px solid white; margin-left: 0.75rem; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
section { padding: 5rem 0; }
.fade-in { opacity: 0; transform: translateY(30px); animation: fadeUp 0.7s ease forwards; }
.fade-in:nth-child(2) { animation-delay: 0.1s; }
.fade-in:nth-child(3) { animation-delay: 0.2s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}
h2 { font-size: 2.1rem; margin-bottom: 1rem; color: var(--primary-dark); }
.section-intro { color: var(--text-muted); margin-bottom: 2.5rem; max-width: 720px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.75rem; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.card h3 { margin-bottom: 0.6rem; color: var(--primary); }
.timer-section { 
  background: white; 
  border-radius: 24px; 
  padding: 2.5rem; 
  box-shadow: var(--shadow); 
  margin-top: 1rem;
  position: relative;
  overflow: hidden;
}
.timer-display {
  text-align: center;
  padding: 2rem 1rem;
  background: linear-gradient(145deg, #f0f7fa, #e6f2f8);
  border-radius: 20px;
  margin: 1.5rem 0;
  position: relative;
}
.phase {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  transition: color 0.3s;
}
.phase.hold { color: var(--hold); animation: pulse 1.5s ease infinite; }
.phase.relax { color: var(--relax); }
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}
.countdown { 
  font-size: 4.2rem; 
  font-weight: 800; 
  line-height: 1; 
  margin: 0.2rem 0; 
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
  transition: all 0.2s;
}
.progress-ring {
  width: 120px;
  height: 120px;
  margin: 0.5rem auto;
  display: block;
}
.progress-ring circle {
  fill: none !important;
  stroke-width: 8;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.3s linear;
}
.progress-bg { 
  stroke: #e2e8f0; 
}
.progress-fg { 
  stroke: var(--accent); 
  stroke-dasharray: 264;
  stroke-dashoffset: 264;
}
.mode-selector {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  background: #f0f4f8;
  padding: 0.4rem;
  border-radius: 50px;
  width: fit-content;
}
.mode-btn {
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 50px;
  background: transparent;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s;
}
.mode-btn.active {
  background: var(--accent);
  color: white;
}
.live-hint {
  margin-top: 0.75rem;
  font-size: 1rem;
  color: var(--text-muted);
  min-height: 1.4em;
  transition: opacity 0.3s;
}
.success-panel {
  background: linear-gradient(135deg, #e8f5e9, #f1f8e9);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1rem 0;
  text-align: center;
  animation: fadeIn 0.5s ease;
}
.coach-message {
  background: linear-gradient(90deg, #e8f5e9, #f1f8e9);
  border-left: 5px solid var(--accent);
  padding: 1.2rem 1.5rem;
  border-radius: 0 16px 16px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: #1b5e20;
  animation: fadeIn 0.5s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.stats { display: flex; gap: 2rem; flex-wrap: wrap; margin-top: 1.5rem; justify-content: center; }
.stat { text-align: center; min-width: 90px; }
.stat-num { font-size: 2.2rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.85rem; color: var(--text-muted); }
.week-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-left: 0.5rem;
}
.symptom-log {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}
.symptom-btn {
  padding: 0.5rem 1rem;
  border: 2px solid var(--border);
  border-radius: 30px;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}
.symptom-btn:hover, .symptom-btn.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.position-img { 
  width: 100%; 
  border-radius: 12px; 
  margin-bottom: 1rem; 
  object-fit: contain; 
  height: auto; 
  max-height: 280px; 
  background: #f8fafc;
}
.warning {
  background: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: 12px;
  padding: 1.25rem;
  margin-top: 2rem;
}
footer {
  background: #0f3c4c;
  color: #b0c4ce;
  text-align: center;
  padding: 3rem 1rem;
  font-size: 0.9rem;
}
.controls { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; align-items: center; }
select, input[type="number"] {
  padding: 0.65rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 1rem;
}
