:root {
  color-scheme: light;
  --ink: #f8f4ec;
  --muted: #9db4c7;
  --panel: #11161d;
  --line: rgba(106, 191, 244, 0.28);
  --field: #f8fbff;
  --accent: #ef2c24;
  --accent-dark: #b81416;
  --danger: #9f241c;
  --blue: #54bdf4;
  --blue-dark: #0b3d63;
  --gold: #f5bc32;
  --sky: rgba(84, 189, 244, 0.2);
  --page: #05070a;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 78% 7%, rgba(84, 189, 244, 0.36), transparent 28%),
    radial-gradient(circle at 18% 22%, rgba(239, 44, 36, 0.22), transparent 24%),
    linear-gradient(112deg, transparent 0 19%, rgba(84, 189, 244, 0.18) 19% 22%, transparent 22% 29%, rgba(239, 44, 36, 0.34) 29% 32%, transparent 32% 100%),
    linear-gradient(180deg, #030406 0 360px, #0c1117 360px 100%),
    var(--page);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: 14px;
  background:
    linear-gradient(45deg, #111 25%, transparent 25% 75%, #111 75%) 0 0 / 28px 14px,
    linear-gradient(45deg, transparent 25%, #fff 25% 75%, transparent 75%) 14px 0 / 28px 14px;
  opacity: 0.92;
  pointer-events: none;
  z-index: 5;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(100deg, transparent 0 18%, rgba(84, 189, 244, 0.1) 18% 19%, transparent 19% 100%),
    repeating-linear-gradient(170deg, transparent 0 34px, rgba(255, 255, 255, 0.025) 35px 36px);
  pointer-events: none;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  justify-content: stretch;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 42px 22px 30px;
  color: #fff;
  isolation: isolate;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 22px 10px 15px;
  border: 1px solid rgba(84, 189, 244, 0.58);
  border-radius: 8px;
  box-shadow:
    0 0 22px rgba(84, 189, 244, 0.45),
    inset 0 0 24px rgba(239, 44, 36, 0.18);
  transform: skewX(-4deg);
  z-index: -1;
}

.hero-copy {
  min-width: 0;
}

.eyebrow {
  margin: 14px 0 0;
  display: inline-block;
  color: var(--blue);
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(1.15rem, 2.4vw, 2rem);
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
  transform: skewX(-8deg);
}

h1 {
  margin: 0;
  font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
  font-size: clamp(3.5rem, 10vw, 8.8rem);
  font-weight: 900;
  line-height: 0.82;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow:
    0 4px 0 #000,
    0 0 20px rgba(84, 189, 244, 0.68);
  transform: skewX(-8deg);
}

h1 span {
  color: #fff;
}

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

h2,
h3 {
  margin: 0;
  line-height: 1.15;
  letter-spacing: 0;
  color: #fff;
}

.tabs {
  display: inline-flex;
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(84, 189, 244, 0.58);
  background: rgba(0, 0, 0, 0.5);
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(84, 189, 244, 0.25);
}

.tab,
.button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 0 16px;
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  text-transform: uppercase;
}

.tab.active,
.button.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #9f1115);
  box-shadow: 0 0 16px rgba(239, 44, 36, 0.38);
}

.tab {
  color: #fff7e8;
}

.button.secondary {
  border-color: rgba(84, 189, 244, 0.5);
  color: #fff;
  background: rgba(7, 16, 25, 0.82);
}

.button.danger {
  color: #fff;
  background: var(--danger);
}

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

main {
  max-width: 1180px;
  position: relative;
  margin: 0 auto 56px;
  padding: 0 22px;
  z-index: 1;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.split {
  display: grid;
  grid-template-columns: minmax(260px, 360px) 1fr;
  gap: 18px;
  align-items: start;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.address-grid {
  display: grid;
  grid-template-columns: minmax(82px, 0.7fr) minmax(92px, 1fr) minmax(130px, 1.5fr);
  gap: 10px;
}

.panel,
.class-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(20, 30, 41, 0.96), rgba(8, 12, 18, 0.96)),
    var(--panel);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, 0.36),
    inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.panel {
  padding: 18px;
  border-top: 4px solid var(--blue);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.panel-header p,
.muted {
  color: var(--muted);
}

.panel-header p {
  margin: 5px 0 0;
}

.stack {
  display: grid;
  gap: 12px;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cdbfae;
  border-radius: 7px;
  padding: 0 11px;
  color: #111820;
  background: var(--field);
  box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.08);
}

select:invalid {
  color: #7e887e;
}

.notice {
  display: none;
  border-radius: 7px;
  padding: 11px 12px;
  color: #fff;
  background: var(--sky);
  border: 1px solid rgba(84, 189, 244, 0.42);
}

.notice.show {
  display: block;
}

.notice.error {
  color: #fff;
  background: var(--danger);
}

.score-info {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.score-info strong {
  color: #fff;
}

.score-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

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

.class-card {
  padding: 16px;
  position: relative;
  overflow: hidden;
}

.class-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--blue), var(--accent));
  box-shadow: 0 0 16px rgba(84, 189, 244, 0.58);
}

.class-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.badge {
  align-self: start;
  border-radius: 999px;
  padding: 4px 9px;
  color: #251b0b;
  background: linear-gradient(135deg, #fff0a1, var(--gold));
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.specials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.toolbar {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 0 0;
  background: linear-gradient(180deg, rgba(5, 7, 10, 0), var(--page) 32%);
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
  color: #eef7ff;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
}

.score {
  color: var(--gold);
  font-weight: 850;
}

.leader {
  background: rgba(245, 188, 50, 0.16);
}

@media (max-width: 880px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .tabs {
    justify-self: start;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 5.8rem);
  }

  .split,
  .auth-grid,
  .address-grid,
  .class-grid,
  .specials {
    grid-template-columns: 1fr;
  }

  .podium {
    grid-template-columns: 1fr;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }
}
