/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bills-blue:   #111111;   /* black — cards, badges, modal */
  --bills-red:    #111111;   /* black — end zones, section headers */
  --shame-accent: #2a2a2a;   /* charcoal — hall of shame */
  --neg-red:      #c0392b;   /* red — negative point values only */
  --silver:       #A5ACAF;   /* Raiders silver — end zone text */
  --field-green:     #3a7d2c;
  --field-green-alt: #347228;
  --white: #ffffff;
  --line-white: rgba(255,255,255,0.55);
}

html { scroll-behavior: smooth; }

body {
  cursor: none; /* replaced by football emoji cursor */
  font-family: 'IBM Plex Mono', 'Arial Black', Arial, sans-serif;
  background: white;       /* out-of-bounds color */
  padding: clamp(140px, 20vw, 280px) 0 2rem; /* top: clears top goalpost; bottom: just breathing room */
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Football emoji cursor ────────────────────────────── */
#cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  font-size: 1.6rem;
  z-index: 9999;
  transform: translate(-50%, -50%);
  user-select: none;
  transition: transform 0.05s linear;
}

/* ── End zones ────────────────────────────────────────── */
.endzone {
  background: var(--bills-red);
  width: 100%;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  position: relative; /* anchors goalposts and the ::before pseudo-element */
}

/* diagonal stripe texture like a real end zone */
.endzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    -55deg,
    transparent,
    transparent 18px,
    rgba(0,0,0,0.06) 18px,
    rgba(0,0,0,0.06) 20px
  );
  pointer-events: none;
}

.endzone-text {
  font-size: clamp(3rem, 13vw, 13rem);
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-family: 'Jersey 25', Impact, 'Arial Black', sans-serif;
  color: var(--silver);
  -webkit-text-stroke: 0;
  text-stroke: 0;
  text-shadow:
    2px 2px 0 rgba(0,0,0,0.4);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.endzone-top    { border-bottom: 5px solid white; }
.endzone-bottom { border-top:    5px solid white; }

.endzone-bottom .endzone-text {
  transform: rotate(180deg);
}

/* ── Goalposts ────────────────────────────────────────── */

.goalpost {
  position: absolute;
  bottom: 100%;        /* sits just above the top end zone back line */
  left: 50%;
  transform: translateX(-50%);
  width: clamp(80px, 12vw, 180px);
  height: auto;
  z-index: 2;
  filter: drop-shadow(3px 4px 6px rgba(0,0,0,0.5));
}

/* bottom end zone: flip so uprights point downward */
.endzone-bottom .goalpost {
  bottom: auto;
  top: 100%;
  transform: translateX(-50%) scaleY(-1);
}

@media (max-width: 480px) {
  .goalpost { display: none; }
}

.field-subtitle {
  font-size: clamp(1.1rem, 2.5vw, 1.8rem);
  font-family: 'Jersey 15', Impact, sans-serif;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  letter-spacing: 0.03em;
  text-align: center;
  max-width: calc(100% - 3rem);
  margin: 2rem auto 0;
  position: relative;
  z-index: 2;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
}

/* ── Gridiron field ───────────────────────────────────── */
.field {
  position: relative;
  padding: 3rem 1.5rem 4rem;
  background-image:
    /* Left hash marks — 4 per 5-yard section, at 20/40/60/80% within each tile */
    repeating-linear-gradient(to bottom,
      transparent 0,
      transparent 20%, white 20%, white calc(20% + 5px), transparent calc(20% + 5px),
      transparent 40%, white 40%, white calc(40% + 5px), transparent calc(40% + 5px),
      transparent 60%, white 60%, white calc(60% + 5px), transparent calc(60% + 5px),
      transparent 80%, white 80%, white calc(80% + 5px), transparent calc(80% + 5px),
      transparent 100%
    ),
    /* Right hash marks — same pattern */
    repeating-linear-gradient(to bottom,
      transparent 0,
      transparent 20%, white 20%, white calc(20% + 5px), transparent calc(20% + 5px),
      transparent 40%, white 40%, white calc(40% + 5px), transparent calc(40% + 5px),
      transparent 60%, white 60%, white calc(60% + 5px), transparent calc(60% + 5px),
      transparent 80%, white 80%, white calc(80% + 5px), transparent calc(80% + 5px),
      transparent 100%
    ),
    /* Full-width yard lines every 5 yards */
    repeating-linear-gradient(to bottom,
      white 0, white 5px,
      transparent 5px, transparent 100%
    ),
    /* Alternating green stripes — one shade per 5-yard band */
    repeating-linear-gradient(to bottom,
      var(--field-green)     0%,
      var(--field-green)     50%,
      var(--field-green-alt) 50%,
      var(--field-green-alt) 100%
    );
  background-size:
    24px 120px,   /* left hash — 24px wide, tiles every 120px */
    24px 120px,   /* right hash — same */
    100% 120px,   /* yard lines — full width, every 120px */
    100% 240px;   /* green stripes — alternates every 240px */
  background-position:
    0 0,
    100% 0,
    0 0,
    0 0;
  background-repeat:
    repeat-y,
    repeat-y,
    repeat-y,
    repeat;
}

.field::after { content: none; }

/* ── Cards container ──────────────────────────────────── */
.cards-container {
  position: relative;
  z-index: 2;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5rem;
}

/* ── Individual punt card ─────────────────────────────── */
.punt-card {
  width: 540px;
  max-width: calc(100% - 3rem);
  margin-left: auto;
  margin-right: auto;
  background: #ffffff;
  border-radius: 10px;
  border: 3px solid var(--bills-blue);
  box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.punt-card:hover {
  box-shadow: 0 10px 32px rgba(0,0,0,0.45);
}

/* full-width gif */
.card-gif {
  width: 100%;
  line-height: 0;
}

.card-gif img {
  display: block;
  width: 100%;
  height: auto;
}

/* summary row */
.card-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.1rem;
  cursor: pointer;
}

/* rank badge */
.card-rank {
  font-family: 'Jersey 25', monospace;
  font-size: 1.8rem;
  font-weight: 400;
  color: var(--bills-blue);
  min-width: 3rem;
  text-align: center;
  flex-shrink: 0;
}

/* text meta */
.card-meta {
  flex: 1;
  min-width: 0;
}

.card-title {
  font-family: 'IBM Plex Mono', sans-serif;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111;
  line-height: 1.2;
}

.card-team {
  font-family: 'IBM Plex Mono', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #111;
  margin-top: 0.1rem;
}

.card-sub {
  font-family: 'IBM Plex Mono', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: #888;
  margin-top: 0.2rem;
}

/* TUPA score badge */
.card-tupa {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bills-blue);
  color: var(--white);
  border-radius: 8px;
  padding: 0.4rem 0.8rem;
  flex-shrink: 0;
}

.tupa-label {
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  opacity: 0.8;
}

.tupa-score {
  font-family: 'Jersey 25', monospace;
  font-size: 1.7rem;
  font-weight: 400;
  line-height: 1.1;
}

/* expand button */
.expand-btn {
  background: none;
  border: 2px solid var(--bills-blue);
  color: var(--bills-blue);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, transform 0.2s;
}

.expand-btn[aria-expanded="true"] {
  background: var(--bills-blue);
  color: var(--white);
  transform: rotate(180deg);
}

/* expanded details */
.card-details {
  border-top: 2px solid var(--bills-blue);
  padding: 1rem 1.2rem 1.2rem;
  background: #f2f2f2;
}

.tupa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.tupa-table th,
.tupa-table td {
  padding: 0.45rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid #ccd4f0;
}

.tupa-table thead th {
  background: var(--bills-blue);
  color: var(--white);
  font-family: 'Jersey 15', monospace;
  font-size: 1.05rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tupa-table tfoot th {
  background: var(--bills-red);
  color: var(--white);
  font-family: 'Jersey 15', monospace;
  font-size: 1.15rem;
  font-weight: 400;
}

.tupa-table tbody tr:last-child td {
  border-bottom: none;
}

.tupa-table td:last-child,
.tupa-table th:last-child {
  text-align: right;
}

/* positive / negative point coloring */
.pts-pos { color: #1a7a1a; font-weight: 700; }
.pts-neg { color: var(--neg-red); font-weight: 700; }
.pts-zero { color: #888; }

/* ── Section dividers ─────────────────────────────────── */
.section-divider {
  position: relative;
  z-index: 2;
  width: 540px;
  max-width: calc(100% - 3rem);
  margin: 2.5rem auto 1.5rem;
  text-align: center;
}

.section-divider::before {
  content: none;
}

.section-divider span {
  position: relative;
  display: inline-block;
  background: #111111;
  color: var(--white);
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-family: 'Jersey 15', Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.1em;
  padding: 0.4rem 1.2rem;
  border-radius: 4px;
}

.shame-divider span {
  background: #111111;
}

/* ── Hall of Shame cards ──────────────────────────────── */
.shame-container .punt-card {
  border-color: var(--shame-accent);
}

.shame-container .card-rank {
  color: var(--shame-accent);
}

.shame-container .card-gif {
  border-bottom-color: var(--shame-accent);
}

.shame-container .card-tupa {
  background: var(--shame-accent);
}

.shame-container .expand-btn {
  border-color: var(--shame-accent);
  color: var(--shame-accent);
}

.shame-container .expand-btn[aria-expanded="true"] {
  background: var(--shame-accent);
  color: var(--white);
}

.shame-container .card-details {
  background: #f0f0f0;
  border-top-color: var(--shame-accent);
}

.shame-container .tupa-table thead th {
  background: var(--shame-accent);
}

.shame-container .tupa-table tfoot th {
  background: #111;
}

/* ── TUPA inline link ─────────────────────────────────── */
.tupa-link {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.tupa-link:hover {
  opacity: 1;
}

/* ── Modal overlay ────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay[hidden] { display: none; }

.modal {
  background: #fff;
  border-radius: 10px;
  border: 3px solid var(--bills-blue);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bills-blue);
  color: var(--white);
  padding: 0.85rem 1.1rem;
  border-radius: 7px 7px 0 0;
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-close {
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.2rem;
  opacity: 0.8;
  transition: opacity 0.15s;
}

.modal-close:hover { opacity: 1; }

.modal-body {
  overflow-y: auto;
  padding: 1rem 1.1rem 1.2rem;
}

/* ── Rules table ──────────────────────────────────────── */
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.rules-table th,
.rules-table td {
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid #dde3f5;
  text-align: left;
}

.rules-table thead th {
  background: var(--bills-red);
  color: var(--white);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.rules-table td:last-child,
.rules-table th:last-child { text-align: right; font-weight: 700; }

.rules-table tr.section-header td {
  background: var(--bills-red);
  color: var(--white);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: left;
  border-bottom: none;
}

/* ── Site footer ──────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: clamp(110px, 17vw, 240px) 1rem 1rem;
  font-size: 0.8rem;
  color: #666;
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 400;
}

.site-footer a {
  color: #444;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-footer a:hover {
  color: #111;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 540px) {
  .card-title { font-size: 0.85rem; }
  .tupa-score { font-size: 1.2rem; }
  .endzone-text { letter-spacing: 0.08em; }
}
