:root {
  color-scheme: dark;
  --bg: #061019;
  --surface: #0c1c28;
  --surface-2: #112633;
  --line: rgba(124, 178, 190, .2);
  --gold: #d6b76e;
  --gold-bright: #f2d58d;
  --teal: #56b6b1;
  --text: #f4f2ea;
  --muted: #9cabb1;
  --danger: #e48679;
  --serif: Georgia, "Times New Roman", serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: var(--sans);
  background:
    radial-gradient(circle at 50% -8%, rgba(86, 182, 177, .16), transparent 34rem),
    linear-gradient(145deg, #050d14, #071722 55%, #050c12);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .2;
  background-image:
    linear-gradient(rgba(214, 183, 110, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 183, 110, .045) 1px, transparent 1px);
  background-size: 58px 58px;
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000, transparent 76%);
  mask-image: radial-gradient(circle at 50% 30%, #000, transparent 76%);
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  transform: translateY(-150%);
  border-radius: 8px;
  padding: 10px 14px;
  color: #07131d;
  background: var(--gold-bright);
  font-weight: 800;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(5, 13, 20, .78);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.header-inner {
  width: min(900px, calc(100% - 28px));
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--gold-bright);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
}

.home-link:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gold-bright);
  outline-offset: 3px;
}

.page-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.page-shell {
  width: min(900px, calc(100% - 28px));
  margin: 0 auto;
  padding: clamp(42px, 7vw, 76px) 0 64px;
}

.container {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(24px, 5vw, 52px);
  text-align: center;
  background: linear-gradient(145deg, rgba(15, 34, 46, .96), rgba(7, 19, 28, .98));
  box-shadow: 0 30px 90px rgba(0,0,0,.32);
}

.container::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(35px, 7vw, 61px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -.035em;
}

h1 em { color: var(--gold-bright); font-style: normal; }

.intro {
  max-width: 560px;
  margin: 18px auto 34px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.input-panel,
.game-panel {
  max-width: 720px;
  margin: 0 auto;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

legend {
  width: 100%;
  padding: 0;
  color: var(--text);
  font-family: var(--serif);
  font-size: 23px;
}

.field-help {
  margin: 7px 0 20px;
  color: var(--muted);
  font-size: 13px;
}

.player-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.player-grid label:last-child { grid-column: 1 / -1; width: calc(50% - 6px); justify-self: center; }

.player-grid label { text-align: left; }

.player-grid label span {
  display: block;
  margin: 0 0 7px 3px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

input[type="text"] {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(4, 13, 20, .7);
  font: inherit;
  transition: border-color .2s ease, background .2s ease;
}

input[type="text"]::placeholder { color: #61757d; }
input[type="text"]:hover { border-color: rgba(214, 183, 110, .4); }

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.option {
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  text-align: left;
  background: rgba(9, 25, 35, .72);
  cursor: pointer;
}

.option input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--gold);
}

.option span { min-width: 0; }
.option strong { display: block; font-size: 13px; }
.option small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.35; }

button {
  min-height: 48px;
  border: 0;
  border-radius: 11px;
  padding: 0 22px;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .2s ease, filter .2s ease;
}

button:hover { transform: translateY(-2px); filter: brightness(1.07); }

.primary-button {
  width: 100%;
  margin-top: 18px;
  color: #07131d;
  background: linear-gradient(135deg, var(--gold-bright), #bd9048);
  box-shadow: 0 12px 34px rgba(189, 144, 72, .2);
}

.secondary-button {
  margin-top: 18px;
  border: 1px solid rgba(214, 183, 110, .38);
  color: var(--gold-bright);
  background: rgba(214, 183, 110, .08);
}

.hidden { display: none !important; }

.wheel {
  width: min(230px, 64vw);
  aspect-ratio: 1;
  position: relative;
  display: grid;
  place-items: center;
  margin: 14px auto 24px;
  overflow: hidden;
  border: 5px solid var(--gold);
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, rgba(86,182,177,.28), rgba(214,183,110,.16), rgba(86,182,177,.28), rgba(214,183,110,.16), rgba(86,182,177,.28));
  box-shadow: inset 0 0 0 8px #0c1c28, 0 0 0 1px var(--gold), 0 18px 54px rgba(0,0,0,.34);
  animation: spin 1s linear infinite;
}

.wheel::after {
  content: "";
  position: absolute;
  inset: 22%;
  border: 1px solid rgba(214,183,110,.42);
  border-radius: 50%;
  background: #0a1923;
}

.wheel-icon {
  width: 94px;
  height: 94px;
  position: relative;
  z-index: 1;
  object-fit: contain;
  filter: drop-shadow(0 5px 12px rgba(0,0,0,.55));
}

@keyframes spin { to { transform: rotate(360deg); } }

#current-player,
#dj-message {
  margin: 0 auto 18px;
  color: var(--gold-bright);
  font-family: var(--serif);
  font-size: clamp(20px, 4vw, 27px);
}

.slotmachine {
  width: min(320px, 100%);
  height: 58px;
  margin: 20px auto;
  overflow: hidden;
  border: 1px solid rgba(214,183,110,.5);
  border-radius: 11px;
  background: #07141d;
  box-shadow: 0 15px 38px rgba(0,0,0,.28);
}

.slotmachine ul { margin: 0; padding: 0; list-style: none; animation: slot-spin .1s linear infinite; }
.slotmachine li { height: 58px; color: var(--gold-bright); font-size: 18px; font-weight: 800; line-height: 58px; }
@keyframes slot-spin { to { transform: translateY(-58px); } }

#results h2 {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 500;
}

#results p {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 9px 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 14px;
  text-align: left;
  background: rgba(8, 22, 31, .78);
}

#results img { width: 34px; height: 34px; object-fit: contain; }

@media (max-width: 620px) {
  .container { border-radius: 20px; }
  .player-grid,
  .options { grid-template-columns: 1fr; }
  .player-grid label:last-child { grid-column: auto; width: 100%; }
  .option { min-height: 64px; }
}

@media (max-width: 420px) {
  .header-inner,
  .page-shell { width: min(100% - 20px, 900px); }
  .page-label { display: none; }
  .container { padding: 24px 15px 28px; }
  .intro { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}
