:root {
  color-scheme: dark;
  --bg: #070911;
  --panel-text: #f7fbff;
  --muted: #9ea8bd;
  --danger: #ff8787;
  --shadow: 0 28px 90px rgba(0, 0, 0, 0.58);
  --line-soft: rgba(255, 255, 255, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--panel-text);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  overflow-x: hidden;
}

button,
input,
a {
  font: inherit;
}

.background-layer {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(6, 9, 17, 0.3), rgba(5, 7, 14, 0.82)),
    radial-gradient(circle at 16% 15%, rgba(194, 74, 74, 0.22), transparent 32%),
    radial-gradient(circle at 80% 18%, rgba(43, 124, 255, 0.14), transparent 28%),
    url("/assets/backgrounds/background.png") center center / cover no-repeat;
  z-index: 0;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 48px;
}

.hero {
  text-align: center;
  margin-bottom: 48px;
}

.eyebrow {
  margin: 0 0 16px;
  color: #13cfff;
  text-transform: uppercase;
  letter-spacing: 0.34em;
  font-size: 0.85rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.4rem, 8vw, 5.8rem);
  line-height: 0.92;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  font-weight: 900;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.15);
}

.hero h1 span {
  color: #49ff1a;
}

.tagline {
  margin: 22px auto 0;
  color: #c8d0df;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  max-width: 760px;
  line-height: 1.55;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.stat {
  min-width: 140px;
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 2.1rem;
  font-weight: 900;
}

.stat:first-child strong {
  color: #14d9ff;
}

.stat:nth-child(2) strong {
  color: #49ff1a;
}

.stat:nth-child(3) strong {
  color: #ff2f87;
}

.stat span {
  display: block;
  margin-top: 4px;
  color: #7f8aa1;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.menu-card {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  min-height: 186px;
  padding: 28px 28px 24px;
  color: var(--panel-text);
  text-decoration: none;
  border-radius: 0 0 28px 0;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  background: rgba(5, 9, 17, 0.78);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  position: relative;
  overflow: hidden;
}

.menu-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52);
}

.menu-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 45%);
  pointer-events: none;
}

.menu-card h2,
.menu-card p {
  margin: 0;
}

.menu-card h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.45rem);
  line-height: 0.98;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-top: 10px;
}

.menu-card p {
  margin-top: 12px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.card-kicker {
  display: inline-block;
  color: #13d8ff;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.85rem;
  font-weight: 700;
}

.icon-slot {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: rgba(9, 15, 28, 0.72);
  flex: 0 0 auto;
  font-weight: 800;
  font-size: 1.2rem;
}

.cyan {
  border-color: rgba(20, 217, 255, 0.3);
}

.lime {
  border-color: rgba(73, 255, 26, 0.28);
}

.crimson {
  border-color: rgba(255, 38, 102, 0.25);
}

.battle {
  background: rgba(5, 9, 17, 0.9);
  width: 100%;
  text-align: left;
  min-height: 228px;
  align-items: flex-start;
}

.wide {
  grid-column: 1 / 3;
}

.battle-copy h2 {
  font-size: clamp(2.2rem, 4vw, 3rem);
}

.battle-copy {
  flex: 1 1 auto;
}

.battle-status {
  display: inline-flex;
  align-self: flex-end;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(20, 217, 255, 0.28);
  background: rgba(0, 0, 0, 0.28);
  color: #95efff;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
}

.footer-tools {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 22px;
}

.status {
  margin: 0;
  color: #95d9ff;
}

.status.error,
.gate-status {
  color: var(--danger);
}

.gate-dialog {
  width: min(420px, calc(100vw - 32px));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  padding: 0;
  background: rgba(7, 13, 22, 0.95);
  color: var(--panel-text);
}

.gate-dialog::backdrop {
  background: rgba(0, 0, 0, 0.55);
}

.gate-form {
  padding: 26px;
}

.gate-form h2,
.gate-form p {
  margin-top: 0;
}

.gate-form input {
  width: 100%;
  margin: 10px 0 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--panel-text);
}

.dialog-actions {
  display: flex;
  gap: 12px;
}

.dialog-actions button {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 12px 20px;
  background: rgba(10, 18, 29, 0.82);
  color: var(--panel-text);
  cursor: pointer;
}

@media (max-width: 820px) {
  .shell {
    padding-top: 42px;
  }

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

  .wide {
    grid-column: auto;
  }

  .menu-card {
    padding: 24px 22px;
  }

  .battle {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}
