:root {
  --primary: #ff6b35;
  --primary-dark: #e55a2b;
  --bg: #f7f9fc;
  --card: #ffffff;
  --text: #1a1a2e;
  --text-secondary: #555;
  --border: #e0e0e0;
  --success: #2ecc71;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0,0,0,0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.app {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 24px;
}

.header h1 {
  font-size: 2rem;
  color: var(--primary);
}

.header p {
  color: var(--text-secondary);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--card);
  padding: 6px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.tab-btn {
  flex: 1;
  padding: 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  transition: background 0.2s, color 0.2s;
}

.tab-btn.active {
  background: var(--primary);
  color: #fff;
}

.tab-content {
  display: none;
}

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

.plan-list, .guided-list, .schedule-days {
  display: grid;
  gap: 16px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.card h3 {
  margin-bottom: 6px;
  color: var(--text);
}

.card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.card .meta {
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--primary);
  font-weight: 600;
}

.hidden { display: none !important; }

.back-btn {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 12px;
  font-size: 1rem;
}

.plan-detail, .guided-player {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.weeks {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.week-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}

.week-card h4 {
  margin-bottom: 8px;
}

.session {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-top: 1px solid var(--border);
}

.session:first-of-type { border-top: none; }

.session-type {
  font-size: 0.8rem;
  padding: 2px 8px;
  border-radius: 20px;
  background: #eee;
  color: var(--text-secondary);
}

.session-type.guided {
  background: #ffe4d6;
  color: var(--primary-dark);
}

.audio-visual {
  background: #1a1a2e;
  border-radius: var(--radius);
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 16px 0;
}

.waveform {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 60px;
}

.bar {
  width: 4px;
  background: var(--primary);
  border-radius: 2px;
  animation: bounce 1s infinite ease-in-out;
}

@keyframes bounce {
  0%, 100% { height: 10px; }
  50% { height: 50px; }
}

.controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
}

.play-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

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

.cue-box {
  background: #f0f4ff;
  border-left: 4px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--text-secondary);
}

.empty-state {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 20px;
}

.schedule-header {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  margin: 10px 0;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--success);
  width: 0%;
  transition: width 0.5s;
}

.day-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--border);
}

.day-card.rest { border-left-color: #bbb; }
.day-card.run { border-left-color: var(--primary); }
.day-card.guided { border-left-color: var(--success); }

.day-card h4 {
  margin-bottom: 4px;
}

.day-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.day-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.btn-small {
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
  font-weight: 600;
}

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

.btn-secondary {
  background: var(--border);
  color: var(--text);
}

.completed-badge {
  display: inline-block;
  background: var(--success);
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  margin-left: 8px;
}
