:root {
  --bg: #000000;
  --card: #111111;
  --card-hover: #161616;
  --border: #2a2a2a;
  --text: #ffffff;
  --muted: #9a9a9a;
  --yellow: #ffed00;
  --yellow-dim: #cfc300;
  --available: #35d07f;
  --soldout: #5a5a5a;
  --unknown: #6b6b6b;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.45;
}

.hazard-bar {
  height: 8px;
  width: 100%;
  background: repeating-linear-gradient(
    135deg,
    var(--yellow),
    var(--yellow) 14px,
    #000 14px,
    #000 28px
  );
}

header {
  padding: 40px 24px 20px;
  max-width: 1320px;
  margin: 0 auto;
}
.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--yellow);
}
h1 {
  margin: 0 0 12px;
  font-family: "Anton", "Inter", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 0.95;
}
h1 .accent { color: var(--yellow); }
.sub {
  color: var(--muted);
  margin: 0;
  font-size: 1rem;
  max-width: 560px;
}

main { max-width: 1320px; margin: 0 auto; padding: 0 24px 48px; }

.controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 28px 0 10px;
}
.controls input, .controls select {
  flex: 1;
  min-width: 160px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.controls select option { background: var(--card); color: var(--text); }
.controls input::placeholder { color: var(--muted); }
.controls input:focus, .controls select:focus {
  outline: none;
  border-color: var(--yellow);
}

.status-line {
  min-height: 1.4em;
  color: var(--yellow);
  font-size: 0.9rem;
  font-weight: 600;
}

.events {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 16px;
}
@media (max-width: 1000px) {
  .events { grid-template-columns: repeat(2, 1fr); }
}

.event-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}
.event-card:hover { border-color: #444; }

.event-visual {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #0b0b0b;
}
.skyline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.visual-code {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(0,0,0,.75);
  color: var(--text);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 2px;
}

.event-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.event-head h3 {
  margin: 0 0 4px;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-size: 1.15rem;
  color: var(--yellow);
  line-height: 1.1;
}
.event-meta { color: var(--muted); font-size: 0.82rem; }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.badge.on_sale { background: var(--yellow); color: #000; }
.badge.not_on_sale,
.badge.ended,
.badge.unknown { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.categories {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.cat-chip {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.cat-chip:hover { border-color: var(--muted); }
.cat-chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  flex-shrink: 0;
}
.cat-chip .dot.available { background: var(--available); box-shadow: 0 0 6px rgba(53,208,127,.6); }
.cat-chip .dot.soldout { background: var(--soldout); }
.cat-chip .dot.unknown { background: var(--unknown); }
.cat-chip.selected {
  border-color: var(--yellow);
  background: rgba(255,237,0,.1);
}

.cta-bar {
  margin-top: 16px;
  width: 100%;
  background: var(--yellow);
  color: #000;
  border: none;
  padding: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, opacity 0.12s ease;
}
.cta-bar:hover:not(:disabled) { background: var(--yellow-dim); }
.cta-bar:disabled { opacity: .3; cursor: not-allowed; }

footer {
  max-width: 1320px;
  margin: 24px auto 0;
  padding: 16px;
  color: var(--muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 100;
}
.modal-overlay.hidden { display: none; }

.modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--yellow);
  border-radius: 6px;
  padding: 24px;
  width: 100%;
  max-width: 420px;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.6rem;
  cursor: pointer;
  line-height: 1;
}
.modal-close:hover { color: var(--text); }

.modal h3 {
  margin: 0 0 14px;
  font-family: "Anton", sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  color: var(--yellow);
  font-size: 1.1rem;
  padding-right: 20px;
}
.modal-selections {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.modal-selections li {
  font-size: 0.88rem;
  padding: 8px 10px;
  background: rgba(255,255,255,.04);
  border-radius: 4px;
}
.modal-label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
}
.modal #modal-email {
  width: 100%;
  padding: 12px 14px;
  background: #0a0a0a;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
}
.modal #modal-email:focus { outline: none; border-color: var(--yellow); }
.modal-message {
  min-height: 1.3em;
  font-size: 0.85rem;
  margin: 10px 0 0;
}
.modal-message.error { color: #ff6b6b; }
.modal-message.success { color: var(--available); }
.modal-confirm { margin-top: 14px; }

@media (max-width: 600px) {
  .events { grid-template-columns: 1fr; }
}
