:root {
  --bg: #050917;
  --panel: rgba(9, 19, 42, 0.78);
  --panel-strong: rgba(13, 27, 58, 0.94);
  --line: rgba(97, 223, 255, 0.2);
  --text: #f4fbff;
  --muted: #a8bed3;
  --cyan: #00d4ff;
  --green: #00ff9d;
  --orange: #ff9b38;
  --pink: #ff4ea1;
  --violet: #9c6bff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Exo 2", system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 18%, rgba(0, 212, 255, 0.18), transparent 28%),
    radial-gradient(circle at 78% 24%, rgba(255, 78, 161, 0.16), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(0, 255, 157, 0.12), transparent 36%),
    linear-gradient(135deg, #050917 0%, #0b1024 46%, #12091f 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,255,255,0.7) 0 1px, transparent 1.5px),
    linear-gradient(rgba(0,212,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,212,255,0.035) 1px, transparent 1px);
  background-size: 72px 72px, 80px 80px, 80px 80px;
  opacity: 0.42;
  pointer-events: none;
}

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

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 40px 0;
  display: grid;
  place-items: center;
}

.hidden {
  display: none !important;
}

.auth-view {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 420px;
  gap: 28px;
  align-items: stretch;
}

.auth-art,
.auth-panel,
.home-view {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.auth-art {
  position: relative;
  min-height: 560px;
  overflow: hidden;
  border-radius: 8px;
}

.auth-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(0, 212, 255, 0.18), transparent 42%),
    linear-gradient(30deg, rgba(255, 155, 56, 0.14), transparent 46%);
}

.planet {
  position: absolute;
  width: 230px;
  aspect-ratio: 1;
  left: 50%;
  top: 48%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 36% 28%, #fff8b8 0 8%, transparent 9%),
    linear-gradient(135deg, #00d4ff, #346cff 46%, #ff4ea1);
  box-shadow: 0 0 48px rgba(0, 212, 255, 0.45), inset -28px -30px 40px rgba(0, 0, 0, 0.28);
}

.orbit {
  position: absolute;
  left: 50%;
  top: 48%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-18deg);
}

.orbit-one {
  width: 390px;
  height: 170px;
}

.orbit-two {
  width: 500px;
  height: 230px;
  transform: translate(-50%, -50%) rotate(18deg);
}

.rocket-mark {
  position: absolute;
  left: calc(50% + 128px);
  top: calc(48% - 102px);
  font-size: 70px;
  filter: drop-shadow(0 0 24px rgba(0, 212, 255, 0.8));
  animation: floatRocket 3s ease-in-out infinite;
}

.auth-panel {
  border-radius: 8px;
  padding: 34px;
}

.brand-block {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  font-family: "Orbitron", monospace;
  font-size: 12px;
  letter-spacing: 0.22em;
  color: var(--cyan);
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Orbitron", monospace;
  letter-spacing: 0;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 22px;
}

.auth-tab,
.ghost-action,
.primary-action {
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
}

.auth-tab {
  min-height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
}

.auth-tab.active {
  border-color: rgba(0, 255, 157, 0.7);
  background: rgba(0, 255, 157, 0.12);
  box-shadow: 0 0 22px rgba(0, 255, 157, 0.12);
}

.auth-form {
  display: grid;
  gap: 16px;
}

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

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

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(97, 223, 255, 0.24);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--text);
  background: rgba(2, 8, 24, 0.58);
  outline: none;
}

.field input:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
}

.form-message {
  min-height: 22px;
  margin: 0;
  color: var(--orange);
  font-weight: 700;
}

.primary-action {
  min-height: 52px;
  border-color: rgba(0, 212, 255, 0.7);
  border-radius: 6px;
  color: #04101f;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  font-weight: 900;
  box-shadow: 0 0 28px rgba(0, 212, 255, 0.24);
}

.home-view {
  width: 100%;
  min-height: 620px;
  border-radius: 8px;
  padding: clamp(22px, 4vw, 42px);
}

.home-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 34px;
}

.profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-weight: 800;
}

.ghost-action {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  gap: 22px;
}

.game-card {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(97, 223, 255, 0.22);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 255, 157, 0.65);
  box-shadow: 0 22px 70px rgba(0, 255, 157, 0.14);
}

.game-card img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.game-card-body {
  padding: 18px;
}

.game-tag {
  margin: 0 0 6px;
  color: var(--orange);
  font-weight: 800;
  font-size: 13px;
  text-transform: uppercase;
}

.game-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
}

.play-chip {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  padding: 0 18px;
  border-radius: 999px;
  color: #061120;
  background: var(--green);
  font-weight: 900;
}

@keyframes floatRocket {
  0%, 100% { transform: translateY(0) rotate(8deg); }
  50% { transform: translateY(-18px) rotate(-5deg); }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 18px 0;
  }

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

  .auth-art {
    min-height: 240px;
  }

  .planet {
    width: 150px;
  }

  .orbit-one {
    width: 280px;
    height: 120px;
  }

  .orbit-two {
    width: 350px;
    height: 160px;
  }

  .rocket-mark {
    left: calc(50% + 78px);
    top: calc(48% - 74px);
    font-size: 50px;
  }

  .home-header {
    flex-direction: column;
  }

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