/* ═══════════════════════════════════════════════════════
   BALLGAUGE — Page-specific styles
   Depends on: base.css (loaded first)
   Accent palette: amber → red
   ═══════════════════════════════════════════════════════ */

:root {
  --accent: #f59e0b;
  --accent-bright: #fbbf24;
  --accent-2: #d97706;
  --gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --gradient-soft: linear-gradient(135deg, rgba(245,158,11,0.15) 0%, rgba(239,68,68,0.15) 100%);
  --max-w: 1100px;
  --section-pad: 100px;
}

/* ─── PHONE SCREEN OVERRIDE (BallGauge layout) ──────── */
/* Tighter gap and slightly taller to fit new list UI   */
.phone-screen {
  gap: 0;
  padding: 14px 12px 12px;
  min-height: 500px;
  background: #111111;
}

/* ─── FEATURE VISUAL — when containing fd-screen ────── */
/* Remove centring and padding so screen fills the card */
.feature-visual:has(.fd-screen) {
  padding: 28px;
  justify-content: flex-start;
  min-height: unset;
}

.feature-visual:has(.fd-screen)::before {
  opacity: 0.4;
}

/* ─── HERO GLOW ────────────────────────────────────── */
.hero-glow {
  background: radial-gradient(circle, rgba(245,158,11,0.1) 0%, transparent 70%);
}

/* ─── HERO LABEL ───────────────────────────────────── */
.hero-label {
  background: rgba(245,158,11,0.1);
  border: 1px solid rgba(245,158,11,0.25);
}

/* ─── PHONE GLOW ───────────────────────────────────── */
.phone-glow {
  background: radial-gradient(circle, rgba(245,158,11,0.15) 0%, transparent 70%);
}

/* ─── FEATURE LIST CHECK (accent-coloured bg/border) ─ */
.feature-list li .check {
  background: rgba(245,158,11,0.12);
  border: 1px solid rgba(245,158,11,0.25);
}

/* ─── FEAT CARD HOVER ──────────────────────────────── */
.feat-card:hover {
  border-color: rgba(245,158,11,0.3);
}

/* ─── CTA GLOW ─────────────────────────────────────── */
.cta-glow {
  background: radial-gradient(circle, rgba(245,158,11,0.08) 0%, transparent 70%);
}

/* ─── BTN-PRIMARY shadow overrides ─────────────────── */
.btn-primary {
  box-shadow: 0 0 30px rgba(245,158,11,0.2);
}

.btn-primary:hover {
  box-shadow: 0 8px 40px rgba(245,158,11,0.35);
}

/* ─── PHONE SCREEN UI — BallGauge specific ──────────── */
.ball-card {
  background: #161b22;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.06);
}

.ball-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.ball-name { font-size: 0.62rem; font-weight: 700; color: var(--white); }
.ball-meta { font-size: 0.52rem; color: var(--muted); margin-top: 2px; }

/* ─── MOCK TAGS — BallGauge status variants ─────────── */
.mock-tag {
  display: inline-flex;
  font-size: 0.55rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}

.mock-tag.fresh    { background: rgba(16,185,129,0.15);  color: #34d399; }
.mock-tag.good     { background: rgba(59,130,246,0.15);  color: #60a5fa; }
.mock-tag.practice { background: rgba(245,158,11,0.15);  color: #fbbf24; }
.mock-tag.dead     { background: rgba(239,68,68,0.15);   color: #f87171; }

/* ─── MINI BARS ────────────────────────────────────── */
.mini-bars { display: flex; flex-direction: column; gap: 4px; }
.mini-bar-row { display: flex; align-items: center; gap: 6px; }
.mini-bar-label { font-size: 0.48rem; color: var(--muted); width: 36px; }
.mini-bar-bg { flex: 1; height: 4px; background: rgba(255,255,255,0.06); border-radius: 10px; overflow: hidden; }
.mini-bar-fill { height: 100%; border-radius: 10px; }
.fill-yellow { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.fill-green  { background: linear-gradient(90deg, #10b981, #3b82f6); }
.fill-blue   { background: linear-gradient(90deg, #3b82f6, #8b5cf6); }

/* ─── MOCK SCORE CARD ──────────────────────────────── */
.mock-score-card {
  background: var(--surface-2);
  border-radius: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-score-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.mock-score-name { font-size: 0.78rem; font-weight: 700; color: var(--white); }
.mock-score-meta { font-size: 0.6rem; color: var(--muted); margin-top: 2px; }

.mock-overall {
  font-size: 2rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.04em;
  line-height: 1;
}

.mock-overall-label { font-size: 0.55rem; color: var(--muted); }

/* ─── MOCK GAUGE BLOCK ─────────────────────────────── */
.mock-gauge-block {
  background: var(--surface-2);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid var(--border);
}

.mock-gauge-title {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mock-gauge-bar-bg {
  height: 7px;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 5px;
}

.mock-gauge-bar-fill { height: 100%; border-radius: 10px; }

.mock-gauge-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.5rem;
  color: var(--muted);
}

/* ─── BALL LIBRARY GRID ────────────────────────────── */
.ball-library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ball-lib-item {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--off-white);
  display: flex;
  align-items: center;
  gap: 8px;
}

.ball-lib-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gradient);
  flex-shrink: 0;
}

/* ─── MULTI SET CARDS ──────────────────────────────── */
.multi-set-card {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.multi-set-left { display: flex; flex-direction: column; gap: 2px; }
.multi-set-name { font-size: 0.72rem; font-weight: 600; color: var(--white); }
.multi-set-meta { font-size: 0.58rem; color: var(--muted); }

/* ─── MOCK ROW ─────────────────────────────────────── */
.mock-row-right { font-size: 0.72rem; font-weight: 700; color: var(--accent-bright); }

/* ─── RESPONSIVE — BallGauge specific ──────────────── */
@media (max-width: 560px) {
  .ball-library-grid { grid-template-columns: 1fr; }
}


/* ═══════════════════════════════════════════════════════
   PHONE SCREEN — New authentic UI components
   ps- prefix = phone screen
   fd- prefix = feature detail (larger card mockups)
   ═══════════════════════════════════════════════════════ */

/* ─── STATUS BAR ────────────────────────────────────── */
.ps-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 0 2px;
}

.ps-time {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.01em;
}

.ps-icons {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* ─── SCREEN TITLE ──────────────────────────────────── */
.ps-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

/* ─── SEGMENTED CONTROL ─────────────────────────────── */
.ps-seg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 2px;
  margin-bottom: 10px;
}

.ps-seg-btn {
  font-size: 0.55rem;
  font-weight: 600;
  color: var(--muted);
  text-align: center;
  padding: 4px 0;
  border-radius: 6px;
  cursor: pointer;
}

.ps-seg-active {
  background: #2a2a2a;
  color: var(--white);
}

/* ─── BALL ROW ──────────────────────────────────────── */
.ps-ball-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 6px;
}

/* ─── CIRCULAR PROGRESS RING ────────────────────────── */
.ps-ring-wrap {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.ps-ring {
  width: 44px;
  height: 44px;
  transform: rotate(0deg);
}

.ps-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.08);
}

.ps-ring-fill {
  fill: none;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.6s ease;
}

/* Ring colour variants */
.ps-ring-fill.fresh   { stroke: #34d399; }
.ps-ring-fill.good    { stroke: #60a5fa; }
.ps-ring-fill.practice{ stroke: #fbbf24; }
.ps-ring-fill.dead    { stroke: #f87171; }

.ps-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ─── BALL INFO ──────────────────────────────────────── */
.ps-ball-info {
  flex: 1;
  min-width: 0;
}

.ps-ball-name {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ps-ball-container {
  font-size: 0.48rem;
  color: var(--muted);
  margin-top: 1px;
}

.ps-ball-date {
  font-size: 0.45rem;
  color: rgba(136,136,136,0.7);
  margin-top: 1px;
}

/* ─── STATUS BADGE ──────────────────────────────────── */
.ps-badge {
  display: inline-flex;
  font-size: 0.5rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.ps-badge.fresh    { background: rgba(16,185,129,0.15);  color: #34d399; border: 1px solid rgba(52,211,153,0.2); }
.ps-badge.good     { background: rgba(59,130,246,0.15);  color: #60a5fa; border: 1px solid rgba(96,165,250,0.2); }
.ps-badge.practice { background: rgba(245,158,11,0.15);  color: #fbbf24; border: 1px solid rgba(251,191,36,0.2); }
.ps-badge.dead     { background: rgba(239,68,68,0.15);   color: #f87171; border: 1px solid rgba(248,113,113,0.2); }

/* ─── LOG SESSION BUTTON (bottom of phone) ──────────── */
.ps-log-btn {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 6px;
  letter-spacing: 0.01em;
}

/* ─── FEATURE DETAIL SCREEN CARD ────────────────────── */
.fd-screen {
  background: #141414;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.fd-back {
  font-size: 0.58rem;
  color: #60a5fa;
  font-weight: 600;
  margin-bottom: 10px;
}

/* ─── DETAIL SCREEN — large ring + title ────────────── */
.fd-detail-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 12px;
}

.fd-ring-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.fd-ring {
  width: 72px;
  height: 72px;
}

.fd-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,0.07);
}

.fd-ring-track {
  fill: none;
  stroke-linecap: round;
}

.fd-ring-track.fresh    { stroke: #34d399; }
.fd-ring-track.good     { stroke: #60a5fa; }
.fd-ring-track.practice { stroke: #fbbf24; }
.fd-ring-track.dead     { stroke: #f87171; }

.fd-ring-inner {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}

.fd-ring-pct {
  font-size: 0.9rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -0.03em;
  line-height: 1;
}

.fd-ring-label {
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.fd-ball-title { flex: 1; }
.fd-ball-name {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
}
.fd-ball-sub {
  font-size: 0.52rem;
  color: var(--muted);
  margin-top: 3px;
}

/* ─── PRESSURE + WEAR PANELS ────────────────────────── */
.fd-panels {
  display: flex;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}

.fd-panel {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.fd-panel-divider {
  width: 1px;
  background: rgba(255,255,255,0.08);
  align-self: stretch;
}

.fd-panel-pct {
  font-size: 1.1rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
}

.fd-panel-label {
  font-size: 0.48rem;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
}

/* ─── SESSION LIST ──────────────────────────────────── */
.fd-sessions-label {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 6px;
}

.fd-session-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fd-sess-dur {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--white);
}

.fd-sess-meta {
  font-size: 0.48rem;
  color: var(--muted);
  margin-top: 1px;
}

.fd-sess-surface {
  font-size: 0.5rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255,255,255,0.06);
  border-radius: 6px;
  padding: 3px 8px;
}

/* ─── SAVE / LOG BUTTONS ────────────────────────────── */
.fd-log-btn {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 10px;
}

.fd-save-btn {
  background: var(--gradient);
  border-radius: 10px;
  padding: 9px;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--white);
  margin-top: 8px;
}

/* ─── LOG SESSION FORM ──────────────────────────────── */
.fd-form-title {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.fd-field-label {
  font-size: 0.52rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  margin-top: 8px;
}

.fd-field-label:first-of-type { margin-top: 0; }

.fd-field-hint {
  font-size: 0.46rem;
  color: rgba(136,136,136,0.7);
  margin-top: 3px;
  margin-bottom: 2px;
}

/* Selector (dropdown style) */
.fd-selector {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--white);
}

/* Text input */
.fd-input {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--white);
}

/* Duration quick-pick row */
.fd-dur-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.fd-dur-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 7px 4px;
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
}

.fd-dur-active {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.35);
  color: #fbbf24;
}

/* Surface grid */
.fd-surface-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
}

.fd-surface-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  font-size: 0.52rem;
  font-weight: 700;
  color: var(--muted);
}

.fd-surface-active {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.35);
  color: #fbbf24;
}

/* Toggle rows */
.fd-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.fd-toggle-label {
  font-size: 0.58rem;
  font-weight: 500;
  color: var(--white);
}

.fd-toggle {
  width: 26px;
  height: 15px;
  border-radius: 8px;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.fd-toggle.off {
  background: rgba(255,255,255,0.12);
}

.fd-toggle.on {
  background: #34d399;
}

.fd-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: white;
  transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

.fd-toggle.off::after { left: 2px; }
.fd-toggle.on::after  { left: 13px; }

/* ─── STAR RATING ───────────────────────────────────── */
.fd-stars {
  display: flex;
  gap: 3px;
  margin-bottom: 2px;
}

.fd-star {
  font-size: 1rem;
  line-height: 1;
}

.fd-star.on  { color: #fbbf24; }
.fd-star.off { color: rgba(255,255,255,0.15); }

/* ─── STEPPER ───────────────────────────────────────── */
.fd-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  overflow: hidden;
}

.fd-step-btn {
  padding: 7px 14px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  background: rgba(255,255,255,0.03);
  user-select: none;
}

.fd-step-val {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--white);
  border-left: 1px solid rgba(255,255,255,0.08);
  border-right: 1px solid rgba(255,255,255,0.08);
  padding: 7px 0;
}

/* ─── STATUS GRID (legend in feature section) ────────── */
.fd-status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-top: 10px;
}

/* ─── ARCHIVE ACTION LINK ────────────────────────────── */
.fd-archive-link {
  font-size: 0.52rem;
  color: #f87171;
  text-align: center;
  padding: 8px 0;
}
