/* Swap! - stadium look: night-green kit, volt accent, jersey lettering. */
:root {
  --pitch-green: #1e7a3d;
  --pitch-green-dark: #10502a;
  --pitch-green-light: #2fa84f;
  --night: #0b1d12;
  --night-2: #13301f;
  --volt: #d4ff3a;
  --volt-dark: #b9e617;
  --paper: #eef3ee;
  --display: 'Barlow Condensed', 'Rubik', sans-serif;
}

body {
  background-color: var(--paper);
  /* faint mown-grass diagonals */
  background-image: repeating-linear-gradient(135deg, rgba(16, 80, 42, .035) 0 2px, transparent 2px 24px);
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #16211a;
  /* keep the footer at the bottom on short pages */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page { flex: 1 0 auto; }

h1, h2, h3, h4, h5, .navbar-brand, .card-title, .btn, .modal-title {
  font-family: var(--display);
}

h1, h2, h3 {
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .01em;
}

h4, h5, .card-title {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .02em;
}

a { color: var(--pitch-green-dark); }
a:hover { color: var(--pitch-green); }

/* --- Navbar: floodlit touchline --- */
.navbar-pitch {
  background:
    linear-gradient(115deg, transparent 62%, rgba(212, 255, 58, .10) 62% 66%, transparent 66% 69%, rgba(212, 255, 58, .06) 69% 71%, transparent 71%),
    var(--night);
  border-bottom: 4px solid var(--volt);
}

.navbar-brand {
  font-size: 1.75rem;
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1;
}

.navbar-brand .ball { display: inline-block; margin-right: .35rem; font-style: normal; }

.navbar-pitch .nav-link {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: rgba(255, 255, 255, .78);
  border-bottom: 3px solid transparent;
}

.navbar-pitch .nav-link:hover,
.navbar-pitch .nav-link:focus-visible { color: var(--volt); }

.navbar-pitch .nav-link.active {
  color: #fff;
  border-bottom-color: var(--volt);
}

.navbar-pitch .navbar-text-user,
.navbar-pitch span.nav-link {
  font-family: 'Rubik', sans-serif;
  font-weight: 400;
  font-size: .9rem;
  text-transform: none;
  letter-spacing: 0;
}

/* --- Buttons: kit colours, jersey lettering --- */
.btn {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 1.05rem;
}

.btn-sm { font-size: .9rem; }
.btn-lg { font-size: 1.3rem; padding: .55rem 1.6rem; }

.btn-primary {
  --bs-btn-bg: var(--pitch-green);
  --bs-btn-border-color: var(--pitch-green);
  --bs-btn-hover-bg: var(--pitch-green-dark);
  --bs-btn-hover-border-color: var(--pitch-green-dark);
  --bs-btn-active-bg: var(--pitch-green-dark);
  --bs-btn-active-border-color: var(--pitch-green-dark);
  --bs-btn-disabled-bg: var(--pitch-green);
  --bs-btn-disabled-border-color: var(--pitch-green);
  --bs-btn-focus-shadow-rgb: 30, 122, 61;
}

.btn-outline-primary {
  --bs-btn-color: var(--pitch-green-dark);
  --bs-btn-border-color: var(--pitch-green);
  --bs-btn-hover-bg: var(--pitch-green);
  --bs-btn-hover-border-color: var(--pitch-green);
  --bs-btn-active-bg: var(--pitch-green-dark);
  --bs-btn-active-border-color: var(--pitch-green-dark);
  --bs-btn-focus-shadow-rgb: 30, 122, 61;
}

.btn-volt {
  --bs-btn-color: var(--night);
  --bs-btn-bg: var(--volt);
  --bs-btn-border-color: var(--volt);
  --bs-btn-hover-color: var(--night);
  --bs-btn-hover-bg: #e4ff7a;
  --bs-btn-hover-border-color: #e4ff7a;
  --bs-btn-active-color: var(--night);
  --bs-btn-active-bg: var(--volt-dark);
  --bs-btn-active-border-color: var(--volt-dark);
  --bs-btn-focus-shadow-rgb: 212, 255, 58;
  box-shadow: 0 4px 0 var(--volt-dark);
}

.btn-volt:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--volt-dark); }

/* --- Page titles: slanted volt underline --- */
.page h1:not(.hero-title) {
  position: relative;
  padding-bottom: .55rem;
}

.page h1:not(.hero-title)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  height: 6px;
  background: var(--volt);
  transform: skewX(-24deg);
  transform-origin: left bottom;
}

.section-title {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .15rem .9rem .1rem .6rem;
  font-size: 1.5rem;
  color: #fff;
  background: var(--night);
  border-left: 6px solid var(--volt);
  transform: skewX(-8deg);
}

/* --- Home hero: floodlit pitch with a scoreboard --- */
.hero-stadium {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 3rem 3rem 4.5rem;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(ellipse at 15% -20%, rgba(255, 255, 255, .28), transparent 55%),
    linear-gradient(90deg, rgba(11, 29, 18, .88) 0%, rgba(11, 29, 18, .55) 55%, rgba(11, 29, 18, .15) 100%),
    repeating-linear-gradient(90deg, var(--pitch-green) 0 64px, var(--pitch-green-light) 64px 128px);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), 0 100%);
  border-radius: 6px 6px 0 0;
}

/* centre circle + halfway line */
.hero-stadium::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -80px;
  width: 260px;
  height: 260px;
  border: 3px solid rgba(255, 255, 255, .35);
  border-radius: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.hero-stadium::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 47px;
  width: 3px;
  background: rgba(255, 255, 255, .35);
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; flex: 1 1 auto; max-width: 44rem; }

.hero-kicker {
  display: inline-block;
  margin-bottom: .75rem;
  padding: .15rem .7rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--night);
  background: var(--volt);
  transform: skewX(-12deg);
}

.hero-title {
  margin-bottom: .75rem;
  font-size: clamp(3.2rem, 9vw, 6rem);
  line-height: .9;
  text-shadow: 0 4px 0 rgba(0, 0, 0, .25);
}

.hero-title .ball { font-style: normal; font-size: .7em; vertical-align: .1em; }

.hero-lead {
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  color: rgba(255, 255, 255, .92);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .4);
}

.hero-score {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  margin-right: 4.5rem;
  padding: .75rem 1.5rem 1rem;
  text-align: center;
  background: var(--night);
  border: 3px solid rgba(255, 255, 255, .15);
  border-top: 5px solid var(--volt);
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .35);
}

.score-num {
  display: block;
  font-family: var(--display);
  font-weight: 800;
  font-size: 4rem;
  line-height: 1;
  color: var(--volt);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 18px rgba(212, 255, 58, .45);
}

.score-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
}

@media (max-width: 767.98px) {
  .hero-stadium { flex-direction: column; align-items: flex-start; padding: 2rem 1.25rem 3.5rem; gap: 1.25rem; }
  .hero-stadium::before { width: 180px; height: 180px; right: -90px; }
  .hero-stadium::after { right: 0; }
  .hero-score { margin-right: 0; display: flex; align-items: baseline; gap: .6rem; padding: .5rem 1rem; }
  .score-num { font-size: 2.5rem; }
  .hero-lead { font-size: 1.05rem; }
}

/* --- Badges: kit tones, price as a volt sticker --- */
.badge {
  font-family: var(--display);
  font-weight: 700;
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-radius: 3px;
}

.badge.bg-secondary { background-color: var(--night) !important; }

.badge.bg-success {
  background-color: var(--volt) !important;
  color: var(--night) !important;
  transform: rotate(-3deg);
  box-shadow: 0 2px 0 var(--volt-dark);
}

.badge.bg-primary { background-color: var(--pitch-green-dark) !important; }

/* --- Cards --- */
.card {
  border: none;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

/* Photo cards: trading-card frame with a kit stripe */
.card:has(> .card-img-top) {
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(11, 29, 18, .14);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:has(> .card-img-top) .card-img-top {
  background-color: #dfe7df;
  border-radius: 5px 5px 0 0;
}

.card:has(> .card-img-top) .card-body {
  position: relative;
  border-top: 5px solid var(--pitch-green);
}

.card:has(> .card-img-top) .card-body::before {
  content: "";
  position: absolute;
  top: -5px;
  left: 0;
  width: 38%;
  height: 5px;
  background: var(--volt);
  clip-path: polygon(0 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

a.text-reset .card:hover,
a.text-reset:focus-visible .card {
  transform: translateY(-4px) rotate(-.6deg);
  box-shadow: 0 12px 22px rgba(11, 29, 18, .22);
}

/* --- Tables: league-table header --- */
.table > thead > tr > th {
  --bs-table-bg: var(--night);
  --bs-table-color: #fff;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  border-bottom: 3px solid var(--volt);
}

/* --- Forms --- */
.form-label {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .25rem;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--pitch-green-light);
  box-shadow: 0 0 0 .25rem rgba(47, 168, 79, .25);
}

.btn-check:checked + .btn-outline-primary {
  background: var(--night);
  border-color: var(--night);
  color: var(--volt);
}

/* --- Admin dashboard stat tiles read like scoreboards --- */
.card.text-center h2 {
  font-size: 3rem;
  color: var(--pitch-green-dark);
}

/* --- Notification popup --- */
#notificationsModal .modal-header {
  background: var(--night);
  color: #fff;
  border-bottom: 4px solid var(--volt);
}

#notificationsModal .modal-title {
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  font-size: 1.6rem;
}

/* --- Footer --- */
.site-footer {
  padding: 1.25rem 0;
  color: rgba(255, 255, 255, .7);
  background: var(--night);
  border-top: 4px solid var(--volt);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.site-footer .brand {
  color: #fff;
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 800;
  letter-spacing: .02em;
}

/* Email addresses read wrong in capitals, so keep this one as typed. */
.site-footer .contact {
  color: var(--volt);
  text-decoration: none;
  text-transform: none;
  letter-spacing: .04em;
}
.site-footer .contact:hover { text-decoration: underline; }

/* --- Card photo cropper --- */
.crop-stage {
  max-width: 100%;
  max-height: 70vh;
  display: none;
}

.crop-stage img {
  display: block;
  max-width: 100%;
}

/* --- Special-card badges: gold, silver, signed --- */
.badge-gold {
  color: #3d2c00;
  background: linear-gradient(135deg, #f6d365, #d4a017);
}
.badge-silver {
  color: #26303a;
  background: linear-gradient(135deg, #eef1f4, #aab4be);
}
.badge-signed {
  color: var(--volt);
  background: var(--night);
}

/* --- Advert banners --- */
.ad-slot {
  position: relative;
  margin: 1.5rem 0;
  text-align: center;
}
.ad-slot img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 0.5rem;
}
.ad-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #6c757d;
  margin-bottom: 0.25rem;
}
