:root {
  --bg: #0c1117;
  --panel: #121a22;
  --panel-strong: #18232d;
  --text: #f6f8fb;
  --muted: #aeb8c4;
  --line: rgba(255, 255, 255, 0.12);
  --lime: #a7f04b;
  --amber: #ffbf47;
  --sky: #56c7ff;
  --coral: #ff6f61;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Arial, sans-serif;
}

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

.topbar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
  padding: 16px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(12, 17, 23, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 2px solid rgba(167, 240, 75, 0.8);
  border-radius: 8px;
  color: var(--lime);
  font-size: 14px;
}

.nav {
  display: flex;
  gap: clamp(12px, 3vw, 28px);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.nav a:hover {
  color: var(--text);
}

.auth-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.user-badge {
  max-width: 140px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

.auth-button:hover {
  border-color: rgba(167, 240, 75, 0.65);
}

.hero {
  position: relative;
  min-height: 88vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 120px clamp(18px, 5vw, 72px) 64px;
}

.hero-canvas,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-canvas {
  width: 100%;
  height: 100%;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(12, 17, 23, 0.94) 0%, rgba(12, 17, 23, 0.64) 48%, rgba(12, 17, 23, 0.18) 100%),
    linear-gradient(0deg, var(--bg) 0%, rgba(12, 17, 23, 0) 34%);
}

.hero-content {
  position: relative;
  max-width: 780px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--lime);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(48px, 8vw, 104px);
  line-height: 0.92;
  letter-spacing: 0;
}

.hero-copy {
  max-width: 620px;
  margin: 24px 0 0;
  color: #d5dde7;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.button.primary {
  background: var(--lime);
  color: #15200e;
  border-color: var(--lime);
}

.button.secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

.stats-band {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-block: 1px solid var(--line);
  background: #101821;
}

.stats-band div {
  min-height: 118px;
  padding: 26px clamp(18px, 5vw, 72px);
  border-right: 1px solid var(--line);
}

.stats-band div:last-child {
  border-right: 0;
}

.stats-band strong {
  display: block;
  color: var(--amber);
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
}

.stats-band span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-weight: 700;
}

.section {
  padding: 84px clamp(18px, 5vw, 72px);
}

.section-head {
  max-width: 720px;
  margin-bottom: 34px;
}

.section h2,
.contact h2 {
  margin: 0;
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0;
}

.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.game-card {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.playable-card {
  border-color: rgba(167, 240, 75, 0.45);
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.playable-card:hover {
  transform: translateY(-4px);
  border-color: rgba(167, 240, 75, 0.85);
}

.locked-card {
  border-color: rgba(255, 191, 71, 0.45);
}

.locked-card .game-art {
  filter: saturate(0.72);
}

.game-art {
  position: relative;
  height: 230px;
  overflow: hidden;
}

.game-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.45;
}

.transfer-art {
  background:
    radial-gradient(circle at 74% 24%, rgba(231, 185, 62, 0.55) 0 12%, transparent 13%),
    linear-gradient(135deg, #0f3d2a 0%, #175a3c 48%, #0a1420 100%);
}

.transfer-art span {
  position: absolute;
  display: block;
}

.transfer-art span:nth-child(1) {
  left: 0;
  right: 0;
  bottom: 26px;
  height: 118px;
  background:
    linear-gradient(90deg, transparent 0 48%, rgba(237, 238, 230, 0.65) 48% 52%, transparent 52% 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.1) 0 38px, transparent 38px 76px);
  border-block: 3px solid rgba(237, 238, 230, 0.65);
}

.transfer-art span:nth-child(2) {
  left: 42px;
  bottom: 58px;
  width: 74px;
  height: 74px;
  border: 5px solid rgba(237, 238, 230, 0.8);
  border-radius: 50%;
}

.transfer-art span:nth-child(3) {
  right: 52px;
  bottom: 54px;
  width: 92px;
  height: 58px;
  border: 5px solid rgba(231, 185, 62, 0.9);
  border-bottom: 0;
}

.transfer-art span:nth-child(4) {
  left: 30px;
  top: 24px;
  width: 118px;
  height: 74px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0e2338, #091420);
  border: 1px solid rgba(231, 185, 62, 0.45);
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.45);
}

.transfer-art span:nth-child(4)::before {
  content: "1. OYUN";
  position: absolute;
  inset: 12px;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-weight: 800;
}

.factory-art {
  background: linear-gradient(145deg, #2b3540, #0c1117 58%, #ffbf47);
}

.factory-art span {
  position: absolute;
  bottom: 30px;
  width: 64px;
  background: #9eb5c7;
  border: 4px solid #263341;
}

.factory-art span:nth-child(1) {
  left: 30px;
  height: 86px;
}

.factory-art span:nth-child(2) {
  left: 112px;
  height: 134px;
}

.factory-art span:nth-child(3) {
  left: 198px;
  height: 104px;
}

.island-art {
  background: linear-gradient(145deg, #56c7ff, #0d837e 55%, #ffe09a);
}

.island-art span {
  position: absolute;
  border-radius: 999px;
}

.island-art span:nth-child(1) {
  width: 210px;
  height: 88px;
  left: 36px;
  bottom: 34px;
  background: #ffe09a;
}

.island-art span:nth-child(2) {
  width: 32px;
  height: 96px;
  left: 126px;
  bottom: 74px;
  background: #7b542d;
}

.island-art span:nth-child(3) {
  width: 104px;
  height: 72px;
  left: 144px;
  bottom: 128px;
  background: #2fbe66;
  clip-path: polygon(0 100%, 30% 0, 50% 100%, 70% 0, 100% 100%);
}

.rail-art {
  background: linear-gradient(145deg, #253342, #111923 56%, #ff6f61);
}

.rail-art span {
  position: absolute;
  background: #d7e0e8;
}

.rail-art span:nth-child(1) {
  left: 34px;
  right: 34px;
  bottom: 48px;
  height: 10px;
  transform: rotate(-12deg);
}

.rail-art span:nth-child(2) {
  width: 110px;
  height: 52px;
  right: 56px;
  bottom: 76px;
  border-radius: 8px 22px 8px 8px;
  background: var(--coral);
}

.rail-art span:nth-child(3) {
  width: 82px;
  height: 52px;
  right: 176px;
  bottom: 76px;
  border-radius: 8px;
  background: var(--sky);
}

.game-body {
  padding: 22px;
}

.tag {
  margin: 0 0 8px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.game-body h3,
.timeline h3 {
  margin: 0;
  font-size: 22px;
}

.game-body p:not(.tag),
.timeline p,
.contact p {
  color: var(--muted);
  line-height: 1.55;
}

.game-body a {
  display: inline-flex;
  margin-top: 6px;
  color: var(--lime);
  font-weight: 800;
}

.play-link {
  display: inline-flex;
  margin-top: 6px;
  color: var(--lime);
  font-weight: 800;
}

.roadmap {
  background: #0f171f;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.timeline div {
  min-height: 220px;
  padding: 28px;
  background: var(--panel-strong);
}

.timeline span {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 8px;
  background: rgba(86, 199, 255, 0.14);
  color: var(--sky);
  font-weight: 800;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px;
  padding: 76px clamp(18px, 5vw, 72px);
  background: #18232d;
}

.contact p {
  max-width: 680px;
  margin-bottom: 0;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 26px clamp(18px, 5vw, 72px);
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

body.auth-open {
  overflow: hidden;
}

.auth-panel {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-panel[hidden] {
  display: none;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 9, 13, 0.78);
  backdrop-filter: blur(14px);
  animation: auth-fade 0.25s ease;
}

.auth-dialog {
  position: relative;
  width: min(100%, 440px);
  padding: 34px 32px 30px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  background: linear-gradient(180deg, #1a2530 0%, #121a22 100%);
  box-shadow:
    0 40px 90px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  animation: auth-pop 0.3s cubic-bezier(0.2, 0.9, 0.3, 1.15);
}

.auth-dialog::before {
  content: '';
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}

.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s;
}

.auth-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  transform: rotate(90deg);
}

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.auth-tab {
  position: relative;
  z-index: 1;
  height: 42px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: color 0.25s;
}

.auth-tab:hover {
  color: var(--text);
}

.auth-tab.is-active {
  color: #0c1117;
}

.auth-tab-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: linear-gradient(135deg, var(--lime) 0%, #8ee04a 100%);
  box-shadow: 0 4px 14px rgba(167, 240, 75, 0.35);
  transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-tabs.is-register .auth-tab-indicator {
  transform: translateX(100%);
}

.auth-heading {
  margin: 0 0 6px;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.auth-message {
  min-height: 20px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.auth-message[hidden] {
  display: none;
}

.auth-message.is-error {
  color: var(--coral);
}

.auth-message.is-success {
  color: var(--lime);
}

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

.auth-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-form input {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(12, 17, 23, 0.8);
  color: var(--text);
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form input::placeholder {
  color: rgba(174, 184, 196, 0.55);
}

.auth-form input:focus {
  outline: none;
  border-color: rgba(167, 240, 75, 0.7);
  box-shadow: 0 0 0 3px rgba(167, 240, 75, 0.16);
}

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--lime) 0%, #8ee04a 100%);
  color: #0c1117;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(167, 240, 75, 0.28);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(167, 240, 75, 0.38);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  filter: grayscale(0.5) brightness(0.8);
  cursor: wait;
}

.auth-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.auth-hint span {
  color: var(--lime);
  font-size: 8px;
}

@keyframes auth-fade {
  from {
    opacity: 0;
  }
}

@keyframes auth-pop {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
}

@media (max-width: 900px) {
  .topbar {
    position: absolute;
    flex-wrap: wrap;
  }

  .game-grid,
  .timeline,
  .contact {
    grid-template-columns: 1fr;
  }

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

  .stats-band div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stats-band div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 620px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 160px;
    gap: 12px;
  }

  .hero {
    min-height: 92vh;
    padding-top: 190px;
  }

  .nav,
  .auth-bar {
    width: 100%;
    justify-content: space-between;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .footer {
    flex-direction: column;
  }
}
