/* ==========================================================================
   GymSplit — Shared Styles
   Dark theme, energetic orange/pink accent. Edit the variables below to
   re-theme the whole site in one place.
   ========================================================================== */

:root {
  --bg: #0a0c11;
  --bg-elev: #12151c;
  --bg-elev-2: #1a1f29;
  --border: #262c38;
  --text: #f4f5f7;
  --text-dim: #9aa3b2;
  --text-faint: #6b7280;

  --accent: #ff5b2e;      /* orange   */
  --accent-2: #ff2f92;    /* pink/red */
  --accent-gradient: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  --accent-soft: rgba(255, 91, 46, 0.12);

  --success: #22c55e;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;

  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 0.5em; }
p { margin: 0 0 1em; color: var(--text-dim); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 15px;
  transition: transform 0.15s ease, opacity 0.15s ease, background 0.15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 6px 20px rgba(255, 47, 146, 0.25);
}
.btn-primary:hover { opacity: 0.92; }

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--text-dim); }

.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 13px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 12, 17, 0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text .split { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-dim);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-actions .btn-ghost.desktop-only { display: none; }
  .nav.open .nav-links {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px 24px;
    gap: 18px;
  }
}

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 72px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 91, 46, 0.18) 0%, rgba(255, 47, 146, 0.08) 45%, transparent 70%);
  pointer-events: none;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 91, 46, 0.35);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(36px, 6vw, 68px);
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 .grad {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 560px;
  margin: 20px auto 36px;
  font-size: 18px;
  color: var(--text-dim);
}
.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-faint);
}

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 48px 0; }
.section-head {
  text-align: center;
  max-width: 620px;
  margin: 0 auto 48px;
}
.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
}
.kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 12px;
}

/* ---------- Cards / Grid ---------- */
.grid {
  display: grid;
  gap: 22px;
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: #3a4152; }

.feature-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
}
.feature-card h3 { font-size: 18px; }
.feature-card p { margin-bottom: 0; font-size: 14.5px; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 56px 40px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(255, 91, 46, 0.15), transparent 60%);
  pointer-events: none;
}
.cta-band h2 { font-size: clamp(24px, 3.5vw, 34px); }

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-dim); font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer small { color: var(--text-faint); }

/* ---------- Auth pages ---------- */
.auth-wrap {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
}
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { margin-bottom: 28px; font-size: 14.5px; }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 7px;
  color: var(--text);
}
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-elev-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14.5px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--accent);
}
.field-hint { font-size: 12.5px; color: var(--text-faint); margin-top: 6px; }
.field-error {
  font-size: 12.5px;
  color: #ff6b6b;
  margin-top: 6px;
  display: none;
}

.form-foot {
  text-align: center;
  margin-top: 22px;
  font-size: 14px;
  color: var(--text-dim);
}
.form-foot a { color: var(--accent); font-weight: 600; }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-faint);
  font-size: 12.5px;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.alert {
  display: none;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 18px;
}
.alert.show { display: block; }
.alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
}
.alert-error {
  background: rgba(255, 47, 47, 0.1);
  border: 1px solid rgba(255, 47, 47, 0.3);
  color: #ff8a8a;
}

/* ---------- Pricing ---------- */
.price-card {
  display: flex;
  flex-direction: column;
  position: relative;
}
.price-card.featured {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(255, 91, 46, 0.08), var(--bg-elev) 40%);
}
.price-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.price-card h3 { font-size: 20px; margin-bottom: 4px; }
.price-card .plan-desc { font-size: 13.5px; margin-bottom: 20px; }
.price-amount {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 2px;
}
.price-amount span {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-dim);
}
.price-card ul {
  list-style: none;
  padding: 0;
  margin: 24px 0 28px;
  flex: 1;
}
.price-card li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--text-dim);
  margin-bottom: 12px;
}
.price-card li::before {
  content: "✓";
  color: var(--success);
  font-weight: 800;
  flex-shrink: 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item h4 { font-size: 16px; margin-bottom: 8px; }
.faq-item p { margin: 0; font-size: 14.5px; }

/* ---------- Dashboard shell ---------- */
.dash {
  display: flex;
  min-height: calc(100vh - 73px);
}
.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 28px 16px;
  position: sticky;
  top: 73px;
  height: calc(100vh - 73px);
}
.dash-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 10px 22px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.dash-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.dash-user .name { font-weight: 600; font-size: 14.5px; }
.dash-user .plan-tag { font-size: 12px; color: var(--text-faint); }

.dash-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14.5px;
  margin-bottom: 4px;
  transition: background .15s ease, color .15s ease;
}
.dash-nav a:hover { background: var(--bg-elev-2); color: var(--text); }
.dash-nav a.active {
  background: var(--accent-soft);
  color: var(--accent);
}
.dash-nav .icon { width: 18px; text-align: center; }

.dash-main {
  flex: 1;
  padding: 32px 36px 60px;
  min-width: 0;
}
.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 14px;
}
.dash-topbar h1 { font-size: 24px; margin: 0; }
.dash-topbar p { margin: 4px 0 0; font-size: 14px; }

.dash-tab { display: none; }
.dash-tab.active { display: block; }

.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 32px; }
@media (max-width: 700px) { .stat-row { grid-template-columns: 1fr; } }
.stat-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-card .label { font-size: 13px; color: var(--text-faint); margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; }
.stat-card .value.accent { color: var(--accent); }

.dash-mobile-bar {
  display: none;
  position: sticky;
  top: 73px;
  z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  padding: 10px 16px;
  gap: 8px;
}
@media (max-width: 860px) {
  .dash-sidebar { display: none; }
  .dash-mobile-bar { display: flex; }
  .dash-main { padding: 24px 18px 60px; }
}
.dash-mobile-bar a {
  flex-shrink: 0;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-dim);
  white-space: nowrap;
}
.dash-mobile-bar a.active { background: var(--accent-gradient); color: #fff; border-color: transparent; }

/* Workout / plan cards */
.workout-card, .plan-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
}
.workout-card .tag, .plan-card .tag {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.workout-card h3, .plan-card h3 { font-size: 17px; margin-bottom: 6px; }
.workout-card .meta, .plan-card .meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 14px;
}
.workout-card ul.exercises {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.workout-card ul.exercises li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.workout-card ul.exercises li:last-child { border-bottom: none; }
.workout-card .row-actions { display: flex; gap: 8px; }

.plan-card.selected { border-color: var(--success); }
.plan-card .current-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  background: var(--success);
  color: #06210f;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
}

.empty-state {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px 24px;
  text-align: center;
  color: var(--text-faint);
}
.empty-state .feature-icon { margin: 0 auto 18px; }

/* Add Workout form panel */
.panel {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 28px;
  display: none;
}
.panel.show { display: block; }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.panel-head h3 { margin: 0; font-size: 17px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

.section-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  gap: 12px;
  flex-wrap: wrap;
}

/* Video area */
.video-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .15s ease;
}
.video-card:hover { border-color: var(--accent); }
.video-thumb {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--bg-elev-2), #232838);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  position: relative;
}
.video-thumb .duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.65);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}
.video-info { padding: 14px 16px; }
.video-info h4 { margin: 0 0 4px; font-size: 14.5px; }
.video-info span { font-size: 12.5px; color: var(--text-faint); }

.player-panel {
  display: none;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 28px;
}
.player-panel.show { display: block; }
.player-stage {
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  overflow: hidden;
  margin-bottom: 16px;
}
.player-stage video { width: 100%; height: 100%; }

/* Utility */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.hidden { display: none !important; }
