:root {
  --bg: #06070a;
  --panel: #0d1017;
  --line: #1d2330;
  --gold: #c9a227;
  --gold-bright: #ffd700;
  --text: #e8eaf0;
  --muted: #8a91a3;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans SC", system-ui, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(201,162,39,0.14), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(201,162,39,0.07), transparent 60%);
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  border-bottom: 1px solid var(--panel);
}

.logo {
  font-family: "Bebas Neue", sans-serif;
  font-size: 34px;
  letter-spacing: 2px;
  color: var(--gold-bright);
}
.logo span { color: var(--text); }

.topbar-title {
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--muted);
  text-transform: uppercase;
}

.badge {
  margin-left: auto;
  font-size: 11px;
  color: var(--gold-bright);
  border: 1px solid rgba(255,215,0,0.35);
  padding: 4px 10px;
  border-radius: 999px;
}
.badge.hidden { display: none; }

main {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px 60px;
}

.hero {
  text-align: center;
  padding: 30px 0 24px;
}

.hero-kicker {
  font-size: 14px;
  letter-spacing: 3px;
  color: var(--muted);
  font-weight: 500;
}

.hero-number {
  margin: 18px 0 10px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 14px;
}

.hero-number .hero-total {
  font-family: "Bebas Neue", sans-serif;
  font-size: 44px;
  color: var(--muted);
}

#totalGoals {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(110px, 22vw, 190px);
  line-height: 1;
  background: linear-gradient(180deg, #fff 20%, var(--gold-bright) 70%, #8a6d16);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub { color: var(--muted); font-size: 16px; margin-top: 8px; }
.hero-sub strong { color: var(--gold-bright); font-weight: 700; }
.hero-sub .dot { margin: 0 8px; opacity: .5; }

.progress-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 26px 20px;
  margin-bottom: 28px;
}

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-family: "Bebas Neue", sans-serif;
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--muted);
}

.progress {
  position: relative;
  height: 22px;
  background: #141824;
  border-radius: 999px;
  margin: 8px 0 14px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #8a6d16, var(--gold-bright));
  transition: width 1.2s cubic-bezier(.2,.7,.2,1);
}

.progress-mark {
  position: absolute;
  top: -5px;
  width: 2px;
  height: 32px;
  background: #fff;
  box-shadow: 0 0 10px var(--gold-bright);
  border-radius: 2px;
  transition: left 1.2s cubic-bezier(.2,.7,.2,1);
}

.progress-percent {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 2px;
  color: var(--muted);
  font-size: 16px;
  text-align: right;
}
.progress-percent strong { color: var(--gold-bright); font-size: 18px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 40px;
  color: var(--gold-bright);
  line-height: 1;
}

.stat-label { font-size: 12px; color: var(--muted); margin-top: 6px; display: block; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
  margin-bottom: 28px;
}

.panel h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  margin-bottom: 18px;
  padding-left: 10px;
  border-left: 3px solid var(--gold);
}

.breakdown { display: flex; flex-direction: column; gap: 12px; }

.bd-row {
  display: grid;
  grid-template-columns: 130px 1fr 130px 44px;
  gap: 12px;
  align-items: center;
}

.bd-team { font-weight: 700; font-size: 15px; }
.bd-team small { display: block; color: var(--muted); font-weight: 400; font-size: 11px; margin-top: 2px; }

.bd-bar {
  height: 12px;
  background: #141824;
  border-radius: 999px;
  overflow: hidden;
}
.bd-bar i {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #8a6d16, var(--gold-bright));
  border-radius: 999px;
  transition: width 1s ease;
}

.bd-count { font-family: "Bebas Neue", sans-serif; font-size: 22px; text-align: right; }
.bd-pct { color: var(--muted); font-size: 12px; text-align: right; font-family: "Bebas Neue", sans-serif; }

.milestones { display: flex; flex-direction: column; gap: 10px; }

.milestone {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #0d1120;
}

.milestone .ms-num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 34px;
  width: 90px;
  color: var(--gold-bright);
  flex-shrink: 0;
}

.milestone .ms-info { font-size: 14px; color: var(--muted); }
.milestone .ms-info b { color: var(--text); margin-right: 6px; }

.milestone.next {
  border: 1px dashed rgba(255,215,0,0.5);
  background: rgba(201,162,39,0.06);
}
.milestone.next .ms-num {
  background: linear-gradient(180deg, #fff, var(--gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.milestone.next .ms-info { color: var(--muted); }
.milestone.next .ms-info b { color: var(--gold-bright); }

.goal-log { list-style: none; }

.goal-log li {
  display: grid;
  grid-template-columns: 52px 80px 1fr auto;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid #141824;
  font-size: 14px;
  animation: fadeUp .5s ease both;
}

.goal-log li:last-child { border-bottom: none; }

.gl-no { font-family: "Bebas Neue", sans-serif; font-size: 20px; color: var(--gold-bright); }
.gl-date { color: var(--muted); font-size: 12px; padding-top: 4px; }
.gl-match { color: var(--text); }
.gl-type {
  font-size: 11px;
  color: var(--gold-bright);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: 999px;
  padding: 2px 10px;
  align-self: center;
}

.admin-row {
  display: grid;
  grid-template-columns: 150px 1fr 100px auto;
  gap: 10px;
}

.admin-row select,
.admin-row input {
  background: #141824;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
}

.admin-row input::placeholder { color: var(--muted); }

#addBtn {
  background: linear-gradient(90deg, #8a6d16, var(--gold-bright));
  color: #111;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}

#addBtn:hover { filter: brightness(1.1); }

.admin-note { margin-top: 14px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.link-btn {
  background: none;
  border: none;
  color: var(--gold-bright);
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}

.auto-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}

.fetch-btn {
  background: #141824;
  border: 1px solid rgba(255,215,0,0.4);
  color: var(--gold-bright);
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
}

.fetch-btn:hover { background: #1b2130; }
.fetch-btn:disabled { opacity: .5; cursor: wait; }

.fetch-status { font-size: 12px; color: var(--muted); }
.fetch-status.ok { color: #6fdc7d; }
.fetch-status.err { color: #e06b6b; }

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 20px 40px;
  font-size: 12px;
  color: var(--muted);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 700px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .bd-row { grid-template-columns: 110px 1fr 70px 36px; }
  .admin-row { grid-template-columns: 1fr 1fr; }
  .goal-log li { grid-template-columns: 48px 1fr auto; }
  .gl-match { order: 3; grid-column: 2 / 4; }
}