/* Hoopers Lists — "/demo" visual-design preview page.
   Ported from reference/static/hoopers/css/app.css (the dashboard half
   only - profile-specific rules are intentionally left out, there's no
   /demo/profile route). Every selector is scoped under .demo-page so
   these generic class names (.section, .brand, .card, ...) can't leak
   into other pages before Phase 9 styles the shared base template.
   Custom-property names match docs/color-palette.md exactly. */

.demo-page {
  /* Every token below except --card-dark comes straight from base.css's
     :root and cascades here unchanged - do NOT redeclare them. A palette
     swap should mean editing base.css's :root once, not hunting through
     every page's own CSS for a second copy of the same values. */
  --card-dark: #0A0A0B;

  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
}

.demo-page * {
  box-sizing: border-box;
}

.demo-page .dotgrid {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle at center, rgba(157, 200, 255, 0.3) 1.2px, transparent 1.4px);
  background-size: 18px 18px;
}

/* ─── Phone frame ─────────────────────────────────────────────────── */
.demo-page .phone-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.demo-page .phone-frame {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 390px;
  height: 780px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: 36px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.7);
}

.demo-page .phone-notch-row {
  display: flex;
  justify-content: center;
  padding: 10px 0 4px;
  background: var(--bg-raised);
  flex-shrink: 0;
}

.demo-page .phone-notch {
  width: 60px;
  height: 8px;
  border-radius: 4px;
  background: #000;
}

.demo-page .phone-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.demo-page .phone-content {
  overflow-y: auto;
  flex: 1;
  padding-bottom: 16px;
}

.demo-page .phone-home-row {
  display: flex;
  justify-content: center;
  padding: 8px 0 12px;
  background: var(--card-dark);
  flex-shrink: 0;
}

.demo-page .phone-home-indicator {
  width: 48px;
  height: 4px;
  border-radius: 2px;
  background: var(--border-strong);
}

/* ─── Brand ───────────────────────────────────────────────────────── */
.demo-page .brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-page .brand-name {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.demo-page .brand-name .accent {
  color: var(--primary);
}

/* ─── Bottom nav ──────────────────────────────────────────────────── */
.demo-page .bottom-nav {
  display: flex;
  border-top: 1px solid var(--border);
  background: var(--card-dark);
  flex-shrink: 0;
}

.demo-page .bottom-nav-item {
  flex: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 0 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  text-decoration: none;
  font: inherit;
}

.demo-page .bottom-nav-item.active {
  color: var(--primary);
}

.demo-page .bottom-nav-item span.label {
  font-size: 11px;
  font-weight: 500;
}

/* ─── Dashboard header ────────────────────────────────────────────── */
.demo-page .dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
}

.demo-page .notif-icon-wrap {
  position: relative;
  color: var(--text-secondary);
}

.demo-page .notif-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

/* ─── Season card ─────────────────────────────────────────────────── */
.demo-page .season-card {
  margin: 0 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.demo-page .season-card-badge {
  position: absolute;
  right: -20px;
  top: -10px;
  opacity: 0.12;
}

.demo-page .season-card-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.demo-page .season-card-title {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 800;
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-page .season-card-sub {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 10px;
}

.demo-page .season-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.demo-page .season-live {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--teal);
  font-weight: 600;
}

.demo-page .season-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
  display: inline-block;
}

.demo-page .season-card-count {
  color: var(--text-muted);
}

/* ─── Quick actions ───────────────────────────────────────────────── */
.demo-page .quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  padding: 0 12px;
  margin-bottom: 18px;
}

.demo-page .quick-action {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 8px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  text-decoration: none;
}

.demo-page .quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.demo-page .quick-action-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
}

/* ─── Sections ────────────────────────────────────────────────────── */
.demo-page .section {
  padding: 0 12px;
  margin-bottom: 18px;
}

.demo-page .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.demo-page .section-title {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.demo-page .section-link {
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
}

/* ─── Standings ───────────────────────────────────────────────────── */
.demo-page .standings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.demo-page .standings-head {
  display: grid;
  grid-template-columns: 1fr 32px 32px 44px 44px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.demo-page .standings-head span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: right;
}

.demo-page .standings-head span:first-child {
  text-align: left;
}

.demo-page .standings-row {
  display: grid;
  grid-template-columns: 1fr 32px 32px 44px 44px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.demo-page .standings-row:last-child {
  border-bottom: none;
}

.demo-page .standings-row.leader {
  background: rgba(242, 106, 16, 0.06);
}

.demo-page .standings-team {
  display: flex;
  align-items: center;
  gap: 8px;
}

.demo-page .rank-badge {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  background: var(--border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.demo-page .rank-badge.first {
  background: var(--primary);
  color: var(--on-primary);
}

.demo-page .team-name {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.demo-page .team-name.leader {
  font-weight: 600;
  color: var(--text);
}

.demo-page .stat-cell {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  color: var(--text);
  text-align: right;
  align-self: center;
}

.demo-page .stat-cell.muted {
  color: var(--text-secondary);
}

.demo-page .stat-cell.strk {
  font-weight: 600;
}

.demo-page .stat-cell.strk.win {
  color: var(--teal);
}

.demo-page .stat-cell.strk.loss {
  color: var(--alert);
}

/* ─── Announcements ───────────────────────────────────────────────── */
.demo-page .announcement-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-page .announcement-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left-width: 3px;
  border-left-style: solid;
  border-radius: 10px;
  padding: 12px 14px;
}

.demo-page .announcement-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.demo-page .announcement-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.demo-page .announcement-time {
  font-size: 11px;
  color: var(--text-muted);
}

.demo-page .announcement-body {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  line-height: 1.5;
}

/* ─── Features ────────────────────────────────────────────────────── */
.demo-page .features-block {
  padding: 4px 12px 0;
  margin-bottom: 4px;
}

.demo-page .features-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 4px;
}

.demo-page .features-heading {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 8px;
}

.demo-page .features-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.demo-page .feature-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.demo-page .feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.demo-page .feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.demo-page .feature-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 4px;
}

.demo-page .feature-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ─── CTA card ────────────────────────────────────────────────────── */
.demo-page .cta-card {
  margin: 20px 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
}

.demo-page .cta-title {
  font-family: "Saira Condensed", sans-serif;
  font-weight: 700;
  font-size: 20px;
  text-transform: uppercase;
  margin-bottom: 8px;
  line-height: 1.15;
}

.demo-page .cta-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.demo-page .cta-button {
  background: var(--primary);
  color: var(--on-primary);
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.demo-page .cta-button:hover {
  background: var(--primary-hover);
}

/* ─── Footer ──────────────────────────────────────────────────────── */
.demo-page .phone-footer {
  margin: 20px 12px 4px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.demo-page .phone-footer .brand {
  margin-bottom: 8px;
}

.demo-page .phone-footer .brand-name {
  font-size: 14px;
  letter-spacing: 1px;
}

.demo-page .phone-footer p {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

.demo-page .phone-footer p + p {
  margin-top: 4px;
}

/* ─── Sidebar brand (desktop only) ────────────────────────────────── */
.demo-page .nav-brand {
  display: none;
}

/* ─── Dashboard two-column layout (desktop only) ─────────────────── */
.demo-page .dash-columns {
  display: block;
}

/* ═══════════════════════════════════════════════════════════════════
   DESKTOP / WEB VIEW - same markup, re-laid-out for wide viewports:
   the phone frame becomes a full-height app shell with a persistent
   left sidebar nav. Breakpoint matches reference/static/hoopers/css/
   app.css's isMobile check (< 900px).
   ═══════════════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
  .demo-page .phone-page {
    min-height: 100vh;
    display: block;
    padding: 0;
  }

  .demo-page .phone-frame {
    position: relative;
    width: 100%;
    max-width: none;
    height: 100vh;
    background: var(--bg);
    border: none;
    border-radius: 0;
    box-shadow: none;
  }

  .demo-page .phone-notch-row,
  .demo-page .phone-home-row {
    display: none;
  }

  .demo-page .phone-body {
    display: grid;
    grid-template-columns: 240px 1fr;
    height: 100%;
    overflow: hidden;
  }

  .demo-page .phone-content {
    flex: none;
    padding: 0 0 40px;
  }

  .demo-page .phone-content > * {
    max-width: 1040px;
    margin-left: auto;
    margin-right: auto;
  }

  .demo-page .dash-header,
  .demo-page .season-card,
  .demo-page .quick-actions,
  .demo-page .section,
  .demo-page .features-block,
  .demo-page .cta-card,
  .demo-page .phone-footer {
    padding-left: 40px;
    padding-right: 40px;
    margin-left: auto;
    margin-right: auto;
  }

  .demo-page .dash-header {
    padding-top: 28px;
  }

  /* Sidebar nav */
  .demo-page .bottom-nav {
    order: -1;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    border-top: none;
    border-right: 1px solid var(--border);
    background: var(--bg-raised);
    padding: 24px 12px;
    gap: 4px;
    overflow-y: auto;
  }

  .demo-page .nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
    margin-bottom: 24px;
  }

  .demo-page .nav-brand .brand-name {
    font-size: 16px;
  }

  .demo-page .bottom-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
  }

  .demo-page .bottom-nav-item .label {
    font-size: 14px;
  }

  .demo-page .bottom-nav-item:hover {
    background: rgba(245, 241, 236, 0.04);
  }

  .demo-page .bottom-nav-item.active {
    background: rgba(242, 106, 16, 0.12);
  }

  /* Dashboard: standings + announcements side by side */
  .demo-page .dash-columns {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    align-items: start;
    gap: 24px;
    padding: 0 40px;
    max-width: 1040px;
    margin: 0 auto 18px;
  }

  .demo-page .dash-columns .section {
    padding: 0;
    margin-bottom: 0;
    max-width: none;
  }

  /* Dashboard: feature cards in a grid instead of a stacked list */
  .demo-page .feature-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}
