:root {
  --lakers-purple: #552583;
  --lakers-purple-dark: #220e38;
  --lakers-purple-deep: #12081f;
  --lakers-gold: #FDB927;
  --lakers-gold-bright: #ffd05b;
  --bg-main: #0d0914;
  --bg-card: #191229;
  --bg-card-elevated: #231938;
  --border-subtle: rgba(253, 185, 39, 0.2);
  --border-strong: rgba(253, 185, 39, 0.55);
  --text-primary: #f8f7fc;
  --text-secondary: #cdc5de;
  --text-muted: #988db0;
  --accent-sky: #38bdf8;
  --accent-green: #4ade80;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-lg: 0 14px 34px rgba(0, 0, 0, 0.5);
  --transition-step: 680ms cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  background: radial-gradient(circle at top center, #25113e 0%, var(--bg-main) 65%);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.45;
  overflow-x: hidden;
}

/* ==================== TOP HEADER ==================== */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(20, 10, 35, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid var(--lakers-gold);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.45);
}

.header-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-emblem {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--lakers-gold) 0%, #e09600 100%);
  color: #1a0930;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--lakers-purple), 0 4px 12px rgba(253, 185, 39, 0.35);
  flex-shrink: 0;
}

.brand-text h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.04em;
  color: var(--lakers-gold);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.main-tabs {
  display: flex;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  padding: 0.3rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 0.55rem 1.05rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.tab-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  background: var(--lakers-gold);
  color: #190a2e;
  box-shadow: 0 3px 10px rgba(253, 185, 39, 0.35);
}

/* ==================== MAIN CONTAINER ==================== */
.app-main {
  max-width: 1440px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
}

/* ==================== CATEGORY FILTER STRIP ==================== */
.play-selector-strip {
  margin-bottom: 1rem;
}

.category-filters {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.cat-pill {
  border: 1px solid rgba(253, 185, 39, 0.25);
  background: rgba(35, 25, 56, 0.85);
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.84rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.cat-pill:hover {
  border-color: var(--lakers-gold);
  color: #fff;
}

.cat-pill.active {
  background: var(--lakers-purple);
  border-color: var(--lakers-gold);
  color: var(--lakers-gold);
  box-shadow: 0 0 12px rgba(253, 185, 39, 0.25);
}

/* ==================== 3-COLUMN WORKSPACE (DESKTOP / IPAD / PHONE) ==================== */
.plays-workspace {
  display: grid;
  grid-template-columns: 290px minmax(360px, 1fr) 340px;
  gap: 1.15rem;
  align-items: start;
}

/* Play List Panel */
.play-list-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.panel-header h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.05rem;
  color: #fff;
}

.count-badge {
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(253, 185, 39, 0.16);
  color: var(--lakers-gold);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.play-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.play-item-card {
  text-align: left;
  width: 100%;
  background: var(--bg-card-elevated);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.85rem;
  color: var(--text-primary);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.16s ease;
}

.play-item-card:hover {
  border-color: rgba(253, 185, 39, 0.5);
  transform: translateY(-1px);
}

.play-item-card.active {
  background: linear-gradient(135deg, rgba(85, 37, 131, 0.65) 0%, rgba(44, 18, 74, 0.9) 100%);
  border-color: var(--lakers-gold);
  box-shadow: 0 4px 16px rgba(253, 185, 39, 0.2);
}

.play-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.play-item-badge {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lakers-gold);
  background: rgba(253, 185, 39, 0.14);
  padding: 0.12rem 0.45rem;
  border-radius: 5px;
}

.play-item-steps {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.play-item-title {
  font-weight: 800;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.play-item-desc {
  font-size: 0.78rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Positions Legend in Sidebar */
.positions-legend-card {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.positions-legend-card h3 {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--lakers-gold);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.legend-hint {
  font-size: 0.74rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
}

.sidebar-position-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}

.pos-legend-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  color: var(--text-primary);
  font-family: inherit;
  text-align: left;
  transition: all 0.15s ease;
}

.pos-legend-row:hover,
.pos-legend-row.active {
  border-color: var(--lakers-gold);
  background: rgba(253, 185, 39, 0.14);
}

.pos-mini-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-weight: 800;
  font-size: 0.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
  flex-shrink: 0;
}

.pos-role-name {
  font-size: 0.8rem;
  font-weight: 600;
}

/* ==================== CENTER COURT STAGE ==================== */
.court-stage-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.court-top-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.active-play-heading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.play-cat-pill {
  background: var(--lakers-purple);
  color: var(--lakers-gold);
  border: 1px solid var(--lakers-gold);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.active-play-heading h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  color: #fff;
}

.spotlight-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.spotlight-label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.position-filter-btns {
  display: flex;
  gap: 0.3rem;
}

.pos-filter-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 0.45rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pos-filter-btn:hover {
  border-color: var(--lakers-gold);
}

.pos-filter-btn.active {
  background: var(--lakers-gold);
  color: #1a0930;
  border-color: #fff;
  box-shadow: 0 0 10px rgba(253, 185, 39, 0.5);
}

/* Court Wrapper & Board */
.court-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.court-board {
  position: relative;
  background: var(--bg-card);
  border: 2px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0.75rem;
  box-shadow: var(--shadow-lg);
}

.court-step-banner {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  padding: 0.45rem 0.7rem;
  background: rgba(18, 8, 31, 0.85);
  border-radius: 10px;
  border: 1px solid rgba(253, 185, 39, 0.3);
}

.step-pill-tag {
  background: var(--lakers-gold);
  color: #190a2e;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
}

.court-step-title-text {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.ref-image-btn {
  position: absolute;
  top: 0.95rem;
  right: 1rem;
  z-index: 15;
  background: rgba(25, 18, 41, 0.92);
  color: var(--lakers-gold);
  border: 1.5px solid var(--lakers-gold);
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

/* Aspect-Ratio Container so SVG + HTML Player Tokens align 1:1 on every screen */
.court-canvas-aspect {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  aspect-ratio: 500 / 470;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.35);
}

.court-svg {
  width: 100%;
  height: 100%;
  display: block;
  user-select: none;
}

.court-tokens-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Player Tokens (1-5) */
.player-token {
  position: absolute;
  width: 42px;
  height: 42px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 1.15rem;
  box-shadow: 0 5px 14px rgba(0, 0, 0, 0.55);
  transition: left var(--transition-step), top var(--transition-step), transform 0.25s ease, opacity 0.25s ease;
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
}

.player-token .pos-sub {
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  margin-top: -2px;
  opacity: 0.9;
}

.player-token.dimmed {
  opacity: 0.38;
  transform: translate(-50%, -50%) scale(0.9);
}

.player-token.spotlighted {
  z-index: 9;
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow: 0 0 0 4px var(--lakers-gold), 0 0 22px rgba(253, 185, 39, 0.95);
  animation: pulseSpotlight 1.4s infinite ease-in-out;
}

@keyframes pulseSpotlight {
  0%, 100% {
    box-shadow: 0 0 0 4px var(--lakers-gold), 0 0 18px rgba(253, 185, 39, 0.85);
  }
  50% {
    box-shadow: 0 0 0 7px rgba(253, 185, 39, 0.55), 0 0 28px rgba(253, 185, 39, 1);
  }
}

/* Basketball Token */
.ball-token {
  position: absolute;
  width: 24px;
  height: 24px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff9e44, #e65100 75%);
  border: 1.5px solid #2b1100;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.65), 0 0 8px rgba(253, 185, 39, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: left var(--transition-step), top var(--transition-step);
  z-index: 10;
}

/* SVG Action Lines */
.action-path {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

.action-pass {
  stroke: #FDB927;
  stroke-width: 4;
  stroke-dasharray: 9 7;
  animation: dashFlow 0.9s linear infinite;
}

.action-cut {
  stroke: #ffffff;
  stroke-width: 4;
}

.action-dribble {
  stroke: #38bdf8;
  stroke-width: 3.8;
}

.action-screen {
  stroke: #f43f5e;
  stroke-width: 4.5;
}

.action-shot {
  stroke: #4ade80;
  stroke-width: 4.5;
  stroke-dasharray: 5 5;
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -16;
  }
}

.action-label-bg {
  fill: rgba(18, 8, 31, 0.88);
  stroke: rgba(253, 185, 39, 0.6);
  stroke-width: 1;
  rx: 5;
}

.action-label-text {
  fill: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 800;
  text-anchor: middle;
  dominant-baseline: central;
}

/* Court Legend */
.court-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 0.6rem;
  padding-top: 0.45rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.76rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.line-sample {
  display: inline-block;
  width: 20px;
  height: 4px;
  border-radius: 2px;
}

.line-sample.pass {
  background: repeating-linear-gradient(90deg, #FDB927 0 6px, transparent 6px 10px);
}
.line-sample.cut {
  background: #ffffff;
}
.line-sample.dribble {
  background: #38bdf8;
}
.line-sample.screen {
  background: #f43f5e;
}
.line-sample.shot {
  background: #4ade80;
}

/* ==================== PLAYBACK CONTROLS CARD ==================== */
.playback-controls-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.step-dots-bar {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
}

.step-dot-btn {
  flex: 1;
  min-width: 62px;
  padding: 0.42rem 0.5rem;
  border-radius: 8px;
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  background: var(--bg-card-elevated);
  color: var(--text-secondary);
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.16s ease;
  text-align: center;
}

.step-dot-btn:hover {
  border-color: var(--lakers-gold);
  color: #fff;
}

.step-dot-btn.active {
  background: var(--lakers-gold);
  color: #190a2e;
  border-color: #fff;
  box-shadow: 0 2px 10px rgba(253, 185, 39, 0.4);
}

.transport-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}

.ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: var(--bg-card-elevated);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.ctrl-btn:hover:not(:disabled) {
  border-color: var(--lakers-gold);
  transform: translateY(-1px);
}

.ctrl-btn:active:not(:disabled) {
  transform: translateY(0);
}

.ctrl-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ctrl-btn.step-nav {
  background: #2b1d47;
  border-color: rgba(253, 185, 39, 0.4);
  padding: 0.6rem 1.15rem;
}

.ctrl-btn.primary-play {
  flex: 1;
  max-width: 230px;
  background: linear-gradient(135deg, var(--lakers-gold) 0%, #e59b00 100%);
  color: #190a2e;
  border-color: #fff;
  font-size: 1.02rem;
  box-shadow: 0 6px 18px rgba(253, 185, 39, 0.35);
}

.ctrl-btn.primary-play.playing {
  background: linear-gradient(135deg, #f43f5e 0%, #be123c 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.4);
}

.ctrl-btn.speed-btn {
  font-size: 0.82rem;
  padding: 0.55rem 0.75rem;
  color: var(--lakers-gold);
}

/* ==================== RIGHT COACHING NOTES PANEL ==================== */
.coaching-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.step-instruction-card {
  background: linear-gradient(160deg, #24163d 0%, #170e29 100%);
  border: 2px solid var(--lakers-gold);
  border-radius: var(--radius-lg);
  padding: 1.1rem;
  box-shadow: var(--shadow-lg);
}

.step-card-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.6rem;
}

.step-badge-gold {
  background: var(--lakers-gold);
  color: #18092c;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.76rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  flex-shrink: 0;
}

.step-card-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.12rem;
  color: #fff;
}

.step-cue-text {
  font-size: 0.96rem;
  color: #f3effb;
  line-height: 1.55;
  margin-bottom: 0.95rem;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  border-left: 4px solid var(--lakers-gold);
}

.spotlights-box h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lakers-gold);
  margin-bottom: 0.5rem;
}

.spotlight-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.spotlight-list li {
  font-size: 0.86rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  color: var(--text-primary);
  font-weight: 500;
}

.play-overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.05rem;
  box-shadow: var(--shadow-lg);
}

.play-overview-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1rem;
  color: var(--lakers-gold);
  margin-bottom: 0.45rem;
}

.play-summary-text {
  font-size: 0.86rem;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.keypoints-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.keypoints-list li {
  position: relative;
  padding-left: 1.35rem;
  font-size: 0.84rem;
  color: var(--text-primary);
}

.keypoints-list li::before {
  content: "✔";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--lakers-gold);
  font-weight: 900;
}

/* ==================== BASE CONCEPTS VIEW ==================== */
.concepts-hero {
  background: linear-gradient(135deg, rgba(85, 37, 131, 0.55) 0%, rgba(25, 18, 41, 0.95) 100%);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.hero-pill {
  display: inline-block;
  background: var(--lakers-gold);
  color: #190a2e;
  font-family: 'Outfit', sans-serif;
  font-weight: 900;
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 0.35rem;
}

.concepts-hero-text h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.55rem;
  color: #fff;
  margin-bottom: 0.25rem;
}

.concepts-hero-text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 680px;
}

.concept-category-pills {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.concepts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.2rem;
}

.concept-card {
  background: var(--bg-card);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: var(--shadow-lg);
}

.concept-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.concept-cat-tag {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(253, 185, 39, 0.16);
  color: var(--lakers-gold);
}

.concept-badge-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.concept-card h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.22rem;
  color: #fff;
}

.concept-tagline {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--lakers-gold);
}

.concept-why {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Mini Visual Court inside Concept Card */
.concept-mini-court {
  background: #130b21;
  border: 1px solid rgba(253, 185, 39, 0.3);
  border-radius: 12px;
  padding: 0.65rem;
}

.concept-mini-svg {
  width: 100%;
  max-height: 200px;
  display: block;
  border-radius: 8px;
}

.concept-diagram-caption {
  text-align: center;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--lakers-gold);
  margin-top: 0.45rem;
}

.concept-rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.concept-rules-list li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.85rem;
  color: var(--text-primary);
}

.concept-rules-list li::before {
  content: "🏀";
  position: absolute;
  left: 0;
  top: 1px;
  font-size: 0.78rem;
}

.concept-protip {
  margin-top: auto;
  background: rgba(253, 185, 39, 0.12);
  border: 1px solid rgba(253, 185, 39, 0.4);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  font-size: 0.82rem;
  color: #ffe299;
  font-weight: 600;
}

/* ==================== MODAL ==================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(8, 4, 15, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-card {
  background: var(--bg-card);
  border: 2px solid var(--lakers-gold);
  border-radius: var(--radius-lg);
  max-width: 820px;
  width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
}

.modal-body {
  padding: 1rem;
  text-align: center;
}

.modal-body img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 8px;
}

/* ==================== RESPONSIVE BREAKPOINTS ==================== */

/* iPad / Tablet Landscape & Portrait (<= 1180px) */
@media (max-width: 1180px) {
  .plays-workspace {
    grid-template-columns: 260px 1fr;
  }

  .coaching-panel {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
}

/* iPad Portrait & Large Phones (<= 860px) */
@media (max-width: 860px) {
  .plays-workspace {
    grid-template-columns: 1fr;
  }

  /* Put Court & Play Controls right below the horizontal play selector on tablets/phones */
  .play-list-panel {
    order: 1;
    padding: 0.8rem;
  }

  .play-cards-list {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    gap: 0.65rem;
    padding-bottom: 0.25rem;
    scroll-snap-type: x mandatory;
  }

  .play-item-card {
    min-width: 235px;
    max-width: 260px;
    flex-shrink: 0;
    scroll-snap-align: start;
  }

  .positions-legend-card {
    display: none;
  }

  .court-stage-column {
    order: 2;
  }

  .coaching-panel {
    order: 3;
    grid-template-columns: 1fr;
  }
}

/* Phone Screens (<= 560px) */
@media (max-width: 560px) {
  .header-inner {
    padding: 0.55rem 0.8rem;
  }

  .brand-emblem {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }

  .brand-text h1 {
    font-size: 1.1rem;
  }

  .brand-subtitle {
    display: none;
  }

  .tab-btn {
    padding: 0.45rem 0.7rem;
    font-size: 0.82rem;
  }

  .app-main {
    padding: 0.65rem 0.65rem 2rem;
  }

  .court-top-bar {
    padding: 0.6rem 0.75rem;
  }

  .active-play-heading h2 {
    font-size: 1.05rem;
  }

  .player-token {
    width: 34px;
    height: 34px;
    font-size: 0.98rem;
    border-width: 2px;
  }

  .player-token .pos-sub {
    font-size: 0.46rem;
  }

  .ball-token {
    width: 20px;
    height: 20px;
    font-size: 0.72rem;
  }

  .transport-row {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .ctrl-btn {
    min-height: 44px;
    padding: 0.5rem 0.75rem;
    font-size: 0.86rem;
  }

  .ctrl-btn.primary-play {
    order: -1;
    flex: 1 1 100%;
    max-width: none;
  }

  .btn-label-sm {
    display: none;
  }

  .concepts-grid {
    grid-template-columns: 1fr;
  }
}
