/* Fret Footy — griffin red, black, white, Pomfret campus behind the pages. */

:root {
  --pitch: #0a0a0a;
  --pitch-2: #14080a;
  --grass: #c8102e;
  --line: rgba(255, 255, 255, 0.14);
  --cream: #ffffff;
  --muted: #ffffff;
  --gold: #c8102e;
  --card: rgba(16, 10, 12, 0.82);
  --card-2: rgba(28, 12, 16, 0.88);
  --danger: #ef6b6b;
  --font: "Barlow", system-ui, sans-serif;
  --display: "Oswald", "Barlow", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  background:
    linear-gradient(180deg, rgba(10, 6, 8, 0.72) 0%, rgba(8, 4, 6, 0.88) 45%, rgba(6, 2, 4, 0.94) 100%),
    url("../img/pomfret-campus.png") center 30% / cover no-repeat fixed;
  color: #fff;
}
button, input, select, textarea { font-family: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); letter-spacing: .04em; margin: 0; color: #fff; }
a { color: #c8102e; }

.site-header {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 16px 28px; border-bottom: 1px solid var(--line);
  background: rgba(10, 6, 8, 0.78);
  backdrop-filter: blur(10px);
  position: sticky; top: 0; z-index: 10;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; background: none; border: 0; color: inherit; text-align: left; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 12px; padding: 0; overflow: hidden;
  background: #111; border: 2px solid #c8102e;
  display: grid; place-items: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand small { display: block; color: #c8102e; letter-spacing: .18em; font-size: 10px; text-transform: uppercase; }
.nav { display: flex; flex-wrap: wrap; gap: 6px; }
.nav a, .nav button, .btn {
  background: transparent; border: 1px solid var(--line); color: #fff;
  border-radius: 999px; padding: 8px 14px; cursor: pointer; font-weight: 600;
}
.nav a { text-decoration: none; display: inline-flex; align-items: center; }
.nav button.active, .btn.gold { background: #c8102e; color: #fff; border-color: #c8102e; }
.btn.primary { background: #c8102e; border-color: transparent; color: #fff; }
.btn.ghost { background: transparent; color: #fff; }
.btn.danger { background: #c8102e; border-color: #c8102e; color: #fff; }
.btn.small { padding: 5px 10px; font-size: 12px; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; transform: none; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 80px; }
.play-frame {
  width: 100%; aspect-ratio: 16 / 9; margin-top: 16px;
  border: 1px solid var(--line); border-radius: 16px; background: #000; display: block;
}
.hero {
  display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; margin-bottom: 28px;
}
.hero-main {
  background:
    linear-gradient(160deg, rgba(200, 16, 46, 0.55), rgba(10, 6, 8, 0.82) 58%),
    url("../img/fret-footy-logo.jpg") center 40% / cover no-repeat;
  border: 1px solid var(--line); border-radius: 24px; padding: 32px;
  min-height: 280px;
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
.kicker { color: #c8102e; letter-spacing: .22em; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); margin: 8px 0 10px; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.65); }
.sub { color: #fff; font-size: 18px; max-width: 36ch; text-shadow: 0 1px 10px rgba(0,0,0,.55); }
.hero-side { display: grid; gap: 12px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
}
.card h3 { margin-bottom: 10px; font-size: 16px; color: #c8102e; }
.muted { color: #fff; }
.faint { color: #fff; font-size: 13px; }

.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.three { grid-template-columns: repeat(3, 1fr); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: #c8102e; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; padding: 8px 6px; }
td { padding: 10px 6px; border-top: 1px solid var(--line); color: #fff; }
tr.clickable { cursor: pointer; }
tr.clickable:hover { background: rgba(200, 16, 46, 0.18); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.crest {
  width: 28px; height: 28px; border-radius: 8px; display: inline-grid; place-items: center;
  font-size: 10px; font-weight: 800; color: #fff; margin-right: 8px; vertical-align: middle;
  overflow: hidden; flex-shrink: 0;
}
.crest.logo {
  width: 36px; height: 36px; border-radius: 50%; background: #000; padding: 0;
  border: 2px solid var(--crest, #ea580c);
}
.crest.logo.lg { width: 88px; height: 88px; border-width: 3px; }
.crest.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.ovr {
  font-family: var(--display); font-size: 22px; min-width: 40px; display: inline-block; text-align: center;
  color: #c8102e;
}
.player-face {
  width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: center 18%;
  flex-shrink: 0; border: 1px solid var(--line);
}
.player-card {
  display: flex; gap: 12px; align-items: center; background: var(--card-2);
  border-radius: 14px; padding: 12px; border: 1px solid var(--line); cursor: pointer;
  color: #fff;
}
.profile { display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start; }
.profile-photo {
  width: 200px; height: 250px; object-fit: cover; object-position: center 15%;
  border-radius: 16px; display: block; background: #111;
}
.profile-photo.empty { display: grid; place-items: center; }
.profile-ovr { display: flex; align-items: baseline; gap: 8px; margin: 6px 0 8px; }
.profile-ovr .ovr { font-size: 42px; }
.profile .attrs { grid-template-columns: 88px 1fr; align-items: center; }
.profile-modal { width: min(720px, 100%); }
@media (max-width: 640px) {
  .profile { grid-template-columns: 1fr; }
  .profile-photo { width: 100%; height: 280px; }
}
.pos { font-size: 11px; font-weight: 800; color: #c8102e; width: 32px; }
.ineligible { color: #c8102e; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; }

.match {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.match .side { display: flex; align-items: center; gap: 8px; }
.match .side.away { justify-content: flex-end; text-align: right; }
.score { font-family: var(--display); font-size: 26px; letter-spacing: .08em; color: #fff; }
.score.played { color: #fff; }
.result { font-weight: 800; letter-spacing: .06em; margin-right: 6px; }
.result.w { color: #fff; }
.result.l { color: #c8102e; }
.result.d { color: rgba(255, 255, 255, .7); }
.pred { font-size: 12px; color: #c8102e; }

.rank-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 12px; align-items: start;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.rank-num { font-family: var(--display); font-size: 32px; color: #c8102e; }
.move.up { color: #fff; }
.move.down { color: #c8102e; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab {
  background: transparent; border: 1px solid var(--line); color: #fff;
  border-radius: 999px; padding: 6px 12px; cursor: pointer;
}
.tab.active { color: #fff; background: #c8102e; border-color: #c8102e; }

.field { display: grid; gap: 6px; font-size: 12px; color: #c8102e; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.field input, .field select, .field textarea, .search {
  background: #14080a; border: 1px solid var(--line); color: #fff;
  border-radius: 10px; padding: 8px 10px;
}
.field textarea { min-height: 96px; resize: vertical; }
.form-grid .span { grid-column: 1 / -1; }
.match-stats { display: grid; gap: 8px; margin-top: 8px; max-width: 440px; }
.stat-club { display: flex; align-items: center; gap: 8px; color: #fff; font-weight: 700; margin-top: 6px; }
.stat-row { display: grid; grid-template-columns: 1fr 64px 64px; gap: 8px; align-items: end; }
.stat-row > span { color: #fff; font-size: 14px; padding-bottom: 8px; }
.admin-login { max-width: 420px; margin: 40px auto; }
.toast {
  position: fixed; right: 16px; bottom: 16px; background: var(--card-2);
  border: 1px solid var(--line); padding: 12px 14px; border-radius: 12px; z-index: 20;
  color: #fff;
}
.video-frame { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 16px; background: #000; }
.video-local { width: 100%; border-radius: 16px; background: #000; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 30; padding: 20px; }
.modal { width: min(560px, 100%); background: var(--pitch-2); border: 1px solid var(--line); border-radius: 18px; padding: 20px; color: #fff; }
.attrs { display: grid; grid-template-columns: 1fr 40px; gap: 6px 12px; font-size: 13px; }
.bar { height: 6px; background: #1a0a0c; border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: #c8102e; }

@media (max-width: 860px) {
  .hero, .grid.two, .grid.three { grid-template-columns: 1fr; }
  .site-header { flex-direction: column; align-items: stretch; }
}
