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

body {
  background: #0b0e14;
  color: #e6e6e6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

a { color: #d4b268; }

/* ---------- home page ---------- */

body.home {
  overflow: hidden;
  background: #05070d;
}

/* Slowly drifting color clouds. */
.aurora { position: fixed; inset: 0; overflow: hidden; }

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  mix-blend-mode: screen;
  opacity: 0.55;
}

.b1 { width: 55vw; height: 55vw; background: #4338ca; top: -15vw; left: -10vw; animation: drift1 37s ease-in-out infinite alternate; }
.b2 { width: 45vw; height: 45vw; background: #0d9488; bottom: -12vw; right: -8vw; animation: drift2 29s ease-in-out infinite alternate; }
.b3 { width: 38vw; height: 38vw; background: #7c3aed; top: 30vh; left: 55vw; opacity: 0.4; animation: drift3 43s ease-in-out infinite alternate; }
.b4 { width: 30vw; height: 30vw; background: #be185d; bottom: 5vh; left: 12vw; opacity: 0.22; animation: drift1 51s ease-in-out infinite alternate-reverse; }

@keyframes drift1 { from { transform: translate(0, 0) scale(1); }    to { transform: translate(12vw, 8vh) scale(1.25); } }
@keyframes drift2 { from { transform: translate(0, 0) scale(1.15); } to { transform: translate(-10vw, -9vh) scale(0.9); } }
@keyframes drift3 { from { transform: translate(0, 0) scale(0.9); }  to { transform: translate(-14vw, 10vh) scale(1.2); } }

/* On tall narrow screens the vw-sized clouds would shrink to nothing. */
@media (max-aspect-ratio: 1/1) {
  .blob { filter: blur(80px); }
  .b1 { width: 110vw; height: 110vw; top: -30vw; left: -35vw; }
  .b2 { width: 95vw; height: 95vw; bottom: -25vw; right: -30vw; }
  .b3 { width: 80vw; height: 80vw; top: 45vh; left: 30vw; }
  .b4 { width: 70vw; height: 70vw; bottom: 10vh; left: -15vw; }
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.intro {
  text-align: center;
  animation: intro-fade 1.4s ease-out both;
}

@keyframes intro-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .intro { animation: none; }
  .blob { animation: none; }
}

.intro h1 {
  font-size: clamp(2.6rem, 8vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #f7f6f2;
  white-space: nowrap;
  text-shadow: 0 2px 40px rgba(0, 0, 0, 0.6);
}

.intro p {
  margin-top: 0.6rem;
  color: rgba(247, 246, 242, 0.66);
  font-size: clamp(0.9rem, 2.2vw, 1.15rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

/* ---------- content pages ---------- */

.page {
  max-width: 64rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.page.narrow { max-width: 44rem; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

h1 { font-size: 1.6rem; font-weight: 600; }
h2 { font-size: 1.1rem; font-weight: 600; margin: 2rem 0 0.75rem; color: #d4b268; }

.actions { display: flex; align-items: center; gap: 0.5rem; }

.button {
  display: inline-block;
  padding: 0.4rem 0.9rem;
  background: #d4b268;
  color: #0b0e14;
  border: none;
  border-radius: 6px;
  font: inherit;
  font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
}

.button:hover { filter: brightness(1.1); }

.button.subtle {
  background: transparent;
  color: #d4b268;
  border: 1px solid rgba(212, 178, 104, 0.4);
}

/* ---------- tables ---------- */

.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }

th, td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid rgba(230, 230, 230, 0.1);
  vertical-align: top;
}

th { color: #8f96a3; font-weight: 500; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

tr.resolved td { color: #8f96a3; }

td.statement { max-width: 22rem; }
td.details { color: #b0b6c0; font-size: 0.85rem; }
td.nowrap { white-space: nowrap; }
td.row-actions { white-space: nowrap; }
td.row-actions form { display: inline-flex; gap: 0.35rem; margin-left: 0.35rem; }

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  border: 1px solid rgba(230, 230, 230, 0.25);
  color: #b0b6c0;
}

.badge-yes { border-color: #4caf7d; color: #4caf7d; }
.badge-no { border-color: #c65b5b; color: #c65b5b; }

/* ---------- forms ---------- */

.login {
  margin-top: 2.5rem;
  display: flex;
  gap: 0.5rem;
}

input, select {
  font: inherit;
  padding: 0.45rem 0.6rem;
  background: #131826;
  color: #e6e6e6;
  border: 1px solid rgba(230, 230, 230, 0.15);
  border-radius: 6px;
}

input:focus, select:focus { outline: 1px solid #d4b268; }

.bet-form { display: flex; flex-direction: column; gap: 0.9rem; margin-top: 0.5rem; }

.bet-form label { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.85rem; color: #8f96a3; flex: 1; }

.field-row { display: flex; gap: 0.9rem; flex-wrap: wrap; }

.total {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: 600;
  color: #d4b268;
  margin: 1rem 0;
  font-variant-numeric: tabular-nums;
}

.hint { color: #8f96a3; font-size: 0.9rem; margin-bottom: 1rem; }

.empty { color: #8f96a3; margin: 1.5rem 0; }

/* ---------- messages ---------- */

.flashes {
  list-style: none;
  max-width: 64rem;
  margin: 1rem auto 0;
  padding: 0 1.25rem;
}

.flashes li {
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(212, 178, 104, 0.4);
  border-radius: 6px;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}

body.home .flashes { display: none; }

.errors {
  list-style: none;
  margin-bottom: 1rem;
}

.errors li {
  padding: 0.5rem 0.9rem;
  border: 1px solid #c65b5b;
  color: #e6a1a1;
  border-radius: 6px;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
}
