﻿:root {
  --bg-dark: #09051b;
  --bg-mid: #1b144b;
  --neon-gold: #ffc947;
  --panel-a: rgba(54, 30, 118, 0.79);
  --panel-b: rgba(86, 48, 163, 0.81);
  --panel-c: rgba(42, 26, 99, 0.77);
  --input-a: rgba(26, 14, 58, 0.82);
  --input-b: rgba(56, 29, 114, 0.85);
  --text-main: #f7f6ff;
  --text-muted: #d4d0ef;
  --stroke: rgba(255, 255, 255, 0.34);
  --ok: #8fffd4;
  --error: #ffb3b3;
}

@font-face {
  font-family: "BungeeLocal";
  src: url("fonts/bungee_regular.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "LilitaLocal";
  src: url("fonts/lilita_one_regular.ttf") format("truetype");
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  font-family: "LilitaLocal", "Trebuchet MS", sans-serif;
  color: var(--text-main);
  background:
    linear-gradient(315deg, var(--bg-mid) 0%, var(--bg-dark) 58%),
    radial-gradient(circle at 18% -8%, rgba(54, 214, 255, 0.58), transparent 47%),
    radial-gradient(circle at 88% 72%, rgba(255, 63, 246, 0.42), transparent 43%);
  overflow-x: hidden;
  overflow-y: auto;
}

#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(5px);
  pointer-events: none;
  animation: float 9s ease-in-out infinite;
  z-index: 1;
}

.bg-glow-a {
  width: 330px;
  height: 330px;
  top: -110px;
  left: -40px;
  background: radial-gradient(circle, rgba(54, 214, 255, 0.55) 0%, rgba(54, 214, 255, 0) 67%);
}

.bg-glow-b {
  width: 290px;
  height: 290px;
  right: -70px;
  bottom: 13%;
  background: radial-gradient(circle, rgba(255, 63, 246, 0.5) 0%, rgba(255, 63, 246, 0) 67%);
  animation-delay: -3.5s;
}

.page {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  min-height: 100dvh;
  height: 100svh;
  height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 10px;
}

.card {
  width: min(780px, 100%);
  margin-top: 0;
  border-radius: 24px;
  border: 1px solid var(--stroke);
  background: linear-gradient(315deg, var(--panel-a), var(--panel-b) 48%, var(--panel-c));
  padding: clamp(14px, 2.5vw, 26px);
  box-shadow:
    0 18px 55px rgba(2, 4, 18, 0.66),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(5px);
}

.eyebrow {
  margin: 0;
  color: var(--neon-gold);
  letter-spacing: 0.09em;
  font-size: clamp(0.85rem, 2vw, 1.05rem);
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 8px;
  font-family: "BungeeLocal", Impact, sans-serif;
  line-height: 1;
  letter-spacing: 0.02em;
  font-size: clamp(1.7rem, 6vw, 3rem);
  text-shadow: 0 3px 0 rgba(0, 0, 0, 0.33);
}

.subtitle {
  margin: 0 0 12px;
  color: var(--text-muted);
  font-size: clamp(0.95rem, 2.1vw, 1.12rem);
}

.access-form {
  display: grid;
  gap: 8px;
}

.input-label {
  font-size: 1rem;
  letter-spacing: 0.03em;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

input,
button,
.secondary-btn {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font: inherit;
}

input {
  width: 100%;
  min-height: 46px;
  background: linear-gradient(90deg, var(--input-a), var(--input-b), var(--input-a));
  color: #fff;
  padding: 0 16px;
  outline: none;
}

input::placeholder {
  color: rgba(255, 255, 255, 0.68);
}

input:focus {
  border-color: rgba(255, 201, 71, 0.9);
  box-shadow: 0 0 0 3px rgba(255, 201, 71, 0.2);
}

button,
.secondary-btn {
  min-height: 46px;
  padding: 0 20px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

#submit-btn {
  font-family: "BungeeLocal", Impact, sans-serif;
  letter-spacing: 0.03em;
  color: #2b1200;
  border: 2px solid #f7d86a;
  background: linear-gradient(315deg, #fff2a3, #ffd44d 48%, #ffaf1f);
  box-shadow: 0 7px 0 rgba(91, 41, 0, 0.75);
}

#submit-btn:hover {
  filter: brightness(1.02);
}

#submit-btn:active {
  transform: translateY(3px);
  box-shadow: 0 4px 0 rgba(91, 41, 0, 0.75);
}

#submit-btn:disabled {
  cursor: wait;
  filter: saturate(0.85);
  opacity: 0.82;
  box-shadow: 0 4px 0 rgba(91, 41, 0, 0.55);
}

.form-message {
  min-height: 1.25rem;
  margin: 0;
  color: var(--error);
}

.result {
  margin-top: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  padding: 16px;
  background: rgba(11, 8, 31, 0.5);
  animation: rise 300ms ease;
}

.result-title {
  margin: 0;
  color: var(--ok);
  font-family: "BungeeLocal", Impact, sans-serif;
  font-size: 1.08rem;
}

.result-text {
  margin: 6px 0 12px;
  color: #e8e4ff;
  white-space: pre-line;
}

.link-box {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.24);
}

#game-link {
  color: #adfff1;
  word-break: break-all;
}

.result-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.secondary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.28);
}

.hidden {
  display: none;
}

.reveal {
  animation: rise 550ms ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(12px);
  }
}

@media (max-width: 680px) {
  .input-row {
    grid-template-columns: 1fr;
  }

  #submit-btn,
  .secondary-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-glow {
    animation: none;
  }
}
