@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500;700&family=Noto+Sans+Ethiopic:wght@400;500;600;700&display=swap");

:root {
  --bg: #ffffff;
  --surface: #faf7f0;
  --surface-raised: #f0e9d8;
  --line: #e2d9c2;
  --gold: #a9790b;
  --gold-bright: #c8940f;
  --ink: #17150f;
  --on-accent: #fdf9ef;
  --smoke: #726c5e;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", "Noto Sans Ethiopic", sans-serif;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
}

.display {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 0.04em;
}

.mono {
  font-family: "JetBrains Mono", monospace;
}

a {
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold-bright);
  outline-offset: 2px;
  border-color: var(--gold-bright);
}

/* ---------- marquee header ---------- */

.marquee {
  padding: 48px 24px 32px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(
      ellipse at top,
      rgba(169, 121, 11, 0.12),
      transparent 60%
    ),
    var(--bg);
}

.marquee .event-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
}

.marquee h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(40px, 11vw, 96px);
  letter-spacing: 0.03em;
  margin: 4px 0 8px;
  line-height: 0.95;
  color: var(--ink);
}

.marquee h1 span {
  color: var(--gold-bright);
}

.marquee p {
  color: var(--smoke);
  margin: 0;
  font-size: 15px;
}

/* ---------- layout shell ---------- */

.shell {
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 16px 120px;
}

.section-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--smoke);
  margin: 0 0 16px;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 40px 20px;
  text-align: center;
  color: var(--smoke);
  font-size: 14px;
  background: var(--surface);
}

.error-state {
  border: 1px solid var(--ink);
  border-radius: 4px;
  padding: 20px;
  text-align: center;
  color: var(--ink);
  font-size: 13px;
  background: var(--surface-raised);
}

/* ---------- bout card ---------- */

.bout {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  margin-bottom: 20px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(23, 21, 15, 0.05),
    0 0 0 1px rgba(169, 121, 11, 0.08) inset;
}

.bout-number {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--gold);
  padding: 10px 16px 0;
}

.bout-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  padding: 0 16px;
  margin-top: 2px;
}

.bout-main {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding: 8px 20px 18px;
}

.corner {
  min-width: 0;
}
.corner.red {
  text-align: left;
  background: linear-gradient(135deg, rgba(169, 121, 11, 0.08), transparent);
  border-radius: 4px;
  padding: 8px;
}
.corner.blue {
  text-align: right;
  background: linear-gradient(225deg, rgba(169, 121, 11, 0.08), transparent);
  border-radius: 4px;
  padding: 8px;
}

.corner .who {
  font-size: 12px;
  color: var(--smoke);
  margin: 0 0 2px;
}

.corner .fighter {
  font-family: "Bebas Neue", sans-serif;
  font-size: 24px;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1;
  overflow-wrap: anywhere;
}

.corner.red {
  background: linear-gradient(135deg, rgba(169, 121, 11, 0.12), transparent);
  border-right: 2px solid var(--gold);
}
.corner.blue {
  background: linear-gradient(225deg, rgba(169, 121, 11, 0.12), transparent);
  border-left: 2px solid var(--gold);
}
.corner.red .fighter {
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(169, 121, 11, 0.3);
}
.corner.blue .fighter {
  color: var(--gold-bright);
  text-shadow: 0 0 8px rgba(169, 121, 11, 0.3);
}
.corner .stake {
  color: var(--gold);
}

.corner .stake {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  color: var(--ink);
  margin-top: 6px;
}

.corner .backer {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--smoke);
  margin-top: 4px;
}

/* ---------- avatars ---------- */

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 14px;
  color: #fff;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avatar-stack {
  display: flex;
}
.avatar-stack .avatar {
  width: 28px;
  height: 28px;
  font-size: 11px;
  margin-left: -8px;
  border: 2px solid var(--surface);
}
.avatar-stack .avatar:first-child {
  margin-left: 0;
}
.avatar-more {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-raised);
  border: 2px solid var(--surface);
  color: var(--smoke);
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: -8px;
}

.fighter-portrait {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
  color: #fff;
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* ---------- funding progress ---------- */

.progress-wrap {
  padding: 0 20px 12px;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  color: var(--smoke);
  margin-bottom: 6px;
}
.progress-label b {
  color: var(--ink);
}
.progress-track {
  height: 8px;
  background: var(--surface-raised);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  border-radius: 999px;
  transition: width 0.3s ease;
}

/* ---------- open / filled tab switch ---------- */

.tab-switch {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.tab-btn {
  background: none;
  border: none;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--smoke);
  padding: 10px 4px 12px;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
}
.tab-btn.active {
  color: var(--ink);
  border-bottom-color: var(--gold);
}
.tab-count {
  display: inline-block;
  background: var(--surface-raised);
  color: var(--smoke);
  font-size: 11px;
  border-radius: 999px;
  padding: 1px 8px;
  margin-left: 4px;
}
.tab-btn.active .tab-count {
  background: var(--gold);
  color: var(--on-accent);
}
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
}

/* ---------- how it works strip ---------- */

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 32px;
}
.how-step {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 14px 16px;
}
.how-step .num {
  font-family: "Bebas Neue", sans-serif;
  font-size: 26px;
  color: var(--gold-bright);
  line-height: 1;
  margin-bottom: 4px;
}
.how-step .txt {
  font-size: 12.5px;
  color: var(--smoke);
  line-height: 1.35;
}
@media (max-width: 640px) {
  .how-it-works {
    grid-template-columns: 1fr;
  }
}

.vs-seam {
  font-family: "Bebas Neue", sans-serif;
  font-size: 18px;
  color: var(--gold);
  position: relative;
  padding: 0 4px;
}

.bout-note {
  padding: 0 20px 14px;
  color: var(--smoke);
  font-size: 13px;
  font-style: italic;
}

.bout-footer {
  border-top: 1px solid var(--gold);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(169, 121, 11, 0.05), transparent);
}

.status-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--smoke);
}

.status-badge.open {
  color: var(--gold);
  border-color: var(--gold);
}
.status-badge.settled {
  color: var(--ink);
  border-color: var(--ink);
}

.status-badge.filled {
  color: var(--gold-bright);
  border-color: var(--gold-bright);
  background: rgba(169, 121, 11, 0.12);
}

.status-badge.filled {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(169, 121, 11, 0.12);
}

.challenger-list {
  padding: 0 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.challenger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(
    135deg,
    rgba(169, 121, 11, 0.1),
    var(--surface-raised)
  );
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 13px;
}

.challenger-row .name {
  font-weight: 600;
  color: var(--ink);
}
.challenger-row .contact {
  color: var(--smoke);
  font-family: "JetBrains Mono", monospace;
  font-size: 11px;
}
.challenger-row .amt {
  color: var(--smoke);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
}

.pill {
  font-family: "JetBrains Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.pill.pending {
  background: rgba(169, 121, 11, 0.14);
  color: var(--gold);
  border: 1px solid var(--gold);
}
.pill.approved {
  background: var(--ink);
  color: var(--on-accent);
}
.pill.rejected {
  background: var(--surface-raised);
  color: var(--smoke);
  border: 1px solid var(--line);
  text-decoration: line-through;
}

/* ---------- buttons ---------- */

.btn {
  font-weight: 600;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 4px;
  transition: transform 0.05s ease, opacity 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gold);
  color: var(--on-accent);
}
.btn-primary:hover {
  background: var(--gold-bright);
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-approve {
  background: var(--ink);
  color: var(--on-accent);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}
.btn-reject {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--smoke);
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}
.btn-reject:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--on-accent);
  font-size: 30px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(169, 121, 11, 0.5),
    0 0 0 2px rgba(169, 121, 11, 0.3);
  z-index: 40;
}

.fab:hover {
  background: var(--gold-bright);
}

/* ---------- modal ---------- */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(23, 21, 15, 0.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 12px;
  overflow-y: auto;
  z-index: 50;
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--bg);
  border: 1px solid var(--gold);
  border-radius: 8px;
  width: 100%;
  max-width: 420px;
  padding: 22px;
  box-shadow: 0 12px 40px rgba(169, 121, 11, 0.15),
    0 0 0 1px rgba(169, 121, 11, 0.1) inset;
}

.modal h2 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 26px;
  letter-spacing: 0.02em;
  margin: 0 0 4px;
  color: var(--ink);
}

.modal .sub {
  color: var(--smoke);
  font-size: 13px;
  margin: 0 0 20px;
}

.field {
  margin-bottom: 14px;
}

.field label {
  display: block;
  font-size: 12px;
  color: var(--smoke);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--gold);
  border-radius: 4px;
  padding: 10px 12px;
  color: var(--ink);
  font-family: "Inter", "Noto Sans Ethiopic", sans-serif;
  font-size: 16px;
}

.field textarea {
  resize: vertical;
  min-height: 60px;
}

.telebirr-box {
  background: linear-gradient(
    135deg,
    rgba(169, 121, 11, 0.1),
    var(--surface-raised)
  );
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink);
  box-shadow: 0 0 16px rgba(169, 121, 11, 0.15);
}

.telebirr-box .num {
  font-family: "JetBrains Mono", monospace;
  font-size: 18px;
  color: var(--gold);
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions .btn {
  flex: 1;
}

.close-x {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  color: var(--smoke);
  font-size: 20px;
}

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  border: 2px solid var(--gold);
  color: var(--on-accent);
  padding: 12px 20px;
  border-radius: 6px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 60;
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---------- admin-specific ---------- */

.gate {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.gate-box {
  width: 100%;
  max-width: 340px;
  text-align: center;
  border: 2px solid var(--gold);
  border-radius: 8px;
  padding: 32px;
  background: linear-gradient(135deg, rgba(169, 121, 11, 0.1), var(--bg));
}

.gate-box h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 40px;
  margin-bottom: 4px;
  color: var(--ink);
}

.gate-box p {
  color: var(--smoke);
  font-size: 13px;
  margin-bottom: 20px;
}

.gate-error {
  color: var(--ink);
  font-weight: 600;
  font-size: 12px;
  margin-top: 10px;
  min-height: 16px;
}

.admin-shell {
  display: none;
}
.admin-shell.open {
  display: block;
}

.fighter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(
    135deg,
    rgba(169, 121, 11, 0.12),
    var(--surface-raised)
  );
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 6px 10px 6px 14px;
  font-size: 13px;
  margin: 0 8px 8px 0;
  color: var(--ink);
}

.fighter-chip button {
  background: none;
  color: var(--smoke);
  font-size: 14px;
}

.fighter-chip button:hover {
  color: var(--ink);
}

.screenshot-link {
  font-size: 12px;
  color: var(--gold);
  text-decoration: underline;
}

.result-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-top: 1px solid var(--gold);
  background: linear-gradient(
    135deg,
    rgba(169, 121, 11, 0.1),
    var(--surface-raised)
  );
}

.result-row select {
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 12px;
}

/* ---------- mobile ---------- */

@media (max-width: 640px) {
  .marquee {
    padding: 36px 16px 24px;
  }
  .shell {
    padding: 20px 12px 110px;
  }
  .bout-main {
    grid-template-columns: 1fr auto 1fr;
    gap: 6px;
    padding: 8px 14px 14px;
  }
  .corner .fighter {
    font-size: 19px;
  }
  .corner .who {
    font-size: 11px;
  }
  .bout-footer {
    padding: 10px 14px;
  }
  .bout-footer .btn {
    flex: 1 1 100%;
    text-align: center;
  }
  .modal {
    max-width: 94vw;
    padding: 18px;
  }
  .fab {
    right: 16px;
    bottom: 16px;
    width: 54px;
    height: 54px;
    font-size: 26px;
  }
}

@media (max-width: 380px) {
  .corner .fighter {
    font-size: 16px;
  }
  .vs-seam {
    font-size: 15px;
  }
}
