/* ============================================================
   LTD GOLF CLUB — shared styles for every page
   ============================================================ */
:root {
  --bg: #060d18;
  --panel: #0c1829;
  --panel2: #0f1f35;
  --line: rgba(255,255,255,.09);
  --text: #eef2f8;
  --muted: #8fa3bc;
  --gold: #f0c040;
  --gold2: #c99520;
  --red: #dc2626;
  --blue: #2563eb;
  --green: #22c55e;
  --radius: 16px;
  --shadow: 0 20px 50px rgba(0,0,0,.5);
  --header-h: 64px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex; flex-direction: column;
  overflow-x: hidden;
  line-height: 1.45;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.container { width: min(1220px, calc(100% - 32px)); margin: 0 auto; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 300;
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  background: rgba(6,13,24,.86);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--header-h); gap: 16px;
}
.site-brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-brand img { height: 40px; width: auto; }
.site-brand span {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: .08em;
  background: linear-gradient(135deg, #fff 30%, var(--gold));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.site-nav { display: flex; gap: 2px; align-items: center; }
.site-nav a {
  color: var(--muted); font-size: .88rem; font-weight: 500;
  padding: 7px 11px; border-radius: 8px; white-space: nowrap;
  transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--text); background: rgba(255,255,255,.06); }
.site-nav a.active { color: var(--gold); background: rgba(240,192,64,.08); }
.site-nav a.nav-cup { border: 1px solid rgba(240,192,64,.35); color: var(--gold); margin-left: 6px; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; width: 42px; height: 38px; font-size: 1.2rem; cursor: pointer;
}

@media (max-width: 1000px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(6,13,24,.97); border-bottom: 1px solid var(--line);
    padding: 8px 16px 14px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 10px; font-size: 1rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .site-nav a.nav-cup { margin: 10px 0 0; border-radius: 8px; text-align: center; }
}

/* ============================================================
   PAGE HEAD + SECTIONS
   ============================================================ */
.page-head { padding: 44px 0 24px; }
.eyebrow {
  font-family: 'Teko', sans-serif; font-size: .95rem; letter-spacing: .2em;
  color: var(--gold); text-transform: uppercase;
}
.page-title {
  font-family: 'Bebas Neue', sans-serif; font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1; letter-spacing: .03em; margin-top: 4px;
}
.page-intro { color: var(--muted); max-width: 64ch; margin-top: 10px; }
.section { padding-bottom: 48px; }
.section-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 1.7rem; letter-spacing: .04em;
  margin-bottom: 14px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
}
.section-title small {
  font-family: 'DM Sans', sans-serif; font-size: .82rem; color: var(--muted); letter-spacing: 0;
}
.sub-title {
  font-family: 'Teko', sans-serif; font-size: 1.05rem; letter-spacing: .14em;
  color: var(--muted); text-transform: uppercase; margin: 22px 0 10px;
}

/* ============================================================
   CARDS + GRIDS
   ============================================================ */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card-title {
  font-family: 'Teko', sans-serif; font-size: 1rem; letter-spacing: .16em;
  color: var(--gold); text-transform: uppercase; margin-bottom: 10px;
}
.grid { display: grid; gap: 16px; }
/* Let wide tables scroll inside their cell instead of stretching the grid. */
.grid > *, .tiles > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 680px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(37,99,235,.18), transparent),
    radial-gradient(ellipse 50% 40% at 15% 90%, rgba(240,192,64,.08), transparent);
}

/* ============================================================
   BUTTONS, BADGES, NOTICES
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .88rem;
  border: none; cursor: pointer; font-family: inherit; transition: .18s;
}
.btn-gold { background: linear-gradient(135deg, var(--gold), var(--gold2)); color: #0f1a2e; }
.btn-ghost { background: rgba(255,255,255,.06); border: 1px solid var(--line); color: var(--text); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.badge {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--muted); white-space: nowrap;
}
.badge-gold { color: var(--gold); border-color: rgba(240,192,64,.4); background: rgba(240,192,64,.08); }
.badge-green { color: var(--green); border-color: rgba(34,197,94,.4); background: rgba(34,197,94,.08); }
.badge-blue { color: #7aa5ff; border-color: rgba(37,99,235,.5); background: rgba(37,99,235,.12); }
.badge-red { color: #f87171; border-color: rgba(220,38,38,.45); background: rgba(220,38,38,.1); }

.notice {
  border: 1px solid rgba(240,192,64,.35); background: rgba(240,192,64,.07);
  color: var(--text); border-radius: 12px; padding: 12px 16px; font-size: .9rem; margin-bottom: 18px;
}
.notice strong { color: var(--gold); }
.notice-error { border-color: rgba(220,38,38,.45); background: rgba(220,38,38,.08); }
.empty {
  border: 1px dashed var(--line); border-radius: 12px; padding: 22px;
  color: var(--muted); text-align: center; font-size: .92rem;
}
.loading { color: var(--muted); padding: 30px 0; text-align: center; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.green { color: var(--green); }
.num { font-variant-numeric: tabular-nums; }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
}
table.data { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.data th {
  text-align: left; font-family: 'Teko', sans-serif; font-weight: 600;
  font-size: .9rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--panel2);
  white-space: nowrap;
}
table.data td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.05); white-space: nowrap; }
table.data tr:last-child td { border-bottom: none; }
table.data .r { text-align: right; }
table.data .c { text-align: center; }
table.data tbody tr:hover td { background: rgba(255,255,255,.025); }
table.data tr.expandable { cursor: pointer; }
table.data tr.detail td { background: rgba(0,0,0,.18); padding: 12px; white-space: normal; }
table.data a.player-link:hover { color: var(--gold); }
.pos { font-family: 'Bebas Neue', sans-serif; font-size: 1.15rem; color: var(--muted); }
.pos-1 { color: var(--gold); }

/* ============================================================
   PLAYERS
   ============================================================ */
.avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--panel2); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
  font-family: 'Bebas Neue', sans-serif; font-size: 1.05rem; color: var(--muted);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 112px; height: 112px; font-size: 2.4rem; }
.player-cell { display: flex; align-items: center; gap: 10px; }
.player-cell .avatar { width: 30px; height: 30px; font-size: .8rem; }

.player-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
  transition: border-color .2s, transform .2s;
}
.player-card:hover { border-color: rgba(240,192,64,.4); transform: translateY(-1px); }
.player-card .name { font-weight: 700; }
.player-card .meta { color: var(--muted); font-size: .8rem; }

.search {
  width: 100%; max-width: 360px; padding: 10px 14px; border-radius: 10px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  font: inherit; margin-bottom: 18px;
}
.search:focus { outline: none; border-color: rgba(240,192,64,.5); }

/* ============================================================
   STAT TILES
   ============================================================ */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.tile .v { font-family: 'Bebas Neue', sans-serif; font-size: 2rem; line-height: 1; }
.tile .l { color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin-top: 6px; }

/* ============================================================
   EVENTS
   ============================================================ */
.event-row {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 16px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
}
.event-row + .event-row { margin-top: 10px; }
.event-date { font-family: 'Bebas Neue', sans-serif; font-size: 1.25rem; letter-spacing: .03em; line-height: 1.05; }
.event-date small { display: block; font-family: 'DM Sans', sans-serif; font-size: .75rem; color: var(--muted); letter-spacing: 0; }
.event-name { font-weight: 700; font-size: 1.02rem; }
.event-meta { color: var(--muted); font-size: .84rem; margin-top: 2px; }
.event-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 680px) {
  .event-row { grid-template-columns: 1fr; gap: 8px; }
  .event-actions { justify-content: flex-start; }
}

.countdown { display: flex; gap: 10px; margin-top: 14px; }
.countdown div { text-align: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; min-width: 62px; }
.countdown b { display: block; font-family: 'Bebas Neue', sans-serif; font-size: 1.8rem; line-height: 1; color: var(--gold); }
.countdown span { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }

.select {
  padding: 9px 12px; border-radius: 10px; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); font: inherit; max-width: 100%;
}

/* ============================================================
   SCORECARDS
   ============================================================ */
table.scorecard { border-collapse: collapse; font-size: .8rem; width: 100%; }
table.scorecard th, table.scorecard td {
  border: 1px solid rgba(255,255,255,.07); padding: 5px 4px; text-align: center; min-width: 28px;
}
table.scorecard th { color: var(--muted); font-weight: 500; background: var(--panel2); }
table.scorecard th:first-child, table.scorecard td:first-child { text-align: left; padding-left: 8px; min-width: 64px; white-space: nowrap; }
table.scorecard .tot { font-weight: 700; background: rgba(255,255,255,.03); }
.sc { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; }
.sc-eagle { border-radius: 50%; box-shadow: 0 0 0 1px var(--gold), 0 0 0 3px var(--panel), 0 0 0 4px var(--gold); }
.sc-birdie { border-radius: 50%; border: 1px solid var(--gold); }
.sc-bogey { border: 1px solid rgba(255,255,255,.3); }
.sc-double { border: 1px solid rgba(255,255,255,.3); box-shadow: 0 0 0 2px var(--panel), 0 0 0 3px rgba(255,255,255,.3); }
.pops { position: absolute; top: -3px; right: -4px; font-size: .55rem; color: var(--gold); letter-spacing: -1px; line-height: 1; }
.skin-g { background: rgba(240,192,64,.18) !important; }
.skin-n { background: rgba(34,197,94,.16) !important; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .76rem; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -2px; margin-right: 5px; }

/* Difficulty bar (avg strokes vs par) */
.diff { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.diff-track { position: relative; flex: 1; height: 8px; background: rgba(255,255,255,.05); border-radius: 4px; }
.diff-track::before { content: ''; position: absolute; left: 50%; top: -2px; bottom: -2px; width: 1px; background: rgba(255,255,255,.25); }
.diff-bar { position: absolute; top: 0; bottom: 0; border-radius: 4px; }
.diff-bar.over { left: 50%; background: #ef4444; }
.diff-bar.under { right: 50%; background: #3b82f6; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--muted); font-size: .85rem; margin-top: 32px; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.site-footer .foot-brand { display: flex; align-items: center; gap: 10px; }
.site-footer .foot-brand img { height: 36px; width: auto; }
.site-footer .foot-links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer .foot-links a:hover { color: var(--gold); }
.last-updated { font-size: .8rem; color: var(--muted); }
.last-updated b { color: var(--text); font-weight: 500; }
