@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Work+Sans:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg: #12201A;
  --bg-raised: #17281F;
  --card: #1C2E24;
  --border: #2E4535;
  --border-soft: #24382B;
  --ink: #EDE8D8;
  --muted: #9FAE9A;
  --muted-light: #63755F;
  --brass: #C9A15A;
  --brass-bright: #E0BD7C;
  --heather: #3F7A52;
  --heather-bright: #5FA575;
  --danger: #C0564F;
  --success: #7FA66B;
}

html { scroll-behavior: smooth; }
* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.015) 0px, rgba(255,255,255,0.015) 1px, transparent 1px, transparent 3px),
    repeating-linear-gradient(25deg, rgba(0,0,0,0.15) 0px, rgba(0,0,0,0.15) 1px, transparent 1px, transparent 4px);
  color: var(--ink);
  font-family: 'Work Sans', system-ui, sans-serif;
}

.site-header {
  background: var(--bg-raised);
  border-bottom: 2px solid var(--brass);
  padding: 20px 30px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 22px;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.logo-badge {
  width: 26px;
  height: 26px;
  color: var(--heather-bright);
  flex-shrink: 0;
}

.nav-band {
  background: var(--bg-raised);
  padding: 12px 30px;
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-soft);
}

.nav-link {
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.nav-link:hover { color: var(--brass-bright); border-bottom-color: var(--brass); }
.nav-link-active { color: var(--brass-bright); border-bottom-color: var(--brass); }
.nav-admin { margin-left: auto; }

.layout {
  max-width: 1080px;
  margin: 0 auto;
  padding: 36px 24px 60px;
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.layout-single {
  max-width: 560px;
  flex-direction: column;
}

.col-left { flex: 1 1 460px; min-width: 300px; order: 2; }
.col-right { flex: 1 1 300px; min-width: 260px; max-width: 340px; order: 1; }

@media (max-width: 820px) {
  .col-left, .col-right { order: unset; max-width: none; }
}

.info-card {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--brass);
  padding: 30px 28px;
  margin-bottom: 20px;
}

.eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--brass-bright);
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.info-card h1 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 27px;
  margin: 0 0 12px;
  color: var(--ink);
}

.info-card p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--muted);
  margin-bottom: 16px;
}

.tier-chips { display: flex; flex-direction: column; gap: 9px; }

.tier-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 9px;
}
.tier-chip:last-child { border-bottom: none; padding-bottom: 0; }

.mini-ball {
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  display: inline-block;
  flex-shrink: 0;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 24px;
  margin-bottom: 18px;
}

.card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 16px;
  margin: 0 0 16px;
  color: var(--ink);
}

.input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  border-radius: 3px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--ink);
  font-size: 13px;
  font-family: 'Work Sans', sans-serif;
  margin-bottom: 8px;
}
.input:focus { outline: none; border-color: var(--brass); }
.input::placeholder { color: var(--muted-light); }

.field-label {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--brass);
  border-radius: 3px;
  background: transparent;
  color: var(--brass-bright);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 10px 18px;
  cursor: pointer;
  font-family: 'Work Sans', sans-serif;
}
.btn:hover { background: var(--brass); color: #17181B; }

.btn-primary { background: var(--brass); color: #17181B; }
.btn-primary:hover { background: var(--brass-bright); border-color: var(--brass-bright); }
.btn-block { width: 100%; justify-content: center; margin-top: 4px; }

.btn-icon {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  opacity: 0.7;
}
.btn-icon:hover { opacity: 1; color: var(--danger); }

.clear-link {
  font-size: 12px;
  color: var(--heather-bright);
  font-weight: 500;
  text-decoration: none;
  margin-left: 10px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted-light); font-style: italic; }

.draws-grid { display: flex; flex-direction: column; gap: 0; }
.draws-grid .draw-card { margin-bottom: 0; border-top: none; }
.draws-grid .draw-card:first-child { border-top: 1px solid var(--border); }

.draw-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: none;
  margin-bottom: 0;
}
.draw-card + .draw-card { border-top: none; }
.col-left .draw-card,
#countdown-card ~ .draw-card {
  border: 1px solid var(--border);
  margin-bottom: 18px;
}

.draw-date-bar {
  background: var(--bg-raised);
  color: var(--brass-bright);
  padding: 12px 18px;
  font-weight: 700;
  font-size: 13px;
  font-family: 'Space Mono', monospace;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-soft);
}

.draw-body { padding: 18px 20px; }

.tier-row {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.tier-row.last { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }

.tier-label {
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 9px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ball-row { display: flex; gap: 6px; flex-wrap: wrap; }

.ball {
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  color: #17181B;
}

.login-card { max-width: 360px; margin: 50px auto 0; text-align: center; border-left: 3px solid var(--brass); }
.lock-icon { font-size: 20px; margin-bottom: 10px; opacity: 0.8; }
.login-card h2 { font-family: 'Fraunces', serif; font-size: 18px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.muted code { font-family: 'Space Mono', monospace; color: var(--brass-bright); }

.error-text { color: var(--danger); font-size: 13px; margin: 8px 0; }
.success-text { color: var(--success); font-size: 13px; margin: 8px 0; }

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  margin: 28px 0 12px;
}

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--card);
  flex-wrap: wrap;
}
.admin-row-text { font-size: 13px; }

.draws-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.draws-table th {
  text-align: left;
  vertical-align: top;
  padding: 12px 14px;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
  font-family: 'Space Mono', monospace;
}
.draws-table th:last-child { text-align: center; }
.draws-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
  color: var(--ink);
}
.draws-table td:first-child { font-weight: 600; white-space: nowrap; font-family: 'Space Mono', monospace; font-size: 12px; }
.draws-table td:last-child { text-align: center; white-space: nowrap; }
.draws-table tbody tr:nth-child(even) { background: var(--bg-raised); }
.number-pill-row { display: flex; flex-wrap: nowrap; gap: 4px; }
.number-pill {
  display: inline-block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 2px 6px;
  font-family: 'Space Mono', monospace;
  font-size: 12px;
  color: var(--ink);
}

.site-footer {
  border-top: 1px solid var(--border-soft);
  padding: 20px 24px;
  font-size: 11px;
  color: var(--muted-light);
  font-family: 'Space Mono', monospace;
  text-align: center;
  letter-spacing: 0.05em;
}