/* ===== Base ===== */
* { box-sizing: border-box; }

:root{
  --bg0:#020308;
  --bg1:#06111a;
  --card:#020617;
  --card2:#071a12;

  --line: rgba(31,41,55,0.9);
  --text:#e5e7eb;
  --muted:#9ca3af;

  /* Golf accents */
  --green:#22c55e;     /* primary accent */
  --green2:#15803d;    /* deep accent */
  --greenGlow: rgba(34,197,94,0.18);
  --gold:#fbbf24;
}

html{ scroll-behavior:smooth; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at top, #0b1f16 0%, var(--bg0) 55%, #000 100%);
  color: var(--text);
}

a{ color:#86efac; text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{
  width: min(1120px, 92%);
  margin: 18px auto 56px;
}

header.site-header{
  background: rgba(2,6,23,0.78);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 18px 10px;
  box-shadow: 0 18px 45px rgba(0,0,0,0.65);
  position: relative;
  overflow:hidden;
}
header.site-header::before{
  content:"";
  position:absolute;
  inset:-120px -120px auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, var(--greenGlow), transparent 60%);
  transform: rotate(18deg);
  pointer-events:none;
}

header.site-header h1{
  margin: 0;
  font-size: 1.85rem;
  letter-spacing: 0.02em;
}
header.site-header p{
  margin: 6px 0 10px;
  color: var(--muted);
  line-height: 1.45;
}

/* Sticky shared nav */
nav.site-nav{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  padding: 10px 0 4px;
  position: sticky;
  top: 10px;
  z-index: 50;
}

nav.site-nav a{
  display:inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(2,6,23,0.72);
  color: var(--text);
  font-weight: 700;
  font-size: 0.92rem;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

nav.site-nav a:hover{
  transform: translateY(-1px);
  border-color: rgba(34,197,94,0.9);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.25) inset;
}

nav.site-nav a.active{
  border-color: rgba(34,197,94,0.95);
  box-shadow: 0 0 0 1px rgba(34,197,94,0.35) inset, 0 10px 22px rgba(0,0,0,0.35);
  color: #bbf7d0;
}

.section{
  margin-top: 16px;
  background: rgba(2,6,23,0.76);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.55);
}

.section h2{
  margin: 0 0 10px;
  font-size: 1.25rem;
}

.subtext{
  margin: 0 0 12px;
  color: #cbd5e1;
  line-height: 1.6;
}

.badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(34,197,94,0.65);
  background: rgba(21,128,61,0.14);
  color: #bbf7d0;
  font-weight: 800;
  font-size: 0.82rem;
}

/* KPI cards */
.kpi-row{
  display:flex;
  flex-wrap:wrap;
  gap: 12px;
  margin-top: 10px;
}
.kpi{
  flex: 1 1 240px;
  background: linear-gradient(135deg, rgba(11,23,38,0.82), rgba(5,46,22,0.55));
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}
.kpi .label{ color: var(--muted); font-size: 0.85rem; }
.kpi .value{ font-size: 1.25rem; font-weight: 900; margin-top: 4px; }
.kpi .note{ color:#cbd5e1; font-size: 0.92rem; margin-top: 6px; line-height: 1.35; }

/* Controls */
.controls{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top: 10px;
}
input.search{
  flex: 1 1 260px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(2,6,23,0.7);
  color: var(--text);
  outline:none;
}
input.search:focus{
  border-color: rgba(34,197,94,0.9);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

button.btn{
  border: 1px solid var(--line);
  background: rgba(2,6,23,0.7);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 900;
  cursor:pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
button.btn:hover{
  transform: translateY(-1px);
  border-color: rgba(34,197,94,0.9);
}
button.btn.primary{
  border-color: rgba(34,197,94,0.9);
  background: rgba(21,128,61,0.16);
  color: #bbf7d0;
}

/* Message / spotlight */
#messagebox, #spotlight{
  background: radial-gradient(circle at top left, #0b1726, #020617 70%);
  border-radius: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  overflow:auto;
  min-height: 120px;
}
#messagebox strong, #spotlight strong{ color: var(--gold); }

/* ===== Table ===== */
.table-wrapper{
  overflow:auto;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(2,6,23,0.85);
}

figure{ margin:0; }
figcaption{
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #bbf7d0;
  font-weight: 900;
  letter-spacing: 0.02em;
  background: linear-gradient(90deg, rgba(21,128,61,0.18), rgba(2,6,23,0.0));
}

table{
  border-collapse: collapse;
  width: 100%;
  min-width: 920px;
  font-size: 0.86rem;
}

thead{
  background: linear-gradient(90deg, #0b1726, rgba(21,128,61,0.35));
}

th, td{
  border: 1px solid rgba(31,41,55,0.85);
  padding: 8px 10px;
  text-align: center;
  white-space: nowrap;
}

th{
  cursor: pointer;
  user-select:none;
  position: relative;
}
th.sort::after{
  content:" ⇅";
  color: rgba(187,247,208,0.75);
  font-weight: 900;
}
th.sorted-asc::after{ content:" ↑"; color:#bbf7d0; }
th.sorted-desc::after{ content:" ↓"; color:#bbf7d0; }

th:nth-child(2), td:nth-child(2){ text-align:left; }
th:nth-child(1), td:nth-child(1){ text-align:left; }

tbody tr:nth-child(odd){ background: #071018; }
tbody tr:nth-child(even){ background: #050b10; }
tbody tr:hover{ background: #0b1726; }

tr.row-highlight td{
  background: #0b1726 !important;
  box-shadow: 0 0 0 9999px rgba(34,197,94,0.07) inset;
}

td.leader{
  box-shadow: 0 0 0 9999px rgba(34,197,94,0.10) inset;
  border-color: rgba(34,197,94,0.35);
}

/* ===== Gallery ===== */
.gallery-grid{
  margin-top: 12px;
  display:flex;
  flex-wrap:wrap;
  gap: 14px;
}

.player-card{
  width: calc(16.66% - 12px);
  min-width: 170px;
  background: rgba(2,6,23,0.85);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 10px;
  text-align:center;
  transition: transform .12s ease, border-color .12s ease;
  cursor:pointer;
}
.player-card:hover{
  transform: translateY(-2px);
  border-color: rgba(34,197,94,0.75);
}

.player-card img{
  width: 92px;
  height: 92px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid var(--green);
  background: rgba(2,6,23,0.85);
}

.player-name{ font-weight: 950; margin-top: 8px; font-size: 0.92rem; }
.player-team{ color: var(--muted); font-size: 0.82rem; margin-top: 3px; }
.player-link{ margin-top: 8px; font-size: 0.78rem; }

/* ===== Glossary ===== */
dl{ margin:0; padding:0; }
dt{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top: 10px;
  padding: 8px 10px;
  min-width: 92px;
  justify-content:center;
  border-radius: 10px;
  cursor:pointer;
  background: rgba(11,23,38,0.85);
  border: 1px solid rgba(34,197,94,0.55);
  color: #bbf7d0;
  font-weight: 950;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.78rem;
}
dd{
  margin: 6px 0 0 12px;
  color: #cbd5e1;
  line-height: 1.5;
}

/* ===== Footer ===== */
footer{
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.85rem;
  text-align:center;
}

/* Back to top button */
#toTop{
  position: fixed;
  right: 16px;
  bottom: 16px;
  border-radius: 999px;
  padding: 10px 12px;
  display:none;
  z-index: 60;
  border: 1px solid rgba(34,197,94,0.7);
  background: rgba(2,6,23,0.75);
  color: #bbf7d0;
  font-weight: 950;
  cursor:pointer;
}
#toTop:hover{
  background: rgba(21,128,61,0.18);
}

/* ===== Mobile ===== */
@media (max-width: 900px){
  .player-card{ width: calc(33.33% - 10px); }
  table{ min-width: 860px; }
}
@media (max-width: 520px){
  .player-card{ width: calc(50% - 10px); }
}
