:root {
  color-scheme: dark light;
  --bg: #101014;
  --card: #191921;
  --text: #f4f4f5;
  --muted: #b6b6c3;
  --line: #30303a;
  --accent: #f7d774;
  --bad: #ff8c8c;
  --good: #a4f3b0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(247, 215, 116, .16), transparent 36rem),
    linear-gradient(180deg, #101014, #08080a);
  color: var(--text);
}

.shell {
  width: min(980px, calc(100% - 32px));
  margin: 0 auto;
  padding: 56px 0 32px;
}

.hero {
  min-height: 52vh;
  display: grid;
  align-content: center;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(3rem, 10vw, 7.5rem);
  line-height: .9;
  letter-spacing: -.07em;
}

.tagline {
  margin: 24px auto 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  color: var(--accent);
  font-weight: 800;
}

.copy {
  max-width: 650px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.65;
}

.card {
  background: color-mix(in srgb, var(--card) 92%, transparent);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: clamp(20px, 4vw, 36px);
  margin: 24px 0;
  box-shadow: 0 24px 80px rgba(0,0,0,.25);
}

h2 {
  margin: 0 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.muted {
  color: var(--muted);
}

form {
  display: grid;
  gap: 18px;
  margin-top: 24px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 650;
}

input,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #0f0f14;
  color: var(--text);
  padding: 14px 16px;
  font: inherit;
}

textarea {
  min-height: 150px;
  resize: vertical;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 850;
  font-size: 1rem;
  background: var(--accent);
  color: #17120a;
  cursor: pointer;
}

button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.honey {
  position: absolute;
  left: -9999px;
}

.form-message {
  margin: 0;
  min-height: 1.4em;
}

.form-message.good { color: var(--good); }
.form-message.bad { color: var(--bad); }

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.posts {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.post {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 18px;
  background: rgba(255,255,255,.03);
}

.post p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.post .meta {
  color: var(--accent);
  font-weight: 800;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  padding: 20px 4px 0;
}

a {
  color: var(--accent);
}

@media (max-width: 600px) {
  .section-head,
  footer {
    display: grid;
  }
}

.timestamp {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.judged-badge {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.danger {
  background: transparent;
  color: var(--bad);
  border: 1px solid color-mix(in srgb, var(--bad) 55%, var(--line));
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 18px;
}

.tab-button {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
  padding: 10px 14px;
  font-size: 0.95rem;
}

.tab-button.active {
  background: var(--accent);
  color: #17120a;
  border-color: var(--accent);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.status-pill {
  display: inline-block;
  margin-right: 8px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-approved {
  color: var(--good);
  border-color: color-mix(in srgb, var(--good) 55%, var(--line));
}

.status-pending {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
}

.status-rejected {
  color: var(--bad);
  border-color: color-mix(in srgb, var(--bad) 55%, var(--line));
}

.admin-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.button-link {
  display: inline-block;
  border-radius: 999px;
  padding: 14px 20px;
  font-weight: 850;
  font-size: 1rem;
  text-decoration: none;
}

.button-link.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.hidden {
  display: none;
}

.edit-form {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.03);
}

.edit-form textarea {
  min-height: 120px;
}

.ranking-seal {
  display: grid;
  place-items: center;
  margin: 0 auto 28px;
}

.seal-ring {
  width: clamp(138px, 20vw, 190px);
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  position: relative;
  background:
    radial-gradient(circle at center, #f7d774 0 46%, #101014 47% 51%, #f7d774 52% 61%, #101014 62%);
  box-shadow:
    0 0 0 1px rgba(247, 215, 116, .45),
    0 22px 80px rgba(247, 215, 116, .16),
    inset 0 0 26px rgba(0, 0, 0, .35);
  transform: rotate(-4deg);
}

.seal-ring::before,
.seal-ring::after {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: inherit;
  border: 2px dashed rgba(16, 16, 20, .72);
}

.seal-ring::after {
  inset: 27px;
  border-style: solid;
  border-color: rgba(16, 16, 20, .45);
}

.seal-top,
.seal-bottom,
.seal-number {
  position: absolute;
  color: #101014;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: .08em;
  line-height: 1;
}

.seal-top {
  top: 33px;
  font-size: clamp(.72rem, 1.4vw, .9rem);
}

.seal-number {
  font-size: clamp(2.6rem, 5.5vw, 4.1rem);
  letter-spacing: -.08em;
}

.seal-bottom {
  bottom: 33px;
  font-size: clamp(.72rem, 1.4vw, .9rem);
}

@media (prefers-reduced-motion: no-preference) {
  .seal-ring {
    animation: seal-float 5.5s ease-in-out infinite;
  }

  @keyframes seal-float {
    0%, 100% {
      transform: translateY(0) rotate(-4deg);
    }
    50% {
      transform: translateY(-6px) rotate(-2deg);
    }
  }
}

.game-hero {
  min-height: 42vh;
}

.game-controls {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.game-card {
  margin-top: 0;
}

.game-status {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.game-status > div {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255,255,255,.03);
}

.status-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.number-grid {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.number-tile {
  aspect-ratio: 1;
  border-radius: 14px;
  padding: 0;
  background: #0f0f14;
  color: var(--text);
  border: 1px solid var(--line);
  font-weight: 850;
  box-shadow: none;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}

.number-tile:hover,
.number-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--accent);
  outline: none;
}

.number-tile.wrong {
  background: rgba(255, 140, 140, .14);
  border-color: var(--bad);
}

.number-tile.found {
  background: var(--accent);
  color: #101014;
  border-color: var(--accent);
  transform: scale(1.08) rotate(-3deg);
}

.game-result {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
  text-align: center;
}

@media (max-width: 720px) {
  .game-status {
    grid-template-columns: 1fr;
  }

  .number-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .number-tile {
    border-radius: 10px;
    font-size: 0.95rem;
  }
}

.daily-fact-card {
  position: relative;
  overflow: hidden;
}

.daily-fact-card::after {
  content: "69";
  position: absolute;
  right: -10px;
  bottom: -42px;
  font-size: clamp(7rem, 18vw, 13rem);
  font-weight: 950;
  letter-spacing: -.08em;
  color: rgba(247, 215, 116, .07);
  pointer-events: none;
}

.daily-fact {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 14px 0 0;
  font-size: clamp(1.25rem, 3vw, 2rem);
  line-height: 1.3;
  font-weight: 850;
}

.lucky-number {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 24px;
}

.lucky-number > div {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  background: rgba(255,255,255,.035);
}

.lucky-number span {
  display: block;
  color: var(--muted);
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
}

.lucky-number strong {
  display: block;
  color: var(--accent);
  font-size: clamp(1.4rem, 4vw, 2.6rem);
  line-height: 1;
}

@media (max-width: 680px) {
  .lucky-number {
    grid-template-columns: 1fr;
  }
}
