:root {
  color-scheme: dark;
  --bg: #030712;
  --panel: rgba(3, 10, 24, 0.86);
  --panel-strong: rgba(4, 8, 18, 0.94);
  --cyan: #10e8ff;
  --green: #4dffaf;
  --magenta: #ff3ed0;
  --gold: #ffda6b;
  --text: #eefaff;
  --muted: #9eb4c5;
  --danger: #ff5f7f;
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(3, 7, 18, 0.24), rgba(3, 7, 18, 0.9)),
    url("/assets/neon_table_v1.png") center top / cover fixed,
    #030712;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 62, 208, 0.16), transparent 34%, transparent 64%, rgba(16, 232, 255, 0.18)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 5px);
  mix-blend-mode: screen;
}

a {
  color: inherit;
  text-decoration: none;
}

main {
  position: relative;
}

.hero {
  min-height: 92vh;
  position: relative;
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 24px clamp(18px, 4vw, 58px) 64px;
}

.topbar {
  position: absolute;
  top: 18px;
  left: clamp(18px, 4vw, 58px);
  right: clamp(18px, 4vw, 58px);
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 52px;
  padding: 0 16px;
  border: 1px solid rgba(16, 232, 255, 0.34);
  background: rgba(3, 8, 19, 0.72);
  box-shadow: 0 0 26px rgba(16, 232, 255, 0.16);
  backdrop-filter: blur(14px);
}

.topbar strong {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0;
}

.topbar__links {
  display: flex;
  gap: 14px;
  color: var(--muted);
  font-weight: 700;
}

.hero__copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin-top: 72px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.78);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(56px, 8vw, 118px);
  line-height: 0.86;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 0 18px rgba(16, 232, 255, 0.34), 0 0 44px rgba(255, 62, 208, 0.32);
}

h2 {
  margin: 0;
  font-size: 23px;
}

h3 {
  margin: 0 0 10px;
  color: #dff9ff;
  font-size: 13px;
  text-transform: uppercase;
}

.lede {
  max-width: 620px;
  margin: 22px 0 0;
  color: #d9eaf2;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

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

.hero__actions {
  margin-top: 28px;
}

.button,
button {
  min-height: 46px;
  border: 1px solid rgba(16, 232, 255, 0.68);
  border-radius: 6px;
  background: rgba(4, 14, 32, 0.94);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 18px;
  box-shadow: inset 0 0 18px rgba(16, 232, 255, 0.06), 0 0 16px rgba(16, 232, 255, 0.12);
}

.button:hover:not(:disabled),
button:hover:not(:disabled) {
  border-color: var(--green);
  color: var(--green);
}

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

.button--primary {
  border-color: var(--green);
  box-shadow: 0 0 24px rgba(77, 255, 175, 0.22);
}

.button--reward {
  border-color: var(--green);
}

.button--danger {
  border-color: var(--danger);
}

.hero__media {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center end;
  padding-right: clamp(20px, 7vw, 120px);
  pointer-events: none;
}

.card-rift {
  position: relative;
  width: min(520px, 44vw);
  min-width: 300px;
  aspect-ratio: 1.08;
}

.card-rift::before {
  content: "";
  position: absolute;
  inset: 18% 8%;
  border: 1px solid rgba(16, 232, 255, 0.4);
  box-shadow: 0 0 42px rgba(16, 232, 255, 0.35), 0 0 86px rgba(255, 62, 208, 0.28);
  transform: skewX(-12deg);
}

.rift-card {
  position: absolute;
  width: 28%;
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.62), 0 0 26px rgba(16, 232, 255, 0.22);
  animation: floatCard 5s ease-in-out infinite;
}

.rift-card--old {
  left: 4%;
  top: 28%;
  filter: saturate(0.55) contrast(0.92);
  transform: rotate(-12deg);
}

.rift-card--mid {
  left: 35%;
  top: 16%;
  filter: saturate(1.2);
  transform: rotate(5deg);
  animation-delay: -1.2s;
}

.rift-card--new {
  right: 4%;
  top: 30%;
  filter: saturate(1.5) contrast(1.12) brightness(1.08);
  transform: rotate(13deg);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.62), 0 0 38px rgba(255, 62, 208, 0.42);
  animation-delay: -2.4s;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr) minmax(260px, 330px);
  gap: 16px;
  min-height: 760px;
  padding: 24px clamp(14px, 3vw, 32px) 36px;
}

.panel,
.table-card {
  border: 1px solid rgba(16, 232, 255, 0.36);
  background: var(--panel);
  box-shadow: 0 0 26px rgba(16, 232, 255, 0.14), inset 0 0 34px rgba(255, 62, 208, 0.055);
  backdrop-filter: blur(14px);
}

.panel {
  padding: 16px;
}

.section-heading {
  margin-bottom: 14px;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(16, 232, 255, 0.44);
  border-radius: 6px;
  background: rgba(2, 7, 17, 0.95);
  color: var(--text);
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
}

.connection-box {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #607080;
  box-shadow: 0 0 12px currentColor;
}

.dot.is-live {
  background: var(--green);
}

.dot.is-error {
  background: var(--danger);
}

.table-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.table-card__top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid rgba(16, 232, 255, 0.2);
  background: rgba(2, 7, 17, 0.48);
}

.play-table {
  min-height: 660px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  padding: 16px;
}

.zone {
  min-height: 148px;
  border: 1px solid rgba(16, 232, 255, 0.22);
  background: rgba(1, 5, 14, 0.34);
  padding: 12px;
}

.zone--field {
  min-height: 270px;
  display: grid;
  align-content: center;
}

.card-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 100px;
}

.game-card {
  width: 76px;
  min-height: 104px;
  border: 1px solid rgba(16, 232, 255, 0.74);
  border-radius: 7px;
  background: rgba(2, 8, 20, 0.96);
  color: var(--text);
  padding: 7px;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.14;
  box-shadow: 0 0 14px rgba(16, 232, 255, 0.2);
}

.game-card.is-back {
  color: transparent;
  background:
    linear-gradient(rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.22)),
    url("/assets/default_neon_back.png") center / cover;
}

.game-card.is-selected {
  border-color: var(--magenta);
  box-shadow: 0 0 26px rgba(255, 62, 208, 0.5);
}

.game-card.is-match {
  border-color: var(--green);
  box-shadow: 0 0 26px rgba(77, 255, 175, 0.46);
}

.stats {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
}

.stats div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid rgba(16, 232, 255, 0.24);
  background: rgba(2, 7, 17, 0.6);
}

dt,
dd {
  margin: 0;
}

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

dd {
  font-weight: 900;
}

.instruction {
  margin: 0 0 14px;
  color: #dcefff;
  line-height: 1.45;
}

.event-log {
  max-height: 330px;
  overflow: auto;
  margin: 14px 0 0;
  padding: 0 0 0 22px;
  color: #cfe3ee;
  line-height: 1.45;
}

.event-log li {
  margin-bottom: 8px;
}

@keyframes floatCard {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -14px;
  }
}

@media (max-width: 1040px) {
  .hero__media {
    opacity: 0.55;
    place-items: center;
    padding-right: 0;
  }

  .card-rift {
    width: min(520px, 78vw);
  }

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

  .play-table {
    min-height: 620px;
  }
}

@media (max-width: 620px) {
  .hero {
    min-height: 88vh;
  }

  .topbar {
    left: 12px;
    right: 12px;
  }

  .topbar__links {
    display: none;
  }

  .hero__copy {
    margin-top: 84px;
  }

  h1 {
    font-size: 52px;
  }

  .game-card {
    width: 64px;
    min-height: 88px;
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
