:root {
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #818cf8;
  --bg: #f5f3ff;
  --bg-card: #ffffff;
  --text: #1e1b4b;
  --text-muted: #6b7280;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --success: #10b981;
  --danger: #ef4444;
  --border: #e5e7eb;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 24px 16px;
  border-radius: 0 0 24px 24px;
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

.header .subtitle {
  opacity: 0.9;
  font-size: 0.9rem;
  margin-top: 4px;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  gap: 8px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover { background: var(--primary-dark); }

.btn-accent {
  background: var(--accent);
  color: white;
}

.btn-accent:hover { background: var(--accent-hover); }

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover { background: var(--primary); color: white; }

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-lg {
  padding: 16px 32px;
  font-size: 1.1rem;
}

/* Forms */
.form-group {
  margin-bottom: 16px;
}

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-around;
  padding: 8px 0;
  z-index: 100;
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 4px 12px;
  position: relative;
}

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a .icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.bottom-nav a .badge {
  position: absolute;
  top: -4px;
  right: 4px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 10px;
  font-weight: 600;
}

/* Streak */
.streak-display {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
}

.streak-fire {
  font-size: 3rem;
}

.streak-count {
  font-size: 2.5rem;
  font-weight: 700;
  color: white;
}

.streak-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Weekly dots */
.weekly-dots {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.weekly-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
}

.weekly-dots .dot.filled {
  background: var(--success);
}

.weekly-dots .day-label {
  font-size: 0.7rem;
  text-align: center;
  opacity: 0.8;
  margin-top: 4px;
}

/* Progress bar */
.progress-bar {
  height: 8px;
  background: rgba(255,255,255,0.2);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 12px;
}

.progress-bar .fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.3s;
}

/* Exercise grid */
.exercise-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.exercise-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.2s;
}

.exercise-card:hover { transform: translateY(-2px); }

.exercise-card .thumb {
  width: 100%;
  aspect-ratio: 16/10;
  background: #e5e7eb;
  object-fit: cover;
}

.exercise-card .info {
  padding: 10px;
}

.exercise-card .info h3 {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.exercise-card .info p {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Params */
.params-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 16px 0;
}

.param {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 0.9rem;
}

.param .label {
  color: var(--text-muted);
}

.param .value {
  font-weight: 600;
}

/* Video player */
.video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.video-container video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-container .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
}

.video-container .play-btn {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
}

/* Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 140px);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.chat-message {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 16px;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.chat-message.sent {
  background: var(--primary);
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.chat-message.received {
  background: var(--bg-card);
  border-bottom-left-radius: 4px;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}

.chat-input input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.9rem;
}

.chat-input button {
  padding: 10px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-weight: 600;
  cursor: pointer;
}

/* Disclaimer banner */
.disclaimer-banner {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #92400e;
  margin-bottom: 16px;
}

.disclaimer-banner strong {
  display: block;
  margin-bottom: 4px;
}

/* Stats chart placeholder */
.chart-placeholder {
  height: 200px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Spacing */
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.p-2 { padding: 16px; }
.p-3 { padding: 24px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* Bottom padding for nav */
.page-content {
  padding-bottom: 80px;
}
