:root {
  --bg: #070713;
  --panel: rgba(16, 16, 34, 0.82);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text: rgba(245, 245, 255, 0.92);
  --muted: rgba(245, 245, 255, 0.7);
  --accent: #8b5cf6;
  --accent-2: #c084fc;
  --danger: #ef4444;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Sora", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background: radial-gradient(1200px 800px at 18% 30%, rgba(139, 92, 246, 0.18), transparent 70%),
    radial-gradient(900px 700px at 80% 20%, rgba(192, 132, 252, 0.14), transparent 65%),
    radial-gradient(1100px 850px at 45% 120%, rgba(139, 92, 246, 0.12), transparent 65%),
    var(--bg);
  overflow: hidden;
}

.stars {
  position: fixed;
  inset: -30%;
  pointer-events: none;
  opacity: 0.45;
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.08));
  background-repeat: repeat;
  will-change: transform;
}

.stars-far {
  opacity: 0.28;
  background-image:
    radial-gradient(1px 1px at 12px 18px, rgba(255, 255, 255, 0.7) 60%, transparent 62%),
    radial-gradient(1px 1px at 160px 120px, rgba(255, 255, 255, 0.55) 55%, transparent 60%),
    radial-gradient(1px 1px at 84px 230px, rgba(255, 255, 255, 0.65) 55%, transparent 60%),
    radial-gradient(1px 1px at 260px 80px, rgba(255, 255, 255, 0.55) 55%, transparent 60%),
    radial-gradient(1px 1px at 310px 210px, rgba(255, 255, 255, 0.5) 55%, transparent 60%);
  background-size: 340px 260px;
  animation: starsDrift 120s linear infinite;
}

.stars-mid {
  opacity: 0.35;
  background-image:
    radial-gradient(1.2px 1.2px at 22px 44px, rgba(255, 255, 255, 0.75) 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 140px 30px, rgba(255, 255, 255, 0.62) 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 210px 160px, rgba(255, 255, 255, 0.62) 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 320px 120px, rgba(255, 255, 255, 0.62) 55%, transparent 60%),
    radial-gradient(1.2px 1.2px at 52px 190px, rgba(255, 255, 255, 0.62) 55%, transparent 60%);
  background-size: 360px 240px;
  animation: starsDrift 80s linear infinite;
}

.stars-near {
  opacity: 0.5;
  background-image:
    radial-gradient(1.6px 1.6px at 44px 70px, rgba(255, 255, 255, 0.78) 55%, transparent 60%),
    radial-gradient(1.6px 1.6px at 160px 160px, rgba(255, 255, 255, 0.7) 55%, transparent 60%),
    radial-gradient(1.6px 1.6px at 260px 44px, rgba(255, 255, 255, 0.7) 55%, transparent 60%),
    radial-gradient(1.6px 1.6px at 320px 210px, rgba(255, 255, 255, 0.7) 55%, transparent 60%),
    radial-gradient(1.6px 1.6px at 80px 240px, rgba(255, 255, 255, 0.7) 55%, transparent 60%);
  background-size: 380px 260px;
  animation: starsDrift 55s linear infinite;
}

@keyframes starsDrift {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-10%, 8%, 0);
  }
}

.gate-wrap {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 38px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.gate-head {
  position: fixed;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: rgba(7, 7, 19, 0.52);
  backdrop-filter: blur(14px);
}

.gate-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 18px;
}

.gate-by {
  text-decoration: none;
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  color: rgba(245, 245, 255, 0.72);
  border-bottom: 1px dashed rgba(245, 245, 255, 0.22);
  padding-bottom: 2px;
  transition: color 160ms ease, border-color 160ms ease;
}

.gate-by:hover {
  color: rgba(245, 245, 255, 0.92);
  border-color: rgba(192, 132, 252, 0.6);
}

.gate-card {
  width: min(520px, 100%);
  padding: 22px 22px 18px;
  border-radius: 22px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.gate-title {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 26px;
}

.gate-subtitle {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-label {
  font-size: 12px;
  color: rgba(245, 245, 255, 0.78);
}

.gate-input-row {
  display: flex;
  gap: 10px;
}

.gate-input-row input {
  flex: 1;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 9, 22, 0.7);
  padding: 0 14px;
  color: var(--text);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.gate-input-row input:focus {
  border-color: rgba(192, 132, 252, 0.7);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.18);
}

.gate-btn {
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(192, 132, 252, 0.52);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.82), rgba(192, 132, 252, 0.82));
  color: rgba(10, 10, 18, 0.92);
  font-weight: 800;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform 120ms ease, filter 120ms ease, box-shadow 160ms ease;
  box-shadow: 0 14px 34px rgba(139, 92, 246, 0.22);
}

.gate-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
}

.gate-btn:active {
  transform: translateY(0);
}

.gate-btn--twitch {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(10, 10, 24, 0.72);
  color: rgba(245, 245, 255, 0.9);
  box-shadow: none;
}

.gate-btn--twitch:hover {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.gate-btn--ghost {
  background: rgba(9, 9, 22, 0.65);
  color: rgba(245, 245, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.gate-btn--ghost:hover {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.gate-message {
  margin: 0;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 9, 22, 0.65);
  color: rgba(245, 245, 255, 0.86);
  line-height: 1.4;
}

.gate-message.is-error {
  border-color: rgba(239, 68, 68, 0.48);
  background: rgba(239, 68, 68, 0.08);
}

.gate-pending {
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(9, 9, 22, 0.55);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.gate-pending-text {
  margin: 0;
  color: rgba(245, 245, 255, 0.78);
  line-height: 1.4;
}

.gate-pending-actions {
  display: flex;
  gap: 10px;
}

.hidden {
  display: none !important;
}

.gate-foot {
  position: fixed;
  bottom: 16px;
  left: 18px;
  right: 18px;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.gate-foot-note {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(245, 245, 255, 0.35);
}

@media (max-width: 520px) {
  .gate-card {
    padding: 20px 16px 16px;
  }

  .gate-title {
    font-size: 22px;
  }

  .gate-input-row {
    flex-direction: column;
  }
}

