:root {
  --grass: #0f3d2e;
  --grass-2: #14533f;
  --line: #d8f3dc;
  --gold: #d7b46a;
  --ink: #14211c;
  --muted: #66746f;
  --paper: #f6f8f5;
  --card: #ffffff;
  --danger: #9d2525;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

@keyframes panel-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes modal-backdrop-enter {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-card-enter {
  from { opacity: 0; transform: translateY(28px) scale(.88); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lightbox-image-enter {
  from { opacity: 0; transform: scale(.94); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes player-card-reveal {
  0% { opacity: 0; transform: rotateY(-88deg) scale(.82); filter: brightness(1.35) saturate(1.2); }
  55% { opacity: 1; transform: rotateY(10deg) scale(1.035); filter: brightness(1.12) saturate(1.08); }
  100% { opacity: 1; transform: rotateY(0) scale(1); filter: none; }
}

@keyframes profile-data-rise {
  from { opacity: 0; transform: translateY(16px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.hero {
  min-height: 520px;
  color: #fff;
  background:
    linear-gradient(rgba(8, 29, 22, .74), rgba(8, 29, 22, .88)),
    radial-gradient(ellipse at 50% 50%, transparent 0 82px, rgba(255,255,255,.42) 83px 85px, transparent 86px),
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.42) calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(90deg, rgba(255,255,255,.42) 0 2px, transparent 2px calc(100% - 2px), rgba(255,255,255,.42) calc(100% - 2px) 100%),
    linear-gradient(0deg, rgba(255,255,255,.42) 0 2px, transparent 2px calc(100% - 2px), rgba(255,255,255,.42) calc(100% - 2px) 100%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.05) 0 2px, transparent 2px 94px),
    linear-gradient(135deg, #0f3d2e, #1d6a49);
  position: relative;
  overflow: hidden;
}

.hero:before,
.hero:after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}

.hero:before {
  left: 0;
  top: 50%;
  width: 110px;
  height: 180px;
  border: 2px solid rgba(255,255,255,.42);
  border-left: 0;
  transform: translateY(-50%);
}

.hero:after {
  right: 0;
  top: 50%;
  width: 110px;
  height: 180px;
  border: 2px solid rgba(255,255,255,.42);
  border-right: 0;
  transform: translateY(-50%);
}

.topbar, .hero-content, .app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar {
  height: 78px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 1;
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; }
.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.auth-actions span {
  color: rgba(255,255,255,.82);
  font-weight: 800;
}
.badge {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 2px solid var(--gold);
  border-radius: 50%;
  background: rgba(0,0,0,.18);
  color: var(--gold);
  overflow: hidden;
}
.badge img { width: 100%; height: 100%; object-fit: cover; }

.hero-content {
  position: relative;
  z-index: 1;
  padding: 82px 0 110px;
  max-width: 1180px;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: .78rem;
  font-weight: 800;
  color: var(--gold);
}

h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; font-size: clamp(2.4rem, 5vw, 5rem); line-height: .98; margin-bottom: 18px; }
h2 { font-size: 2rem; margin-bottom: 0; }
h3 { margin-bottom: 14px; }
.lead { max-width: 640px; color: rgba(255,255,255,.86); font-size: 1.16rem; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.primary, .secondary, .ghost {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 800;
}
.primary { background: var(--gold); color: #172019; }
.secondary { background: var(--grass); color: #fff; }
.ghost { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.35); }
.ghost.dark { color: var(--ink); border-color: #cfd8d3; background: transparent; }
.small { min-height: 36px; padding: 0 14px; }

.app-shell { padding: 24px 0 56px; }
.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.tab {
  white-space: nowrap;
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--ink);
  background: #e7ece8;
  font-weight: 800;
}
.tab.active { background: var(--grass); color: #fff; }

.panel {
  display: none;
  background: var(--card);
  border: 1px solid #dce4df;
  border-radius: 8px;
  padding: 22px;
}
.panel.active {
  display: block;
  animation: panel-enter .28s ease both;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}
.section-head.compact { margin-top: 22px; margin-bottom: 12px; }
.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.stat, .rank-card, .match-row, .mini-row {
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
}
.stat { padding: 16px; }
.stat strong { display: block; font-size: 2rem; }
.stat span { color: var(--muted); font-weight: 700; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.list { display: grid; gap: 10px; }
.mini-row, .match-row { padding: 14px; }
.mini-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.muted { color: var(--muted); }

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
  padding: 16px;
  border-radius: 8px;
  background: #eef3ef;
}
.form-grid label { display: grid; gap: 6px; font-weight: 800; color: #33423c; }
.suggested-rating-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px;
  border: 1px solid #d7b46a;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(215,180,106,.2), rgba(15,61,46,.08));
}
.suggested-rating-box p { margin: 4px 0 0; }
.check-inline {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
}
.check-inline input { width: auto; }
input, select, textarea {
  width: 100%;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  color: var(--ink);
}
select[multiple] { min-height: 118px; }
.wide { grid-column: 1 / -1; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; }
.hidden { display: none !important; }

.match-builder, .goals-builder {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fbfcfb;
}

.builder-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
}

.builder-head h3 { margin-bottom: 0; }

.match-player-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.match-pick-card {
  min-height: 184px;
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 12px;
  border: 2px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: center;
}

.match-pick-card.white {
  border-color: #c8d3ce;
  background: linear-gradient(180deg, #ffffff, #edf2ef);
}

.match-pick-card.black {
  border-color: #172019;
  background: linear-gradient(180deg, #2b342f, #0d1511);
  color: #fff;
}

.match-pick-card em {
  border-radius: 999px;
  padding: 4px 9px;
  background: var(--gold);
  color: #172019;
  font-style: normal;
  font-weight: 900;
}

.pick-avatar {
  width: 72px;
  height: 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(215,180,106,.24);
  font-weight: 900;
}

.pick-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-focus, center 22%);
}

.goal-player-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 10px;
}

.goal-pick-card {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #dce4df;
  background: #fff;
  color: var(--ink);
  text-align: left;
  font-weight: 900;
}

.goal-pick-card strong {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grass);
  color: #fff;
}

.goal-stepper {
  display: grid;
  grid-template-columns: 52px 1fr 52px;
  gap: 10px;
  align-items: center;
}

.goal-stepper input {
  height: 52px;
  text-align: center;
  font-size: 1.45rem;
  font-weight: 900;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}
.player-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  cursor: pointer;
  border-radius: 8px;
  padding: 14px;
  color: #241c0a;
  background:
    radial-gradient(circle at 82% 12%, rgba(255,255,255,.72), transparent 0 18%, transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.42), transparent 38%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 2px, transparent 2px 14px),
    linear-gradient(145deg, #f9e8a7 0%, #d9b35a 42%, #a97420 100%);
  border: 1px solid rgba(130, 88, 20, .88);
  box-shadow: 0 16px 30px rgba(20, 33, 28, .14);
}

.player-card.silver {
  color: #202527;
  background:
    radial-gradient(circle at 82% 12%, rgba(255,255,255,.82), transparent 0 18%, transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.5), transparent 38%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.2) 0 2px, transparent 2px 14px),
    linear-gradient(145deg, #f3f5f5 0%, #c7ced0 44%, #899397 100%);
  border-color: rgba(110, 121, 126, .92);
}

.player-card.elite {
  color: #fff1b8;
  background:
    radial-gradient(circle at 74% 22%, rgba(96, 186, 255, .55), transparent 0 15%, transparent 34%),
    radial-gradient(circle at 20% 10%, rgba(255, 224, 130, .42), transparent 0 10%, transparent 27%),
    repeating-radial-gradient(circle at 66% 28%, rgba(255, 218, 104, .75) 0 1px, transparent 1px 17px),
    linear-gradient(135deg, rgba(80, 182, 255, .28), transparent 34%),
    linear-gradient(145deg, #04132f 0%, #063a7d 42%, #0b65bf 70%, #031025 100%);
  border: 2px solid #f1cf72;
  box-shadow: 0 18px 36px rgba(4, 22, 62, .38), inset 0 0 0 1px rgba(255,255,255,.12);
}

.player-card.legend {
  color: #16120c;
  background:
    radial-gradient(circle at 50% -6%, rgba(255,255,255,.95), transparent 0 24%, transparent 44%),
    radial-gradient(circle at 82% 18%, rgba(15, 15, 15, .18), transparent 0 12%, transparent 30%),
    radial-gradient(circle at 14% 22%, rgba(221, 177, 86, .42), transparent 0 10%, transparent 28%),
    linear-gradient(90deg, transparent 0 12%, rgba(22, 18, 12, .12) 12% 13%, transparent 13% 87%, rgba(22, 18, 12, .12) 87% 88%, transparent 88%),
    repeating-linear-gradient(135deg, rgba(22, 18, 12, .08) 0 2px, transparent 2px 18px),
    linear-gradient(145deg, #fffdf2 0%, #f3ead2 42%, #d8b766 62%, #11100e 100%);
  border: 2px solid #16120c;
  box-shadow: 0 20px 40px rgba(22, 18, 12, .3), inset 0 0 0 2px rgba(221,177,86,.55), inset 0 0 0 5px rgba(255,255,255,.35);
}

.player-card:before,
.player-card:after {
  content: "";
  position: absolute;
  inset: 9px;
  border-radius: 6px;
  pointer-events: none;
  z-index: -1;
}

.player-card:before {
  border: 1px solid rgba(255,255,255,.42);
}

.player-card.elite:before {
  border: 1px solid rgba(241,207,114,.88);
  box-shadow: inset 0 0 20px rgba(92, 190, 255, .22), 0 0 22px rgba(241,207,114,.14);
}

.player-card.legend:before {
  border: 1px solid rgba(22, 18, 12, .72);
  box-shadow: inset 0 0 0 3px rgba(221,177,86,.32), inset 0 0 24px rgba(22, 18, 12, .16);
}

.player-card:after {
  inset: auto -28px -48px auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255,255,255,.14);
}

.player-card.elite:after {
  inset: 48px -20px auto auto;
  width: 150px;
  height: 120px;
  border-radius: 0;
  background:
    linear-gradient(135deg, transparent 0 24%, rgba(188, 231, 255, .28) 25% 48%, transparent 49%),
    linear-gradient(45deg, transparent 0 35%, rgba(241,207,114,.62) 36% 38%, transparent 39%),
    linear-gradient(155deg, transparent 0 40%, rgba(55, 151, 255, .34) 41% 62%, transparent 63%);
  transform: rotate(-12deg);
}

.player-card.legend:after {
  inset: auto -34px -58px auto;
  width: 172px;
  height: 172px;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 38%, rgba(22, 18, 12, .22) 39% 41%, transparent 42%),
    conic-gradient(from 20deg, rgba(255,255,255,.2), rgba(221,177,86,.42), rgba(22,18,12,.18), rgba(255,255,255,.2));
}

.card-watermark {
  position: absolute;
  right: 12px;
  bottom: 34px;
  z-index: 0;
  font-size: 4.4rem;
  line-height: 1;
  font-weight: 950;
  letter-spacing: -.05em;
  color: rgba(36, 28, 10, .13);
  pointer-events: none;
  transform: rotate(-9deg);
}

.player-card.silver .card-watermark {
  color: rgba(32, 37, 39, .12);
}

.player-card.elite .card-watermark {
  color: rgba(188, 231, 255, .16);
  text-shadow: 0 0 18px rgba(241,207,114,.18);
}

.player-card.legend .card-watermark {
  color: rgba(22, 18, 12, .14);
  text-shadow: 0 1px 0 rgba(255,255,255,.45);
}

.card-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.rating {
  font-size: 2.65rem;
  font-weight: 950;
  line-height: .92;
  text-shadow: 0 1px 0 rgba(255,255,255,.38);
}
.avatar {
  width: 92px;
  height: 108px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.58), rgba(255,255,255,.18));
  font-size: 1.6rem;
  font-weight: 900;
  border: 1px solid rgba(36, 28, 10, .28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.28), 0 10px 18px rgba(36,28,10,.14);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-focus, center 22%);
}
.player-card h3 { margin: 14px 0 4px; font-size: 1.45rem; text-transform: uppercase; letter-spacing: .02em; position: relative; z-index: 1; }
.attrs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 12px; position: relative; z-index: 1; }
.attrs span {
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(36,28,10,.12);
  border-radius: 6px;
  padding: 6px;
  font-weight: 900;
  text-align: center;
}

.player-card.elite .avatar {
  background: linear-gradient(180deg, rgba(93, 184, 255, .46), rgba(8, 33, 87, .5));
  border-color: rgba(241,207,114,.82);
}

.player-card.legend .avatar {
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(22, 18, 12, .1));
  border-color: rgba(22, 18, 12, .65);
}

.player-card.elite .attrs span,
.player-card.elite .text-btn {
  background: rgba(3, 19, 56, .56);
  border-color: rgba(241,207,114,.42);
  color: #fff1b8;
}

.player-card.legend .attrs span,
.player-card.legend .text-btn {
  background: rgba(255, 253, 242, .72);
  border-color: rgba(22, 18, 12, .18);
  color: #16120c;
}

.player-card.elite .muted,
.player-card.elite p {
  color: rgba(255,241,184,.9);
}
.player-card.legend .danger { background: var(--danger); color: #fff; border-color: transparent; }
.card-actions { display: flex; gap: 8px; margin-top: 12px; position: relative; z-index: 1; }
.text-btn { background: rgba(255,255,255,.42); color: #241c0a; border-radius: 6px; padding: 8px 10px; font-weight: 900; }
.danger { background: var(--danger); color: #fff; }
.player-card.elite .danger { background: var(--danger); color: #fff; border-color: transparent; }

.ranking-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.year-filter {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: #33423c;
  font-weight: 900;
}
.rank-card { padding: 14px; }
.rank-card h3 { color: var(--grass); }
.rank-line { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid #edf1ee; }
.rank-line:first-of-type { border-top: 0; }

.pair-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.pair-board {
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #f4f8f5);
  padding: 14px;
}

.pair-board h3 {
  color: var(--grass);
}

.pair-list {
  display: grid;
  gap: 10px;
}

.pair-card {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #d8e4dc;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15,61,46,.08), rgba(215,180,106,.16)),
    #fff;
  color: var(--ink);
  text-align: left;
}

.pair-card:hover {
  border-color: var(--gold);
  box-shadow: 0 10px 22px rgba(20, 33, 28, .08);
}

.pair-rate {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--grass);
  color: #fff;
  font-weight: 900;
  font-size: 1.25rem;
}

.pair-names {
  display: grid;
  gap: 4px;
  font-weight: 900;
}

.pair-names small {
  color: var(--muted);
  font-weight: 800;
}

.pair-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.pair-chip {
  border-radius: 999px;
  background: #eef3ef;
  padding: 5px 8px;
  color: #33423c;
  font-size: .82rem;
  font-weight: 900;
}

.pair-detail-head {
  text-align: center;
  padding: 8px 42px 14px;
}

.pair-detail-head h2 {
  margin-bottom: 8px;
}

.pair-summary {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pair-breakdown {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.pair-match-card {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.pair-match-card strong {
  color: var(--grass);
}

.pair-goal-split {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.match-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15,61,46,.05), rgba(215,180,106,.13)),
    #fff;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.match-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15,61,46,.32);
  box-shadow: 0 14px 24px rgba(20, 33, 28, .1);
}

.match-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.match-card-head h3 {
  margin-bottom: 4px;
}

.winner-badge {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--grass);
  color: #fff;
  font-weight: 900;
}

.winner-badge.draw {
  background: #66746f;
}

.match-teams {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.match-team-card {
  border: 1px solid #e2e9e5;
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  padding: 12px;
}

.match-team-card.black {
  background: #172019;
  color: #fff;
  border-color: #172019;
}

.match-team-card.black h4,
.match-team-card.black p {
  color: #fff;
}

.match-team-card h4 {
  margin: 0 0 8px;
  color: var(--grass);
}

.match-team-card p {
  margin-bottom: 0;
  color: #33423c;
  line-height: 1.5;
}

.match-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mvp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 14px;
}

.mvp-card {
  min-height: 156px;
  display: grid;
  align-content: space-between;
  gap: 14px;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(215,180,106,.24), rgba(15,61,46,.08)),
    #fff;
  padding: 14px;
}

.mvp-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.mvp-date {
  color: var(--muted);
  font-weight: 900;
}

.mvp-name {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--grass);
}

.survey-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(320px, .9fr);
  gap: 16px;
  align-items: start;
}

.survey-card {
  display: grid;
  gap: 14px;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 14px 28px rgba(20,33,28,.08);
}

.survey-modal-card {
  width: min(620px, 100%);
}

.survey-pick-card {
  width: 100%;
  text-align: left;
}

.survey-vote-cta {
  display: inline-flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  width: 100%;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.46);
  border: 1px solid rgba(36,28,10,.16);
  padding: 8px 10px;
  font-weight: 950;
  color: inherit;
}

.player-card.elite .survey-vote-cta {
  background: rgba(3, 19, 56, .56);
  border-color: rgba(241,207,114,.42);
}

.player-card.legend .survey-vote-cta {
  background: rgba(255, 253, 242, .72);
  border-color: rgba(22, 18, 12, .18);
}

.survey-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.survey-head h3 {
  margin: 2px 0 0;
  color: var(--grass);
}

.survey-player-preview {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 12px;
  align-items: center;
  overflow: hidden;
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.42), transparent 38%),
    linear-gradient(145deg, #f9e8a7 0%, #d9b35a 48%, #a97420 100%);
  border: 1px solid rgba(130, 88, 20, .38);
}

.survey-player-preview.silver {
  background: linear-gradient(145deg, #f3f5f5 0%, #c7ced0 52%, #899397 100%);
}

.survey-player-preview.elite {
  color: #fff1b8;
  background: linear-gradient(145deg, #04132f 0%, #063a7d 46%, #0b65bf 74%, #031025 100%);
}

.survey-player-preview.legend {
  background: linear-gradient(145deg, #fffdf2 0%, #f3ead2 48%, #d8b766 74%, #11100e 100%);
}

.survey-player-preview .avatar {
  width: 74px;
  height: 86px;
}

.survey-player-preview strong,
.survey-player-preview span {
  display: block;
}

.survey-player-preview strong {
  font-size: 1.25rem;
  text-transform: uppercase;
}

.survey-player-preview span {
  margin-top: 4px;
  font-weight: 900;
}

.survey-sliders {
  display: grid;
  gap: 10px;
}

.survey-slider {
  display: grid;
  grid-template-columns: 86px 1fr 42px;
  gap: 10px;
  align-items: center;
  border-radius: 8px;
  background: #f1f5f2;
  border: 1px solid #e1e9e4;
  padding: 10px;
  font-weight: 900;
}

.survey-slider input {
  width: 100%;
  accent-color: var(--grass);
}

.survey-slider strong {
  text-align: right;
  color: var(--grass);
  font-size: 1.15rem;
}

.survey-results {
  display: grid;
  gap: 14px;
}

.survey-average-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.survey-average-card {
  border-radius: 8px;
  background: #f1f5f2;
  border: 1px solid #e1e9e4;
  padding: 12px;
}

.survey-average-card strong,
.survey-average-card span,
.survey-average-card b {
  display: block;
}

.survey-average-card b {
  margin-top: 6px;
  color: var(--grass);
  font-size: 1.8rem;
}

.survey-player-group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.survey-player-group-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  background: #f1f5f2;
  border: 1px solid #e1e9e4;
  padding: 12px;
  text-align: left;
}

.survey-player-group-card strong,
.survey-player-group-card span,
.survey-player-group-card small,
.survey-player-group-card b {
  display: block;
}

.survey-player-group-card b {
  color: var(--grass);
  font-size: 1.9rem;
}

.survey-player-group-card small {
  grid-column: 1 / -1;
  color: #65746e;
  font-weight: 800;
}

.survey-group-detail {
  display: grid;
  gap: 12px;
}

.survey-group-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  border-top: 1px solid #e1e9e4;
  padding-top: 12px;
}

.survey-group-head h3 {
  margin: 2px 0 0;
  color: var(--grass);
}

.survey-response-list {
  display: grid;
  gap: 10px;
}

.survey-response {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid #e1e9e4;
  padding: 12px;
}

.survey-response-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.survey-response span,
.survey-response small {
  color: #65746e;
  font-weight: 800;
}

.survey-response-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.survey-response-stats span {
  border-radius: 999px;
  background: #eef3ef;
  padding: 6px 9px;
  color: #33423c;
  font-size: .86rem;
}

.survey-response-stats .survey-diff.up {
  background: #e4f5eb;
  color: #0f6b45;
}

.survey-response-stats .survey-diff.down {
  background: #fde8e8;
  color: #9d2525;
}

.survey-response-stats .survey-diff.same {
  background: #eef3ef;
  color: #65746e;
}

.home-gallery {
  margin-top: 22px;
}

.gallery-carousel {
  position: relative;
  min-height: 260px;
  border-radius: 8px;
  overflow: hidden;
  background: #dce4df;
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .55s ease;
}

.gallery-slide.active {
  opacity: 1;
}

.gallery-slide img,
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-grid {
  columns: 4 220px;
  column-gap: 14px;
}

.gallery-item {
  display: block;
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #dce4df;
  background: #fff;
  cursor: zoom-in;
}

.gallery-item img {
  height: auto;
}

.match-row strong { font-size: 1.05rem; }
.match-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.hint { color: var(--muted); margin-bottom: 16px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.check-tile { border: 1px solid #dce4df; border-radius: 8px; padding: 10px; display: flex; gap: 8px; align-items: center; font-weight: 800; }
.draw-counter {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e7ece8;
  color: var(--grass);
  font-weight: 900;
}
.draw-counter.limit {
  background: var(--gold);
  color: #172019;
}
.team-box { border: 1px solid #dce4df; border-radius: 8px; padding: 16px; background: #fbfcfb; }

.year-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.sunday-card {
  min-height: 88px;
  display: grid;
  align-content: space-between;
  gap: 8px;
  padding: 12px;
  border: 1px solid #cfd8d3;
  border-radius: 8px;
  background: #f3f7f4;
  color: var(--ink);
  text-align: left;
}

.sunday-card strong { font-size: 1.35rem; }
.sunday-card span { color: var(--muted); font-weight: 800; }
.sunday-card.has-match {
  border-color: var(--gold);
  background: linear-gradient(145deg, #fff8df, #f3df9e);
}
.sunday-card.active {
  outline: 3px solid rgba(15, 61, 46, .25);
}

.calendar-detail {
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(8, 29, 22, .72);
  animation: modal-backdrop-enter .22s ease both;
}

.modal-card {
  width: min(1040px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  border-radius: 8px;
  background: #f8fbf8;
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
  padding: 18px;
  transform-origin: center center;
  animation: modal-card-enter .38s cubic-bezier(.18,.88,.22,1.12) both;
}

.modal-close {
  float: right;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.match-modal-head {
  text-align: center;
  padding: 8px 42px 16px;
}

.match-modal-head h2 {
  font-size: 2.35rem;
  margin: 6px 0;
}

.match-score {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 10px 18px;
  border-radius: 8px;
  background: var(--grass);
  color: #fff;
  font-size: 2.4rem;
  font-weight: 900;
}

.pitch-layout {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 1.35fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.modal-team {
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.modal-team h3 {
  color: var(--grass);
}

.modal-team ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 7px;
}

.modal-team li {
  padding: 8px 10px;
  border-radius: 8px;
  background: #eef3ef;
  font-weight: 800;
}

.football-pitch {
  min-height: 360px;
  position: relative;
  border-radius: 8px;
  border: 3px solid rgba(255,255,255,.95);
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent calc(50% - 1px), rgba(255,255,255,.9) calc(50% - 1px), rgba(255,255,255,.9) calc(50% + 1px), transparent calc(50% + 1px)),
    radial-gradient(circle at 50% 50%, transparent 0 54px, rgba(255,255,255,.9) 55px 57px, transparent 58px),
    repeating-linear-gradient(90deg, #176d4d 0 72px, #145f44 72px 144px);
}

.football-pitch:before,
.football-pitch:after {
  content: "";
  position: absolute;
  top: 24%;
  width: 70px;
  height: 52%;
  border: 3px solid rgba(255,255,255,.9);
}

.football-pitch:before {
  left: -3px;
  border-left: 0;
}

.football-pitch:after {
  right: -3px;
  border-right: 0;
}

.pitch-label {
  position: absolute;
  inset: auto 0 18px;
  text-align: center;
  color: rgba(255,255,255,.86);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.modal-stats {
  width: min(620px, 100%);
  margin: 16px auto 0;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  text-align: center;
}

.modal-stats h3 {
  color: var(--grass);
}

.modal-stat-line {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.modal-pill {
  border-radius: 999px;
  background: #eef3ef;
  padding: 8px 12px;
  font-weight: 900;
}

.player-profile {
  display: grid;
  gap: 16px;
  perspective: 1200px;
}

.player-profile-hero {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: 18px;
  align-items: center;
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: 18px;
  color: #241c0a;
  background:
    radial-gradient(circle at 82% 12%, rgba(255,255,255,.7), transparent 0 18%, transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.32), transparent 36%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.14) 0 2px, transparent 2px 14px),
    linear-gradient(145deg, #f9e8a7 0%, #d9b35a 50%, #a97420 100%);
  border: 1px solid rgba(130, 88, 20, .68);
  transform-style: preserve-3d;
  animation: player-card-reveal .72s cubic-bezier(.18,.88,.22,1.08) both;
}

.player-profile-stats,
.player-detail-grid,
.player-gallery-card {
  opacity: 0;
  animation: profile-data-rise .34s ease both;
  animation-delay: .28s;
}

.player-detail-grid {
  animation-delay: .38s;
}

.player-profile-hero.silver {
  color: #202527;
  background: linear-gradient(145deg, #f4f6f6, #c9d0d2 55%, #8f9a9e);
  border-color: rgba(110,121,126,.45);
}

.player-profile-hero.legend {
  color: #16120c;
  background:
    radial-gradient(circle at 80% 18%, rgba(255,255,255,.82), transparent 0 18%, transparent 35%),
    radial-gradient(circle at 18% 20%, rgba(221,177,86,.38), transparent 0 13%, transparent 30%),
    linear-gradient(90deg, transparent 0 10%, rgba(22, 18, 12, .12) 10% 11%, transparent 11% 89%, rgba(22, 18, 12, .12) 89% 90%, transparent 90%),
    repeating-linear-gradient(135deg, rgba(22, 18, 12, .08) 0 2px, transparent 2px 18px),
    linear-gradient(145deg, #fffdf2 0%, #f3ead2 48%, #d8b766 74%, #11100e 100%);
  border-color: rgba(22, 18, 12, .72);
  box-shadow: inset 0 0 0 2px rgba(221,177,86,.42);
}

.player-profile-hero.elite {
  color: #fff1b8;
  background:
    radial-gradient(circle at 72% 22%, rgba(94, 189, 255, .62), transparent 0 18%, transparent 38%),
    radial-gradient(circle at 18% 16%, rgba(255, 224, 130, .45), transparent 0 10%, transparent 26%),
    repeating-radial-gradient(circle at 70% 30%, rgba(255, 218, 104, .72) 0 1px, transparent 1px 20px),
    linear-gradient(145deg, #04132f 0%, #063b82 48%, #0b67c4 72%, #031022 100%);
  border-color: rgba(241,207,114,.82);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1);
}

.player-profile-photo {
  width: 132px;
  height: 154px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.45);
  font-size: 2rem;
  font-weight: 950;
}

.player-profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--photo-focus, center 22%);
}

.player-profile-hero h2 {
  margin: 4px 0 10px;
  font-size: 2.6rem;
  text-transform: uppercase;
}

.player-profile-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.player-profile-meta span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(36, 28, 10, .12);
  font-weight: 900;
}

.profile-season-filter {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 6px 8px 6px 12px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(36, 28, 10, .12);
  font-weight: 900;
}

.profile-season-filter select {
  min-height: 34px;
  min-width: 106px;
  border-radius: 999px;
  padding: 6px 10px;
}

.player-profile-meta .profile-rating {
  background: #071324;
  border-color: transparent;
  color: #fff1b8;
}

.player-profile-hero.elite .player-profile-meta span {
  background: rgba(3, 19, 56, .5);
  border-color: rgba(241,207,114,.34);
}

.player-profile-hero.elite .profile-season-filter {
  background: rgba(3, 19, 56, .5);
  border-color: rgba(241,207,114,.34);
}

.player-profile-hero.legend .profile-season-filter {
  background: rgba(255, 253, 242, .72);
  border-color: rgba(22, 18, 12, .18);
}

.player-profile-hero.elite .player-profile-meta .profile-rating {
  background: #f1cf72;
  color: #071324;
}

.player-profile-hero.legend .player-profile-meta .profile-rating {
  background: #16120c;
  color: #fffdf2;
}

.player-profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.player-profile-stats article {
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  border: 1px solid #dce4df;
  box-shadow: 0 12px 24px rgba(20,33,28,.08);
}

.player-profile-stats span {
  display: block;
  color: #65746e;
  font-size: .84rem;
  font-weight: 900;
  text-transform: uppercase;
}

.player-profile-stats strong {
  display: block;
  margin-top: 4px;
  color: var(--grass);
  font-size: 2rem;
}

.position-rating-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.position-rating-grid article {
  border-radius: 8px;
  padding: 14px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(215,180,106,.32), rgba(255,255,255,0)),
    #123d30;
  border: 1px solid rgba(215,180,106,.5);
}

.position-rating-grid span,
.position-rating-grid small {
  display: block;
  font-weight: 900;
  color: rgba(255,255,255,.78);
}

.position-rating-grid strong {
  display: block;
  margin: 2px 0;
  font-size: 2.15rem;
  color: #f4d989;
}

.player-detail-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 14px;
}

.player-side-stack {
  display: grid;
  gap: 14px;
}

.player-gallery-card {
  display: grid;
  gap: 12px;
  border: 1px solid #dce4df;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(15,61,46,.08), rgba(215,180,106,.16)),
    #fff;
  padding: 14px;
}

.player-gallery-preview {
  position: relative;
  min-height: 280px;
  border-radius: 8px;
  overflow: hidden;
  background: #dce4df;
}

.player-gallery-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  padding: 22px;
  color: #65746e;
  font-weight: 900;
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255,255,255,.48), transparent),
    #eef3ef;
}

.player-gallery-preview img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(7, 19, 36, .28);
  color: rgba(255,255,255,.86);
  font-size: 2.3rem;
  font-weight: 900;
  transform: translateY(-50%);
  backdrop-filter: blur(3px);
}

.gallery-nav:hover {
  background: rgba(7, 19, 36, .54);
  color: #fff;
}

.gallery-nav.prev { left: 10px; }
.gallery-nav.next { right: 10px; }

.player-gallery-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 900;
  color: #65746e;
}

.player-gallery-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.player-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.player-gallery-grid figure {
  min-height: 240px;
  margin: 0;
  border-radius: 8px;
  overflow: hidden;
  background: #dce4df;
}

.player-gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 240px;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 26px;
  background: rgba(3, 8, 6, .88);
  animation: modal-backdrop-enter .2s ease both;
}

.image-lightbox.hidden {
  display: none;
}

.image-lightbox img {
  max-width: min(1120px, 96vw);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0,0,0,.52);
  animation: lightbox-image-enter .25s cubic-bezier(.2,.8,.2,1) both;
}

.image-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #14211c;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

.player-detail-card {
  border: 1px solid #dce4df;
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.detail-card-head {
  margin-bottom: 10px;
}

.detail-card-head.compact {
  margin-top: 18px;
}

.detail-card-head h3 {
  margin: 2px 0 0;
  color: var(--grass);
}

.profile-list {
  display: grid;
  gap: 8px;
}

.player-pair-row,
.player-last-match {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 8px;
  background: #f1f5f2;
  border: 1px solid #e1e9e4;
}

.player-pair-row small,
.player-last-match small {
  display: block;
  margin-top: 2px;
  color: #65746e;
  font-weight: 800;
}

.player-pair-row span,
.player-last-match span,
.player-last-match b {
  border-radius: 999px;
  padding: 7px 10px;
  background: #fff;
  font-weight: 950;
}

.player-last-match {
  grid-template-columns: 1fr auto auto;
}

.player-last-match.result-win span { color: #0f6b45; }
.player-last-match.result-loss span { color: #9d2525; }
.player-last-match.result-draw span { color: #65746e; }

.login-card {
  width: min(420px, 100%);
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  font-weight: 800;
}

@media (max-width: 850px) {
  .stat-grid, .two-col, .form-grid, .pitch-layout, .pair-match-card, .match-teams, .player-profile-hero, .player-detail-grid, .player-profile-stats, .survey-layout { grid-template-columns: 1fr; }
  .section-head { align-items: stretch; flex-direction: column; }
  h1 { font-size: 2.6rem; }
  .hero { min-height: auto; }
  .football-pitch { min-height: 260px; }
  .match-score { font-size: 1.7rem; }
  .player-profile-photo { width: 112px; height: 132px; }
  .player-profile-hero h2 { font-size: 2rem; }
  .player-last-match { grid-template-columns: 1fr; }
  .player-gallery-preview, .player-gallery-preview img { min-height: 220px; }
}
