@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;700&family=Inter:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #EFF4F8;
  --card: #FFFFFF;
  --border: #DCE6ED;
  --ink: #16324A;
  --muted: #5C7A8C;
  --muted-light: #9FB6C4;
  --accent: #2E7CB8;
  --gold: #C9A227;
  --header-band: linear-gradient(90deg,#16324A 0%,#2E7CB8 55%,#5FA8D3 100%);
  --date-bar: linear-gradient(90deg,#2E6F9E,#5FA8D3);
  --danger: #D9534F;
}

html {
  scroll-behavior: smooth;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', system-ui, sans-serif;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: url("background.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  filter: brightness(1.05);
  opacity: 0.35;
  z-index: -1;
  pointer-events: none;
}

.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
}

.logo-badge {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--header-band);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
}

.nav-band {
  background: var(--header-band);
  padding: 10px 28px;
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.nav-link {
  color: #fff;
  font-weight: 600;
  font-size: 13.5px;
  text-decoration: none;
}
.nav-link:hover { opacity: 0.8; }
.nav-admin { margin-left: auto; }

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

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

.col-left { flex: 1 1 480px; min-width: 300px; }
.col-right { flex: 1 1 380px; min-width: 300px; max-width: 420px; }

.info-card {
  background: linear-gradient(180deg, #DCEBF5 0%, #EFF4F8 55%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(22,50,74,0.06);
  position: relative;
  overflow: hidden;
}

.info-card::before {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -10px;
  width: 260px;
  height: 130px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 260 130'><path d='M0 130 L55 40 L80 70 L120 15 L165 75 L195 45 L260 130 Z' fill='%23BFD9EA'/><path d='M120 15 L133 32 L108 32 Z' fill='%23FFFFFF'/><path d='M195 45 L205 58 L185 58 Z' fill='%23FFFFFF'/></svg>");
  background-repeat: no-repeat;
  background-position: bottom right;
  opacity: 0.6;
  pointer-events: none;
}

.info-card > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}

.info-card h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  margin: 0 0 10px;
}

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

.tier-chips { display: flex; gap: 8px; flex-wrap: wrap; }

.tier-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 10px 4px 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.mini-ball {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-block;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(22,50,74,0.06);
}

.card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 15px;
  margin: 0 0 14px;
}

.input {
  width: 100%;
  box-sizing: border-box;
  padding: 9px 11px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: #FBFAFD;
  color: var(--ink);
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  margin-bottom: 8px;
}
.input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  padding: 10px 18px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary { background: var(--accent); color: #fff; }
.btn-block { width: 100%; justify-content: center; margin-top: 4px; }

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

.clear-link {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-left: 8px;
}

.empty-state { text-align: center; padding: 36px 20px; color: var(--muted); }

.draws-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.draws-grid .draw-card { margin-bottom: 0; }
@media (max-width: 900px) {
  .draws-grid { grid-template-columns: 1fr; }
}

.draw-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  box-shadow: 0 4px 16px rgba(22,50,74,0.06);
}

.draw-date-bar {
  background: var(--date-bar);
  color: #fff;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
}

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

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

.tier-label {
  font-size: 12.5px;
  font-weight: 700;
  margin-bottom: 8px;
}

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

.ball {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.25);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2), inset 0 -2px 3px rgba(0,0,0,0.15);
}

.login-card { max-width: 380px; margin: 40px auto 0; text-align: center; }
.lock-icon { font-size: 24px; margin-bottom: 8px; }
.login-card h2 { font-family: 'Space Grotesk', sans-serif; font-size: 17px; margin: 0 0 6px; }
.muted { color: var(--muted); font-size: 13px; margin-bottom: 16px; }
.muted code { font-family: 'IBM Plex Mono', monospace; color: var(--accent); }

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

.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.section-title { font-family: 'Space Grotesk', sans-serif; font-size: 14px; color: var(--muted); margin: 24px 0 10px; }

.admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  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: #FBFAFD;
  border: 1px solid var(--border);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}
.draws-table th:last-child { text-align: center; }
.draws-table td {
  padding: 12px 14px;
  border: 1px solid var(--border);
  vertical-align: top;
}
.draws-table td:first-child { font-weight: 600; white-space: nowrap; }
.draws-table td:last-child { text-align: center; white-space: nowrap; }
.draws-table tbody tr:nth-child(even) { background: #FBFAFD; }
.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: 5px;
  padding: 2px 6px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px 24px;
  font-size: 11px;
  color: var(--muted-light);
  font-family: 'IBM Plex Mono', monospace;
  text-align: center;
}