/* =========================
   RESET / BASE
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-alt: #eef3f9;
  --text: #122033;
  --muted: #5f6f82;
  --primary: #0d7c66;
  --primary-dark: #095b4b;
  --border: #d9e2ec;
  --shadow: 0 12px 35px rgba(18, 32, 51, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1200px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* =========================
   BUTTONS
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.4rem;
  border-radius: 999px;
  font-weight: 700;
  transition: 0.25s ease;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 12px 20px rgba(13, 124, 102, 0.18);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: #fff;
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--surface-alt);
}

/* =========================
   HEADER
========================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 247, 251, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(217, 226, 236, 0.8);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 78px;
}

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--primary);
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.main-nav a {
  font-weight: 600;
  color: var(--muted);
  transition: 0.2s ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

/* =========================
   GENERAL TYPOGRAPHY
========================= */
.eyebrow {
  display: inline-block;
  margin-bottom: 0.9rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
}

.hero h1,
.library-hero h1,
.builder-hero h1,
.planner-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.05em;
}

.hero-text,
.library-intro,
.builder-intro,
.planner-intro {
  margin-top: 1.25rem;
  max-width: 58ch;
  font-size: 1.08rem;
  color: var(--muted);
}

/* =========================
   SECTIONS
========================= */
section {
  padding: 4.5rem 0;
}

.section-heading {
  margin-bottom: 2rem;
  max-width: 700px;
}

.section-heading.center {
  text-align: center;
  margin-inline: auto;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.section-heading p:last-child {
  margin-top: 0.9rem;
  color: var(--muted);
}

/* =========================
   REUSABLE CARDS
========================= */
.filter-card,
.category-card,
.feature-card,
.step-card,
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.filter-card h3,
.category-card h3,
.feature-card h3,
.step-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.filter-card p,
.category-card p,
.feature-card p,
.step-card p {
  color: var(--muted);
}

/* =========================
   HOME PAGE
========================= */
.hero {
  padding: 5rem 0 4rem;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2rem;
  align-items: center;
}

.hero h1 {
  max-width: 11ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.hero-highlights li {
  background: rgba(13, 124, 102, 0.08);
  color: var(--primary-dark);
  padding: 0.7rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
}

.preview-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.preview-topbar {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.preview-topbar span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d7dee7;
}

.preview-info {
  padding: 1rem 0.4rem 0.2rem;
}

.preview-info h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.preview-info p {
  color: var(--muted);
}

/* =========================
   ACCURATE FIELD HOCKEY PITCH
========================= */

.hockey-pitch,
.pitch-preview,
.builder-pitch {
  --line: rgba(255, 255, 255, 0.98);
  --line-w: 2px;
  --inset: 16px;

  /* official field ratios */
  --field-length: 91.40;
  --field-width: 55.00;

  --goal-width-pct: 6.6545%;      /* 3.66 / 55 */
  --line23-pct: 25.0547%;         /* 22.90 / 91.40 */
  --circle-depth-pct: 16.0066%;   /* 14.63 / 91.40 */
  --circle-straight-pct: 6.6545%; /* 3.66 / 55 */
  --broken-offset-pct: 5.4705%;   /* 5.00 / 91.40 */

  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #3ca15d 0%, #2b8c4e 100%);
  border: 6px solid #fff;
}

.pitch-preview {
  min-height: 360px;
  border-radius: 20px;
}

.builder-pitch {
  min-height: 520px;
  border-radius: 24px;
}

.pitch-lines.outer-line {
  position: absolute;
  inset: var(--inset);
  border: var(--line-w) solid var(--line);
  border-radius: 8px;
}

.center-line {
  position: absolute;
  top: var(--inset);
  bottom: var(--inset);
  left: 50%;
  width: var(--line-w);
  transform: translateX(-50%);
  background: var(--line);
}

.center-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--line);
}

.line-23 {
  position: absolute;
  top: var(--inset);
  bottom: var(--inset);
  width: var(--line-w);
  background: var(--line);
}

.left-23 {
  left: var(--line23-pct);
}

.right-23 {
  right: var(--line23-pct);
}

/* goal mouth shown in top view */
.goal {
  position: absolute;
  top: 50%;
  width: 6px;
  height: var(--goal-width-pct);
  transform: translateY(-50%);
  border: 2px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.goal-left {
  left: var(--inset);
  border-left: 0;
}

.goal-right {
  right: var(--inset);
  border-right: 0;
}

/* solid circle line:
   depth = 14.63m from back-line
   straight section = 3.66m
   quarter-circle joins to back-line */
.d-semicircle {
  position: absolute;
  top: 50%;
  width: var(--circle-depth-pct);
  height: var(--circle-straight-pct);
  transform: translateY(-50%);
  border: var(--line-w) solid var(--line);
}

.d-left {
  left: var(--inset);
  border-left: 0;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.d-right {
  right: var(--inset);
  border-right: 0;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

/* broken line:
   outer edge is 5m outside the circle line */
.d-dotted {
  position: absolute;
  top: 50%;
  width: calc(var(--circle-depth-pct) + var(--broken-offset-pct));
  height: calc(var(--circle-straight-pct) + (2 * var(--broken-offset-pct)));
  transform: translateY(-50%);
  border: var(--line-w) dashed rgba(255, 255, 255, 0.9);
}

.d-dotted-left {
  left: var(--inset);
  border-left: 0;
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.d-dotted-right {
  right: var(--inset);
  border-right: 0;
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

/* 8 back-line marks total:
   5m and 10m from nearer goal-post on each side */
.short-corner-marks {
  position: absolute;
  width: 7px;
  height: 2px;
  background: var(--line);
}

.short-left-5-top,
.short-left-5-bottom,
.short-left-10-top,
.short-left-10-bottom {
  left: var(--inset);
}

.short-right-5-top,
.short-right-5-bottom,
.short-right-10-top,
.short-right-10-bottom {
  right: var(--inset);
}

/* offsets from field centre using:
   1.83 + 5.00 = 6.83m
   1.83 + 10.00 = 11.83m
   divide by 55m field width */
.short-left-5-top,
.short-right-5-top {
  top: 37.58%;
}

.short-left-5-bottom,
.short-right-5-bottom {
  top: 62.42%;
}

.short-left-10-top,
.short-right-10-top {
  top: 28.49%;
}

.short-left-10-bottom,
.short-right-10-bottom {
  top: 71.51%;
}

/* homepage players */
.player,
.ball {
  position: absolute;
  border-radius: 50%;
}

.player {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.player-blue {
  background: #3178ff;
}

.player-red {
  background: #ff5a5f;
}

.ball {
  width: 12px;
  height: 12px;
  background: #fff36b;
  box-shadow: 0 0 0 3px rgba(255, 243, 107, 0.18);
}

.p1 { top: 32%; left: 28%; }
.p2 { top: 48%; left: 38%; }
.p3 { top: 66%; left: 30%; }
.p4 { top: 38%; right: 29%; }
.p5 { top: 58%; right: 22%; }
.ball { top: 49%; left: 49%; }

.arrow {
  position: absolute;
  height: 3px;
  background: rgba(255, 255, 255, 0.96);
  transform-origin: left center;
}

.arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

.arrow-one {
  width: 95px;
  left: 41%;
  top: 50%;
  transform: rotate(-10deg);
}

.arrow-two {
  width: 88px;
  left: 54%;
  top: 43%;
  transform: rotate(26deg);
}

/* builder objects */
.builder-player,
.builder-ball,
.builder-cone {
  position: absolute;
}

.builder-player {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.builder-player.blue {
  background: #3178ff;
}

.builder-player.red {
  background: #ff5a5f;
}

.builder-player.keeper {
  background: #2f3542;
}

.builder-ball {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff36b;
  box-shadow: 0 0 0 4px rgba(255, 243, 107, 0.14);
}

.builder-cone {
  width: 14px;
  height: 14px;
  background: #ff9f1c;
  border-radius: 4px;
  transform: rotate(45deg);
}

.bp1 { top: 30%; left: 26%; }
.bp2 { top: 46%; left: 36%; }
.bp3 { top: 66%; left: 28%; }
.bp4 { top: 36%; right: 28%; }
.bp5 { top: 58%; right: 21%; }
.bp6 { top: 50%; left: 9%; transform: translateY(-50%); }

.bb1 { top: 49%; left: 48%; }

.bc1 { top: 28%; left: 46%; }
.bc2 { top: 44%; left: 54%; }
.bc3 { top: 60%; left: 48%; }

.builder-arrow {
  position: absolute;
  height: 3px;
  background: rgba(255, 255, 255, 0.96);
  transform-origin: left center;
}

.builder-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

.pass-arrow {
  width: 100px;
  top: 50%;
  left: 38%;
  transform: rotate(-8deg);
}

.run-arrow {
  width: 85px;
  top: 42%;
  left: 54%;
  transform: rotate(24deg);
}

/* =========================
   HOME PAGE BLOCKS
========================= */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.categories {
  background: linear-gradient(180deg, rgba(255,255,255,0.32) 0%, rgba(238,243,249,0.75) 100%);
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.category-card {
  transition: 0.25s ease;
}

.category-card:hover {
  transform: translateY(-5px);
  border-color: rgba(13, 124, 102, 0.35);
}

.features-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2rem;
  align-items: start;
}

.feature-text p:last-child {
  color: var(--muted);
  margin-top: 1rem;
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(13, 124, 102, 0.1);
  color: var(--primary);
  font-weight: 800;
}

.cta-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow);
}

.cta-box p:last-child {
  color: var(--muted);
  margin-top: 0.6rem;
}

.cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* =========================
   LIBRARY PAGE
========================= */
.library-hero {
  padding: 4.5rem 0 2rem;
}

.library-layout-section {
  padding-top: 1.5rem;
}

.library-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.5rem;
  align-items: start;
}

.filter-sidebar {
  position: sticky;
  top: 100px;
}

.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.filter-panel h2 {
  font-size: 1rem;
  margin-bottom: 0.9rem;
}

.filter-panel label {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
  font-weight: 500;
  cursor: pointer;
}

.filter-panel input[type="checkbox"] {
  accent-color: var(--primary);
}

.search-input,
.sort-select,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.search-input:focus,
.sort-select:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.filter-reset-btn {
  width: 100%;
}

.library-content {
  min-width: 0;
}

.library-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
}

.drill-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.drill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: 0.25s ease;
}

.drill-card:hover {
  transform: translateY(-4px);
}

.drill-card-preview {
  position: relative;
  min-height: 190px;
  background: linear-gradient(180deg, #3ca15d 0%, #2b8c4e 100%);
  overflow: hidden;
}

.pitch-card-preview::before {
  content: "";
  position: absolute;
  inset: 14px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 10px;
}

.drill-card-body {
  padding: 1.2rem;
}

.drill-badge {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(13, 124, 102, 0.1);
  color: var(--primary-dark);
  font-size: 0.82rem;
  font-weight: 800;
}

.drill-card h3 {
  font-size: 1.12rem;
  margin-bottom: 0.45rem;
}

.drill-meta {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.drill-description {
  margin-top: 0.8rem;
  color: var(--muted);
}

.drill-tags,
.session-drill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.drill-tags span,
.session-drill-tags span {
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.83rem;
  font-weight: 700;
}

.mini-player,
.mini-ball {
  position: absolute;
  border-radius: 50%;
}

.mini-player {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.mini-player.blue {
  background: #3178ff;
}

.mini-player.red {
  background: #ff5a5f;
}

.mini-ball {
  width: 10px;
  height: 10px;
  background: #fff36b;
}

.a1 { top: 32%; left: 22%; }
.a2 { top: 52%; left: 31%; }
.a3 { top: 44%; right: 25%; }
.mini-ball { top: 46%; left: 48%; }

.b1 { top: 25%; left: 24%; }
.b2 { top: 52%; left: 26%; }
.b3 { top: 36%; left: 46%; }
.b4 { top: 48%; right: 24%; }
.bball { top: 37%; left: 57%; }

.c1 { top: 48%; left: 22%; }
.c2 { top: 30%; left: 40%; }
.c3 { top: 42%; right: 26%; }
.cball { top: 40%; left: 52%; }

.d1 { top: 58%; left: 36%; }
.d2 { top: 28%; right: 35%; }
.d3 { top: 48%; right: 24%; }
.dball { top: 40%; left: 50%; }

.e1 { top: 34%; left: 24%; }
.e2 { top: 54%; left: 39%; }
.e3 { top: 38%; right: 24%; }
.eball { top: 46%; left: 50%; }

.f1 { top: 55%; left: 22%; }
.f2 { top: 30%; right: 34%; }
.f3 { top: 52%; right: 18%; }
.fball { top: 42%; left: 48%; }

/* =========================
   BUILDER PAGE
========================= */
.builder-hero {
  padding: 4.5rem 0 2rem;
}

.builder-section {
  padding-top: 1.5rem;
}

.builder-layout {
  display: grid;
  grid-template-columns: 260px 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

.builder-tools h2,
.builder-settings h2,
.builder-canvas-panel h2,
.timeline-panel h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.tool-group + .tool-group {
  margin-top: 1.4rem;
}

.tool-group h3 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--muted);
}

.tool-buttons {
  display: grid;
  gap: 0.7rem;
}

.tool-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: 0.2s ease;
}

.tool-btn:hover,
.active-tool {
  background: var(--surface-alt);
  border-color: rgba(13, 124, 102, 0.35);
}

.builder-canvas-wrap {
  display: grid;
  gap: 1.25rem;
}

.canvas-topbar,
.timeline-header,
.planner-header-top,
.planner-list-header,
.session-drill-top,
.summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.canvas-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.canvas-btn,
.timeline-add-btn {
  padding: 0.75rem 1rem;
}

.builder-player,
.builder-ball,
.builder-cone {
  position: absolute;
}

.builder-player {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.builder-player.blue {
  background: #3178ff;
}

.builder-player.red {
  background: #ff5a5f;
}

.builder-player.keeper {
  background: #2f3542;
}

.builder-ball {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #fff36b;
  box-shadow: 0 0 0 4px rgba(255, 243, 107, 0.14);
}

.builder-cone {
  width: 14px;
  height: 14px;
  background: #ff9f1c;
  border-radius: 4px;
  transform: rotate(45deg);
}

.bp1 { top: 30%; left: 26%; }
.bp2 { top: 46%; left: 36%; }
.bp3 { top: 66%; left: 28%; }
.bp4 { top: 36%; right: 28%; }
.bp5 { top: 58%; right: 21%; }
.bp6 { top: 50%; left: 9%; transform: translateY(-50%); }

.bb1 { top: 49%; left: 48%; }

.bc1 { top: 28%; left: 46%; }
.bc2 { top: 44%; left: 54%; }
.bc3 { top: 60%; left: 48%; }

.builder-arrow {
  position: absolute;
  height: 3px;
  background: rgba(255, 255, 255, 0.96);
  transform-origin: left center;
}

.builder-arrow::after {
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

.pass-arrow {
  width: 100px;
  top: 50%;
  left: 38%;
  transform: rotate(-8deg);
}

.run-arrow {
  width: 85px;
  top: 42%;
  left: 54%;
  transform: rotate(24deg);
}

.timeline-list {
  display: grid;
  gap: 0.9rem;
}

.timeline-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
}

.active-step {
  border-color: rgba(13, 124, 102, 0.35);
  background: rgba(13, 124, 102, 0.04);
}

.step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(13, 124, 102, 0.1);
  color: var(--primary);
  font-weight: 800;
}

.timeline-step h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.timeline-step p {
  color: var(--muted);
}

.builder-form,
.planner-form {
  display: grid;
  gap: 1rem;
}

.form-group {
  display: grid;
  gap: 0.45rem;
}

.form-group label {
  font-weight: 700;
  font-size: 0.95rem;
}

.form-group textarea {
  resize: vertical;
}

.details-header {
  margin-bottom: 1rem;
}

.details-header p {
  color: var(--muted);
  font-size: 0.95rem;
}

.highlight-group {
  padding: 1rem;
  border: 2px solid rgba(13, 124, 102, 0.18);
  border-radius: 14px;
  background: rgba(13, 124, 102, 0.04);
}

.highlight-group small {
  color: var(--muted);
  font-size: 0.85rem;
}

.save-message {
  min-height: 24px;
  margin-bottom: 1rem;
  font-weight: 700;
  color: var(--primary);
}

.save-message.error {
  color: #c0392b;
}

/* =========================
   SESSION PLANNER PAGE
========================= */
.planner-hero {
  padding: 4.5rem 0 2rem;
}

.planner-section {
  padding-top: 1.5rem;
}

.planner-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}

.planner-main {
  display: grid;
  gap: 1.5rem;
}

.planner-header-top p,
.planner-list-header p {
  color: var(--muted);
  margin-top: 0.35rem;
}

.planner-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.planner-form {
  margin-top: 1.25rem;
}

.planner-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.session-drill-list {
  display: grid;
  gap: 1rem;
  margin-top: 1.25rem;
}

.session-drill-card {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
}

.session-drill-time {
  display: flex;
  justify-content: center;
}

.session-drill-time span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(13, 124, 102, 0.1);
  color: var(--primary);
  font-weight: 800;
}

.session-drill-duration {
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: var(--surface-alt);
  font-weight: 700;
  font-size: 0.9rem;
}

.session-drill-meta {
  margin-top: 0.4rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.95rem;
}

.session-drill-description {
  margin-top: 0.75rem;
  color: var(--muted);
}

.planner-sidebar {
  display: grid;
  gap: 1rem;
  position: sticky;
  top: 100px;
}

.session-summary-card h2,
.planner-sidebar .panel-card h2 {
  margin-bottom: 1rem;
}

.summary-list {
  display: grid;
  gap: 0.9rem;
}

.summary-row {
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.summary-row span {
  color: var(--muted);
}

.objective-list {
  display: grid;
  gap: 0.9rem;
}

.objective-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.objective-item span {
  width: 12px;
  height: 12px;
  margin-top: 0.35rem;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.objective-item p {
  color: var(--muted);
}

.planner-quick-actions {
  display: grid;
  gap: 0.75rem;
}

/* =========================
   EMPTY STATE
========================= */
.empty-state {
  margin-top: 1.25rem;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.empty-state h3 {
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.empty-state p {
  color: var(--muted);
}

/* =========================
   SAVED DRILL CARDS
========================= */
.saved-preview {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 1rem;
  background: linear-gradient(180deg, #12344d 0%, #0d2436 100%);
  color: #fff;
}

.saved-preview-label {
  display: inline-block;
  align-self: flex-start;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.saved-preview-content {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.saved-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.75);
}

.saved-dot.blue {
  background: #3178ff;
}

.saved-dot.red {
  background: #ff5a5f;
}

.saved-dot.yellow {
  background: #fff36b;
  border-color: rgba(255, 243, 107, 0.55);
}

/* =========================
   FOOTER
========================= */
.site-footer {
  padding: 1.5rem 0 2.5rem;
}

.footer-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.footer-wrapper p,
.footer-links a {
  color: var(--muted);
  font-size: 0.95rem;
}

.footer-links {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1200px) {
  .builder-layout {
    grid-template-columns: 240px 1fr;
  }

  .builder-settings {
    grid-column: 1 / -1;
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .filter-grid,
  .workflow-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .category-grid,
  .feature-list,
  .drill-grid,
  .planner-layout,
  .library-layout {
    grid-template-columns: 1fr;
  }

  .filter-sidebar,
  .planner-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .canvas-topbar,
  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .builder-pitch {
    min-height: 420px;
  }
}

@media (max-width: 820px) {
  .nav-wrapper {
    flex-wrap: wrap;
    justify-content: center;
    padding: 1rem 0;
  }

  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero {
    padding-top: 3.5rem;
  }

  .hero h1 {
    max-width: none;
  }

  .cta-box,
  .footer-wrapper {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 780px) {
  .planner-form-grid {
    grid-template-columns: 1fr;
  }

  .planner-header-top,
  .planner-list-header,
  .session-drill-top,
  .library-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .session-drill-card {
    grid-template-columns: 1fr;
  }

  .session-drill-time {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  section {
    padding: 3.5rem 0;
  }

  .filter-grid,
  .category-grid,
  .feature-list,
  .workflow-steps,
  .drill-grid {
    grid-template-columns: 1fr;
  }

  .pitch-preview {
    min-height: 280px;
  }

  .builder-pitch {
    min-height: 320px;
  }

  .btn {
    width: 100%;
  }

  .hero-actions,
  .cta-actions {
    width: 100%;
  }

  .hero-highlights {
    flex-direction: column;
  }
  /* =========================
   PITCH FRAME / ALIGNMENT FIX
========================= */
.pitch-preview,
.builder-pitch {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 99.4 / 61;
  overflow: hidden;
  border-radius: 24px;
}

.pitch-preview {
  border-radius: 20px;
}

.hockey-pitch-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: inherit;
  background: linear-gradient(180deg, #3ca15d 0%, #2b8c4e 100%);
}

/* actual field area inside the SVG margins:
   left/right margin = 4 / 99.4 = 4.02%
   top/bottom margin = 3 / 61 = 4.92%
*/
.field-overlay {
  position: absolute;
  left: 4.02%;
  right: 4.02%;
  top: 4.92%;
  bottom: 4.92%;
  z-index: 3;
}

/* homepage positions inside actual field */
.hp1 { top: 30%; left: 28%; }
.hp2 { top: 46%; left: 39%; }
.hp3 { top: 63%; left: 31%; }
.hp4 { top: 37%; left: 66%; }
.hp5 { top: 56%; left: 74%; }
.hball { top: 48%; left: 49%; }

.home-arrow.one {
  position: absolute;
  z-index: 3;
  width: 86px;
  left: 42%;
  top: 49%;
  transform: rotate(-10deg);
}

.home-arrow.two {
  position: absolute;
  z-index: 3;
  width: 78px;
  left: 54%;
  top: 43%;
  transform: rotate(22deg);
}

/* builder positions inside actual field */
.bp1 { top: 30%; left: 28%; }
.bp2 { top: 46%; left: 39%; }
.bp3 { top: 63%; left: 31%; }
.bp4 { top: 37%; left: 66%; }
.bp5 { top: 56%; left: 74%; }
.bp6 { top: 48%; left: 6%; transform: translateY(-50%); }

.bb1 { top: 48%; left: 49%; }

.bc1 { top: 29%; left: 46%; }
.bc2 { top: 44%; left: 54%; }
.bc3 { top: 59%; left: 48%; }

.pass-arrow {
  width: 92px;
  top: 49%;
  left: 40%;
  transform: rotate(-8deg);
}

.run-arrow {
  width: 78px;
  top: 43%;
  left: 54%;
  transform: rotate(22deg);
}
/* =========================
   SAVED DRILL ACTIONS
========================= */
.saved-preview-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.delete-saved-drill-btn {
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.delete-saved-drill-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}
/* =========================
   DRILL CARD ACTIONS
========================= */
.drill-card-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.drill-card-actions .btn {
  width: auto;
}

/* =========================
   SESSION DRILL ACTIONS
========================= */
.session-drill-top-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.remove-session-drill-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.remove-session-drill-btn:hover {
  background: var(--surface-alt);
}
/* =========================
   INTERACTIVE BUILDER V1
========================= */
.builder-tool-message {
  min-height: 22px;
  margin-bottom: 1rem;
  color: var(--muted);
  font-weight: 600;
}

.builder-tool-btn.active-placement-tool,
#selectToolBtn.active-placement-tool {
  background: var(--surface-alt);
  border-color: rgba(13, 124, 102, 0.35);
}

#builderDynamicItems {
  position: absolute;
  inset: 0;
  z-index: 5;
}

.builder-item {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: grab;
  z-index: 6;
}

.builder-item:active {
  cursor: grabbing;
}

.builder-item.selected {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 3px;
  z-index: 7;
}

.builder-item.blue-player,
.builder-item.red-player,
.builder-item.goalkeeper {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.8);
}

.builder-item.blue-player {
  background: #3178ff;
}

.builder-item.red-player {
  background: #ff5a5f;
}

.builder-item.goalkeeper {
  background: #2f3542;
}

.builder-item.cone {
  width: 12px;
  height: 12px;
  background: #ff9f1c;
  border-radius: 3px;
  transform: translate(-50%, -50%) rotate(45deg);
}

.builder-item.ball {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff36b;
  box-shadow: 0 0 0 4px rgba(255, 243, 107, 0.14);
}

.builder-static-item {
  pointer-events: none;
}

@media (max-width: 640px) {
  .builder-item.blue-player,
  .builder-item.red-player,
  .builder-item.goalkeeper {
    width: 18px;
    height: 18px;
  }

  .builder-item.cone,
  .builder-item.ball {
    width: 10px;
    height: 10px;
  }
}
/* =========================
   ARROW DRAWING V1 - FIXED
========================= */
.builder-item.pass-arrow,
.builder-item.run-arrow,
.builder-item.shot-arrow,
.builder-arrow-preview {
  position: absolute;
  height: 0;
  transform-origin: 0 0;
  background: transparent;
  pointer-events: auto;
}

.builder-item.pass-arrow::before,
.builder-item.run-arrow::before,
.builder-item.shot-arrow::before,
.builder-arrow-preview::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1.5px;
  width: 100%;
  height: 3px;
  border-radius: 999px;
}

.builder-item.pass-arrow::after,
.builder-item.run-arrow::after,
.builder-item.shot-arrow::after,
.builder-arrow-preview::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 0;
  width: 10px;
  height: 10px;
  transform: translateY(-50%) rotate(45deg);
  background: transparent;
}

/* pass */
.builder-item.pass-arrow::before {
  background: rgba(255, 255, 255, 0.96);
}

.builder-item.pass-arrow::after {
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

/* run */
.builder-item.run-arrow::before {
  height: 0;
  border-top: 3px dashed rgba(255, 255, 255, 0.96);
  border-radius: 0;
  top: 0;
}

.builder-item.run-arrow::after {
  border-top: 3px solid #fff;
  border-right: 3px solid #fff;
}

/* shot */
.builder-item.shot-arrow::before {
  background: #ffd84d;
}

.builder-item.shot-arrow::after {
  border-top: 3px solid #ffd84d;
  border-right: 3px solid #ffd84d;
}

/* preview */
.builder-arrow-preview {
  pointer-events: none;
  z-index: 9;
}

.builder-arrow-preview::before {
  background: rgba(255, 255, 255, 0.55);
}

.builder-arrow-preview::after {
  border-top: 3px solid rgba(255, 255, 255, 0.55);
  border-right: 3px solid rgba(255, 255, 255, 0.55);
}

.builder-item.selected.pass-arrow,
.builder-item.selected.run-arrow,
.builder-item.selected.shot-arrow {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 6px;
}

.builder-field-overlay.arrow-mode {
  cursor: crosshair;
}

.builder-item.selected.pass-arrow,
.builder-item.selected.run-arrow,
.builder-item.selected.shot-arrow {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 5px;
}

.builder-field-overlay.arrow-mode {
  cursor: crosshair;
}
.drill-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.drill-card-actions .btn {
  width: auto;
}
/* builder lock: block only the pitch interaction */
.builder-locked .builder-field-overlay {
  pointer-events: none;
  cursor: default !important;
}

.builder-pitch.builder-locked {
  position: relative;
}

.builder-pitch.builder-locked::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(18, 32, 51, 0.10);
  z-index: 6;
  pointer-events: none;
  border-radius: inherit;
}

.builder-tool-message-warning {
  color: #8a5b00;
  background: rgba(255, 216, 77, 0.18);
  border: 1px solid rgba(255, 216, 77, 0.35);
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
}

.pitch-size-btn.active-tool {
  background: var(--surface-alt);
  border-color: rgba(13, 124, 102, 0.35);
}

.pitch-size-btn.active-tool {
  background: var(--surface-alt);
  border-color: rgba(13, 124, 102, 0.35);
}
/* =========================
   BIGGER BUILDER PITCH
========================= */
.builder-layout {
  grid-template-columns: 220px minmax(0, 1.45fr) 320px;
}

.builder-pitch {
  height: 720px;
  aspect-ratio: auto !important;
}

.builder-canvas-panel {
  padding-bottom: 1rem;
}

.builder-empty-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
}

.builder-empty-card {
  max-width: 520px;
  text-align: center;
  background: rgba(18, 32, 51, 0.55);
  color: #fff;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  backdrop-filter: blur(4px);
  margin-top: 0.5rem;
}

.builder-empty-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.builder-empty-card p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.92rem;
}

@media (max-width: 1200px) {
  .builder-layout {
    grid-template-columns: 220px 1fr;
  }
}

@media (max-width: 900px) {
  .builder-layout {
    grid-template-columns: 1fr;
  }

  .builder-pitch {
    height: 560px;
  }
}

@media (max-width: 640px) {
  .builder-pitch {
    height: 420px;
  }
}
}