:root {
  --turf-dark: #10281f;
  --turf-mid: #1c3d2e;
  --turf-card: #204633;
  --chalk: #f3f1e7;
  --chalk-dim: #c9d4c9;
  --gold: #eec25d;
  --yes: #5fd06a;
  --no: #e2685a;
  --line: rgba(243, 241, 231, 0.12);

  --font-display: "Teko", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(ellipse at top, var(--turf-mid), var(--turf-dark) 65%);
  color: var(--chalk);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

.wrap {
  width: 100%;
  max-width: 560px;
  padding: 2.5rem 1.25rem 3rem;
}

.hero {
  text-align: center;
}

.photo {
  max-width: 240px;
  max-height: 280px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35));
}

.photo--yes { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 26px rgba(95, 208, 106, 0.4)); }
.photo--no { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 26px rgba(226, 104, 90, 0.4)); }
.photo--blessa { filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.35)) grayscale(70%); }

.eyebrow {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--chalk-dim);
  margin: 0.75rem 0 0.5rem;
}

h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.6rem, 12vw, 4rem);
  line-height: 0.95;
  margin: 0 0 1.75rem;
  color: var(--chalk);
}

.answer {
  border-radius: 18px;
  padding: 2.25rem 1rem 2rem;
  background: var(--turf-card);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.answer__word {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(4.5rem, 26vw, 7rem);
  line-height: 1;
  display: inline-block;
}

.answer--loading .answer__word {
  color: var(--chalk-dim);
  font-size: clamp(2.5rem, 12vw, 3.5rem);
}

.answer--yes .answer__word {
  color: var(--yes);
  text-shadow: 0 0 28px rgba(95, 208, 106, 0.35);
}

.answer--no .answer__word {
  color: var(--no);
  text-shadow: 0 0 28px rgba(226, 104, 90, 0.35);
}

.answer--blessa .answer__word {
  color: var(--chalk-dim);
  font-size: clamp(3rem, 15vw, 4.5rem);
}

.match-info {
  margin-top: 1rem;
  color: var(--chalk-dim);
  font-size: 0.95rem;
  line-height: 1.5;
}

.match-info strong {
  color: var(--chalk);
}

.next-match-info {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  color: var(--chalk-dim);
  font-size: 0.9rem;
}

.next-match-info strong {
  color: var(--gold);
}

.stats {
  margin-top: 2.25rem;
}

.stats h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
  color: var(--chalk);
}

.stats__scroll {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.stats__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--turf-card);
  font-size: 0.88rem;
  min-width: 480px;
}

.stats__table th,
.stats__table td {
  text-align: left;
  padding: 0.6rem 0.8rem;
  white-space: nowrap;
}

.stats__table thead th {
  color: var(--chalk-dim);
  font-weight: 500;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--line);
}

.stats__table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.stats__table td:not(:first-child) {
  text-align: center;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
}

.stats__table td:last-child {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--chalk-dim);
}

.card-icons {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--chalk-dim);
}

.card-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}

.card-icon.green {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 10px solid #4caf50;
}

.card-icon.yellow {
  width: 11px;
  height: 11px;
  background: #f1c40f;
  border-radius: 1px;
}

.stats__empty {
  color: var(--chalk-dim);
  font-family: var(--font-body);
  font-size: 0.85rem;
  text-align: left !important;
  white-space: normal;
}

.standings {
  margin-top: 2.75rem;
}

.standings h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0 0 0.75rem;
  color: var(--chalk);
}

.standings__table {
  width: 100%;
  border-collapse: collapse;
  background: var(--turf-card);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.standings__table th,
.standings__table td {
  text-align: left;
  padding: 0.85rem 1.1rem;
  font-size: 1.05rem;
}

.standings__table thead th {
  color: var(--chalk-dim);
  font-weight: 500;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.standings__table td:nth-child(2),
.standings__table th:nth-child(2) {
  text-align: right;
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--gold);
}

.standings__table tbody tr + tr td {
  border-top: 1px solid var(--line);
}

.standings__note {
  margin: 0.6rem 0.2rem 0;
  font-size: 0.85rem;
  color: var(--chalk-dim);
}

.footer {
  margin-top: 3rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.75rem 1rem;
}

button {
  font-family: var(--font-body);
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid var(--line);
  padding: 0.55rem 1.1rem;
  font-size: 0.9rem;
}

.btn-ghost {
  background: transparent;
  color: var(--chalk-dim);
}

.btn-ghost:hover { color: var(--chalk); border-color: var(--chalk-dim); }

.btn-tiny {
  background: transparent;
  color: var(--chalk-dim);
  border: none;
  font-size: 0.78rem;
  text-decoration: underline;
  padding: 0.3rem 0.4rem;
}

.btn-primary {
  background: var(--gold);
  color: var(--turf-dark);
  border: none;
  font-weight: 600;
}

.btn-secondary {
  background: var(--turf-mid);
  color: var(--chalk);
  width: 100%;
  margin-top: 0.4rem;
}

/* Modals */
.modal {
  border: none;
  border-radius: 16px;
  padding: 0;
  background: var(--turf-card);
  color: var(--chalk);
  width: min(420px, 92vw);
}

.modal::backdrop {
  background: rgba(8, 18, 14, 0.65);
}

.modal__form {
  padding: 1.5rem 1.4rem 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.modal__form h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  margin: 0;
}

.modal__hint {
  font-size: 0.85rem;
  color: var(--chalk-dim);
  margin: 0;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  color: var(--chalk-dim);
}

input {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--turf-dark);
  color: var(--chalk);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
  margin-top: 0.3rem;
}

.modal__error {
  color: var(--no);
  font-size: 0.85rem;
  margin: 0;
  min-height: 1em;
}

.modal__success {
  color: var(--yes);
  font-size: 0.85rem;
  margin: 0;
  min-height: 1em;
}

.checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
  color: var(--chalk);
  font-size: 0.9rem;
}

.checkbox-label input {
  width: auto;
}

.btn-beer {
  background: transparent;
  border: none;
  font-size: 1.15rem;
  padding: 0.1rem 0.3rem;
  line-height: 1;
  vertical-align: middle;
}

.btn-beer:hover {
  transform: scale(1.15);
}

.redeemed-cell {
  color: var(--chalk-dim);
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  text-align: center !important;
}

.standings__table td:nth-child(4) {
  text-align: center;
  padding-left: 0.3rem;
  padding-right: 0.6rem;
  vertical-align: middle;
}

.btn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #25d366;
  color: #0b3d1e;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
}

.btn-whatsapp:hover {
  filter: brightness(1.05);
}

textarea {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--turf-dark);
  color: var(--chalk);
  resize: vertical;
}

.modal__hint--mono {
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.78rem;
  background: var(--turf-dark);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  margin: -0.3rem 0 0;
}

.admin-hidden {
  display: none;
}

select#manageMatchSelect {
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--turf-dark);
  color: var(--chalk);
}

#manageMatchFields {
  margin-top: 0.6rem;
}
#manageMatchFields:not(.admin-hidden) {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.admin__section {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
  margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
