:root {
  --gate-bg: #06080d;
  --gate-glass: rgba(255,255,255,0.045);
  --gate-glass-border: rgba(255,255,255,0.07);
  --gate-text: #f1f5f9;
  --gate-text-2: #94a3b8;
  --gate-text-3: #64748b;
  --gate-accent: #f97316;
  --gate-accent-hover: #ea580c;
  --gate-accent-glow: rgba(249,115,22,0.25);
  --gate-red: #ef4444;
  --gate-red-bg: rgba(239,68,68,0.12);
  --gate-radius: 12px;
  --gate-radius-sm: 8px;
  --gate-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --gate-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; }
body {
  font-family: var(--gate-font);
  background: var(--gate-bg);
  color: var(--gate-text);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.gate-bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
}

.gate-bg-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  pointer-events: none;
  z-index: 0;
}

.gate-glow-1 {
  top: 10%;
  left: 15%;
  width: 500px;
  height: 500px;
  background: rgba(249, 115, 22, 0.07);
  animation: gateGlowFloat 8s ease-in-out infinite;
}

.gate-glow-2 {
  bottom: 10%;
  right: 10%;
  width: 400px;
  height: 400px;
  background: rgba(59, 130, 246, 0.06);
  animation: gateGlowFloat 10s ease-in-out infinite reverse;
}

@keyframes gateGlowFloat {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -30px); }
  66% { transform: translate(-15px, 20px); }
}

.gate-wrapper {
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}

.gate-card {
  width: 100%; max-width: 420px;
  background: var(--gate-glass);
  border: 1px solid var(--gate-glass-border);
  border-radius: var(--gate-radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 48px 36px 36px;
  animation: gateCardIn .5s cubic-bezier(.16,1,.3,1) both;
}

@keyframes gateCardIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.gate-logo {
  text-align: center;
  margin-bottom: 36px;
}

.gate-logo-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--gate-accent), #fb923c);
  border-radius: 14px;
  font-size: 22px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.gate-logo-text {
  font-size: 1.75rem;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(135deg, var(--gate-accent) 0%, #fb923c 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gate-logo-sub {
  font-size: .75rem;
  color: var(--gate-text-3);
  text-transform: uppercase;
  letter-spacing: .15em;
  margin-top: 4px;
}

.gate-title {
  font-size: 1.15rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
  color: var(--gate-text);
}

.gate-subtitle {
  font-size: .85rem;
  color: var(--gate-text-2);
  text-align: center;
  margin-bottom: 28px;
}

.gate-form-group {
  margin-bottom: 16px;
}

.gate-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--gate-glass-border);
  border-radius: var(--gate-radius-sm);
  color: var(--gate-text);
  font-size: .9rem;
  font-family: var(--gate-font);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}

.gate-input::placeholder {
  color: var(--gate-text-3);
}

.gate-input:focus {
  border-color: var(--gate-accent);
  box-shadow: 0 0 0 3px var(--gate-accent-glow);
}

.gate-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--gate-accent), #fb923c);
  color: #fff;
  border: none;
  border-radius: var(--gate-radius-sm);
  font-size: .9rem;
  font-weight: 600;
  font-family: var(--gate-font);
  cursor: pointer;
  transition: all var(--gate-transition);
  margin-top: 20px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 20px rgba(249, 115, 22, 0.2);
}

.gate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.3), 0 4px 16px rgba(249, 115, 22, 0.15);
}

.gate-btn:active {
  transform: scale(.98);
}

.gate-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.gate-switch {
  text-align: center;
  margin-top: 20px;
  font-size: .82rem;
}

.gate-switch a {
  color: var(--gate-accent);
  text-decoration: none;
  cursor: pointer;
  transition: color var(--gate-transition);
}

.gate-switch a:hover {
  text-decoration: underline;
}

.gate-error {
  background: var(--gate-red-bg);
  border: 1px solid rgba(239,68,68,.2);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--gate-radius-sm);
  font-size: .82rem;
  margin-bottom: 16px;
  display: none;
}

.gate-error.visible {
  display: block;
  animation: gateShake .4s ease-in-out;
}

@keyframes gateShake {
  0%,100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.gate-screen {
  display: none;
}

.gate-screen.active {
  display: block;
}

@media (max-width: 480px) {
  .gate-card {
    padding: 36px 24px 28px;
  }
}
