:root {
  --primary-bright: #0055FF;
  --accent: #5500FF;
  --bg-dark: #0A0E1A;
  --bg-darker: #050812;
  --bg-card: #131929;
  --text-white: #FFFFFF;
  --text-50: rgba(245, 247, 250, 0.5);
  --text-65: rgba(245, 247, 250, 0.65);
  --card-border: rgba(255, 255, 255, 0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --ring: 0 0 0 3px rgba(0, 85, 255, 0.38);
  --shadow-primary: 0 6px 20px rgba(0, 85, 255, 0.30);
  --font-body: 'Rajdhani', sans-serif;
  --font-display: 'Orbitron', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  background: var(--bg-darker);
  color: var(--text-white);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  position: relative;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.gate-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(900px 600px at 18% -10%, rgba(0, 85, 255, 0.20), transparent 60%),
    radial-gradient(800px 600px at 100% 110%, rgba(85, 0, 255, 0.18), transparent 60%),
    linear-gradient(180deg, var(--bg-dark), var(--bg-darker));
}

/* subtle grid */
.gate-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 75%);
}

.gate-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  padding: 40px 36px 30px;
  text-align: center;
  background: linear-gradient(180deg, rgba(19, 25, 41, 0.92), rgba(13, 17, 23, 0.92));
  border: 1px solid var(--card-border);
  border-radius: 18px;
  box-shadow:
    0 24px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 85, 255, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(8px);
  animation: gate-in 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes gate-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}

.gate-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  color: #fff;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary-bright), var(--accent));
  box-shadow: var(--shadow-primary), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.gate-eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--primary-bright);
  margin-bottom: 10px;
}

h1 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}

.gate-sub {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-65);
  margin-bottom: 26px;
}

form { display: flex; flex-direction: column; gap: 14px; }

.gate-field { position: relative; }

#gate-pass {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 18px;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-white);
  background: rgba(5, 8, 18, 0.7);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

#gate-pass::placeholder { color: var(--text-50); letter-spacing: 0.02em; }

#gate-pass:focus {
  border-color: var(--primary-bright);
  box-shadow: var(--ring);
  background: rgba(5, 8, 18, 0.95);
}

.gate-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  color: var(--text-50);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
}
.gate-toggle:hover { color: var(--text-white); background: rgba(255, 255, 255, 0.05); }

.gate-error {
  font-size: 0.92rem;
  font-weight: 600;
  color: #ff6b7d;
  text-align: left;
  margin: -2px 2px 0;
}

.gate-submit {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  background: linear-gradient(135deg, var(--primary-bright), var(--accent));
  box-shadow: var(--shadow-primary);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.gate-submit:hover { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 26px rgba(0, 85, 255, 0.42); }
.gate-submit:active { transform: translateY(0); }
.gate-submit svg { transition: transform 0.15s ease; }
.gate-submit:hover svg { transform: translateX(2px); }

.gate-foot {
  margin-top: 22px;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--text-50);
}

@media (max-width: 480px) {
  .gate-card { padding: 32px 22px 24px; }
  h1 { font-size: 1.4rem; }
}
