:root {
  color-scheme: dark;
  --ink: #f4f5f7;
  --muted: #8d929d;
  --faint: #5d626c;
  --base: #07090c;
  --surface: rgba(15, 18, 24, .88);
  --line: rgba(255, 255, 255, .095);
  --orange: #ff6a00;
  --orange-hot: #ff8a1e;
  --green: #45d483;
  --red: #ff6269;
  --radius: 18px;
  font-family: Inter, "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--base); overflow-x: hidden; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 18%, rgba(255, 94, 0, .13), transparent 26rem),
    linear-gradient(150deg, #080a0e 0%, #090b10 52%, #07090c 100%);
  overflow-x: hidden;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
button { color: inherit; }

.sky {
  position: fixed;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.public-shell, .login-shell, .admin-shell {
  position: relative;
  z-index: 1;
}

.sky__stars {
  position: absolute;
  inset: -12%;
  background-repeat: repeat;
  will-change: transform, opacity;
}

.sky__stars--far {
  opacity: .46;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.85) 0 1px, transparent 1.3px),
    radial-gradient(circle, rgba(255,145,73,.62) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(255,255,255,.48) 0 .7px, transparent 1px);
  background-size: 173px 173px, 257px 257px, 91px 91px;
  background-position: 17px 31px, 112px 73px, 48px 10px;
  animation: star-drift-far 44s linear infinite;
}

.sky__stars--near {
  opacity: .34;
  background-image:
    radial-gradient(circle, white 0 1.1px, transparent 1.5px),
    radial-gradient(circle, rgba(255,124,46,.72) 0 .8px, transparent 1.2px);
  background-size: 311px 311px, 139px 139px;
  background-position: 81px 14px, 39px 93px;
  filter: drop-shadow(0 0 4px rgba(255,255,255,.25));
  animation: star-drift-near 26s linear infinite;
}

.sky__aurora {
  position: absolute;
  width: 52rem;
  height: 52rem;
  top: -23rem;
  right: -10rem;
  border-radius: 50%;
  background: rgba(255, 91, 0, .11);
  filter: blur(110px);
  animation: aurora-breathe 8s ease-in-out infinite alternate;
}

@keyframes star-drift-far { to { transform: translate3d(-22px, 30px, 0); } }
@keyframes star-drift-near { to { transform: translate3d(38px, 54px, 0); } }
@keyframes aurora-breathe { to { opacity: .58; transform: scale(1.08) translate3d(-18px, 12px, 0); } }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand__mark { width: 44px; height: 44px; display: block; }

.brand__name {
  display: inline-flex;
  gap: 2px;
  align-items: baseline;
  letter-spacing: .18em;
  font-size: 20px;
  line-height: 1;
  white-space: nowrap;
}

.brand__name b { font-weight: 730; }
.brand__name em { color: var(--orange); font-style: normal; font-weight: 680; }

.public-shell {
  width: min(1240px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
}

.public-header, .admin-header {
  min-height: 108px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.quiet-link, .back-link {
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .08em;
  transition: color .2s ease;
}
.quiet-link:hover, .back-link:hover { color: var(--ink); }

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 520px;
  padding: 72px 0 80px;
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 14%;
  right: -4%;
  width: min(48vw, 620px);
  height: 72%;
  transform: skewX(-9deg);
  background:
    linear-gradient(120deg, transparent 8%, rgba(255, 105, 0, .12) 8.2%, transparent 8.5%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .038) 0 1px, transparent 1px 54px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .028) 0 1px, transparent 1px 54px);
  clip-path: polygon(24% 0, 100% 0, 100% 100%, 0 100%);
  -webkit-mask-image: linear-gradient(100deg, transparent 2%, black 55%, transparent 100%);
  mask-image: linear-gradient(100deg, transparent 2%, black 55%, transparent 100%);
  opacity: .52;
}

.hero__eyebrow, .section-kicker {
  color: var(--orange-hot);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .28em;
  text-transform: uppercase;
}

.hero__eyebrow { display: flex; align-items: center; gap: 12px; }
.hero__eyebrow span { display: block; width: 30px; height: 1px; background: var(--orange); box-shadow: 0 0 12px var(--orange); }

.hero h1 {
  margin: 24px 0 24px;
  max-width: 840px;
  font-size: clamp(52px, 7.2vw, 102px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 640;
}
.hero h1 strong {
  color: var(--orange);
  font-weight: 720;
  text-shadow: 0 8px 40px rgba(255, 94, 0, .16);
}
.hero__lead {
  max-width: 590px;
  margin: 0;
  color: #a9adb5;
  font-size: 17px;
  line-height: 1.72;
}
.hero__actions { margin-top: 38px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.download-button {
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 24px;
  border: 1px solid #ff8a24;
  border-radius: 8px;
  outline: 0;
  background: linear-gradient(135deg, #ff790b, #e94e00);
  color: #fff;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: .14em;
  box-shadow: 0 12px 34px rgba(244, 74, 0, .18);
  transition: border-color .18s ease, filter .18s ease, box-shadow .18s ease;
}
.download-button span { font-size: 18px; line-height: 1; }
.download-button:hover { filter: brightness(1.08); box-shadow: 0 14px 40px rgba(244, 74, 0, .28); }
.download-button:active { filter: brightness(.93); }
.download-button:focus-visible { box-shadow: 0 0 0 3px rgba(255, 105, 0, .24), 0 14px 40px rgba(244, 74, 0, .28); }
.launch-note {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-left: 1px solid rgba(255, 105, 0, .68);
  background: linear-gradient(90deg, rgba(255, 105, 0, .075), transparent);
  color: #d5d7db;
  font-size: 13px;
  letter-spacing: .035em;
}
.launch-note__light {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange-hot);
  box-shadow: 0 0 14px var(--orange);
}

.status-rail {
  display: grid;
  grid-template-columns: .8fr .9fr 1.6fr .8fr;
  min-height: 112px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.status-item {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px 32px;
  border-right: 1px solid var(--line);
}
.status-item:first-child { padding-left: 0; }
.status-item:last-child { border-right: 0; }
.status-item__label {
  color: var(--faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.status-item strong {
  overflow: hidden;
  color: #c8cbd1;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-item--live strong { color: var(--muted); }
.status-item--live strong i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}
.status-item--live strong.is-online { color: var(--green); }
.status-item--live strong.is-offline { color: var(--red); }

.public-footer {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #4d5159;
  font-size: 10px;
  letter-spacing: .14em;
}

/* Admin login */
.login-shell {
  width: min(450px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 0;
}
.brand--center { margin-bottom: 36px; }
.login-panel {
  position: relative;
  width: 100%;
  padding: 42px;
  border: 1px solid rgba(255,255,255,.11);
  border-top-color: rgba(255, 119, 18, .62);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(18, 21, 27, .96), rgba(10, 12, 16, .94));
  box-shadow: 0 26px 90px rgba(0,0,0,.38), 0 -8px 40px rgba(255, 91, 0, .035);
}
.login-panel h1 { margin: 12px 0 8px; font-size: 28px; letter-spacing: -.03em; }
.login-panel > p { margin: 0 0 30px; color: var(--muted); font-size: 14px; }
.auth-form { display: grid; gap: 18px; }
.auth-form label { display: grid; gap: 8px; }
.auth-form label span { color: #a3a7ae; font-size: 11px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.auth-form input {
  width: 100%;
  height: 50px;
  padding: 0 15px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 9px;
  outline: 0;
  background: rgba(5,7,10,.72);
  color: var(--ink);
  caret-color: var(--orange);
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.auth-form input:hover { border-color: rgba(255,255,255,.2); }
.auth-form input:focus { border-color: rgba(255, 116, 22, .72); box-shadow: 0 0 0 3px rgba(255, 105, 0, .1); background: rgba(8,10,13,.92); }
.primary-button {
  min-height: 52px;
  margin-top: 5px;
  border: 1px solid #ff8a24;
  border-radius: 9px;
  background: linear-gradient(135deg, #ff790b, #e94e00);
  color: white;
  font-size: 13px;
  font-weight: 780;
  letter-spacing: .17em;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(244, 74, 0, .18);
  transition: border-color .18s ease, filter .18s ease, box-shadow .18s ease;
}
.primary-button:hover { filter: brightness(1.08); box-shadow: 0 14px 40px rgba(244, 74, 0, .28); }
.primary-button:active { filter: brightness(.93); }
.primary-button:focus-visible, .action-button:focus-visible, .quiet-button:focus-visible, .filters a:focus-visible, .quiet-link:focus-visible, .back-link:focus-visible { outline: 2px solid var(--orange-hot); outline-offset: 3px; }
.primary-button:disabled, .action-button:disabled { opacity: .46; filter: grayscale(.25); box-shadow: none; cursor: not-allowed; }
.primary-button--link { display: flex; align-items: center; justify-content: center; }
.form-alert { margin: -8px 0 18px; padding: 11px 13px; border-left: 2px solid var(--red); background: rgba(255, 72, 79, .075); color: #ffb4b7; font-size: 13px; line-height: 1.45; }
.back-link { margin-top: 25px; }
.error-panel { text-align: center; }

/* Admin dashboard */
.admin-shell { width: min(1240px, calc(100% - 64px)); min-height: 100vh; margin: 0 auto; padding-bottom: 60px; }
.admin-identity { display: flex; align-items: center; gap: 20px; color: var(--muted); font-size: 13px; }
.admin-identity > span { display: flex; align-items: center; gap: 8px; }
.admin-identity i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.quiet-button { padding: 8px 0; border: 0; background: transparent; color: #747984; cursor: pointer; transition: color .2s ease; }
.quiet-button:hover { color: var(--ink); }
.admin-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 36px; padding: 64px 0 42px; }
.admin-intro h1 { margin: 12px 0 8px; font-size: clamp(36px, 4.2vw, 58px); letter-spacing: -.055em; }
.admin-intro p { margin: 0; color: var(--muted); }
.summary { display: flex; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.summary div { min-width: 110px; padding: 17px 20px; border-right: 1px solid var(--line); }
.summary div:last-child { border-right: 0; }
.summary strong { display: block; font-size: 24px; line-height: 1; }
.summary span { display: block; margin-top: 8px; color: var(--faint); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.filters { display: flex; gap: 8px; padding-bottom: 22px; }
.filters a { padding: 9px 13px; border-bottom: 1px solid transparent; color: #727780; font-size: 12px; transition: color .2s ease, border-color .2s ease; }
.filters a:hover { color: #cfd1d5; }
.filters a.is-active { border-color: var(--orange); color: var(--ink); }
.requests { border-top: 1px solid rgba(255,255,255,.13); }
.request-list__head, .request-row { display: grid; grid-template-columns: minmax(170px, 1.25fr) minmax(145px, .9fr) minmax(110px, .65fr) minmax(220px, auto); align-items: center; column-gap: 20px; }
.request-list__head { min-height: 47px; padding: 0 18px; color: #555a64; font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.request-row {
  min-height: 76px;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: rgba(12,14,18,.38);
  transition: background .2s ease, opacity .22s ease, transform .22s ease;
}
.request-row:hover { background: rgba(22,25,31,.65); }
.request-row.is-busy { opacity: .58; }
.request-row.is-complete { opacity: 0; transform: translateX(10px); }
.player-cell { min-width: 0; display: flex; align-items: center; gap: 13px; }
.player-avatar { flex: 0 0 35px; height: 35px; display: grid; place-items: center; border: 1px solid rgba(255,122,24,.36); background: rgba(255,103,0,.08); color: #ff9b4b; font-size: 12px; font-weight: 800; }
.player-cell strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.request-row time { color: #777c85; font-size: 12px; }
.status-badge { width: max-content; padding-left: 11px; position: relative; color: #9b9fa7; font-size: 11px; }
.status-badge::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; transform: translateY(-50%); border-radius: 50%; background: currentColor; box-shadow: 0 0 7px currentColor; }
.status-badge--pending { color: #ff9a43; }
.status-badge--approved { color: var(--green); }
.status-badge--rejected { color: var(--red); }
.row-actions { display: flex; justify-content: flex-end; gap: 8px; }
.action-button { min-height: 34px; padding: 0 13px; border: 1px solid rgba(255,255,255,.12); border-radius: 6px; background: rgba(255,255,255,.02); color: #a8abb1; font-size: 11px; cursor: pointer; transition: border-color .18s ease, color .18s ease, background .18s ease; }
.action-button:disabled { cursor: wait; }
.action-button--approve:hover { border-color: rgba(69,212,131,.52); background: rgba(69,212,131,.07); color: #72e3a5; }
.action-button--reject:hover { border-color: rgba(255,98,105,.46); background: rgba(255,98,105,.06); color: #ff8d92; }
.empty-state { min-height: 330px; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state__mark { width: 62px; height: 62px; display: grid; place-items: center; border: 1px solid rgba(255,106,0,.25); color: rgba(255,126,33,.55); font-weight: 800; letter-spacing: .08em; }
.empty-state h2 { margin: 28px 0 7px; font-size: 20px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.toast { position: fixed; right: 28px; bottom: 28px; z-index: 10; padding: 13px 17px; border: 1px solid rgba(69,212,131,.34); border-left-color: var(--green); background: #11151a; color: #c6f5da; font-size: 13px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
.toast.is-visible { opacity: 1; transform: none; }
.toast.is-error { border-color: rgba(255,98,105,.34); border-left-color: var(--red); color: #ffc5c7; }

@media (max-width: 850px) {
  .public-shell, .admin-shell { width: min(100% - 36px, 720px); }
  .public-header, .admin-header { min-height: 86px; }
  .hero { min-height: 470px; padding: 58px 0; }
  .hero::before { right: -28%; width: 78vw; }
  .status-rail { grid-template-columns: 1fr 1fr; }
  .status-item { border-bottom: 1px solid var(--line); }
  .status-item:first-child { padding-left: 20px; }
  .status-item:nth-child(2) { border-right: 0; }
  .status-item:nth-child(3), .status-item:nth-child(4) { border-bottom: 0; }
  .admin-intro { align-items: flex-start; flex-direction: column; }
  .summary { width: 100%; }
  .summary div { flex: 1; min-width: 0; }
  .request-list__head { display: none; }
  .request-row { grid-template-columns: 1fr auto; row-gap: 13px; padding: 17px 10px; }
  .request-row time { grid-column: 1; }
  .status-badge { grid-row: 1; grid-column: 2; }
  .row-actions { grid-column: 2; justify-content: flex-end; }
}

@media (max-width: 560px) {
  .brand__mark { width: 37px; height: 37px; }
  .brand__name { font-size: 16px; letter-spacing: .13em; }
  .quiet-link { font-size: 0; }
  .quiet-link::after { content: "ADMIN"; font-size: 10px; letter-spacing: .14em; }
  .hero h1 { font-size: clamp(45px, 15vw, 67px); }
  .hero__lead { font-size: 15px; }
  .launch-note { align-items: flex-start; font-size: 12px; line-height: 1.5; }
  .status-item { padding: 18px 14px; }
  .public-footer { gap: 20px; flex-direction: column; align-items: flex-start; justify-content: center; padding: 22px 0; }
  .login-panel { padding: 32px 24px; }
  .admin-header .brand__name { display: none; }
  .admin-intro { padding-top: 44px; }
  .summary { overflow-x: auto; }
  .summary div { min-width: 90px; padding: 14px 12px; }
  .filters { overflow-x: auto; }
  .request-row { grid-template-columns: 1fr; }
  .status-badge, .row-actions { grid-column: 1; grid-row: auto; }
  .row-actions { justify-content: flex-start; }
  .toast { right: 18px; bottom: 18px; left: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .sky__stars--far { animation: star-drift-far 88s linear infinite !important; }
  .sky__stars--near { animation: star-drift-near 52s linear infinite !important; }
  .sky__aurora { animation: aurora-breathe 16s ease-in-out infinite alternate !important; }
}
