:root {
  --cyan: #44f4ed;
  --violet: #a463ff;
  --magenta: #f23bd4;
  --ink: #f4f7fb;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: #020407;
  color: var(--ink);
  font-family: "Rajdhani", sans-serif;
}

body { min-height: 100vh; overflow: hidden; }

#gate-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
}

.gate-frame {
  position: fixed;
  inset: 18px;
  z-index: 1;
  pointer-events: none;
  border: 1px solid rgba(68, 244, 237, 0.28);
  background:
    linear-gradient(var(--cyan), var(--cyan)) left top / 42px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) left top / 2px 42px no-repeat,
    linear-gradient(var(--magenta), var(--magenta)) right top / 42px 2px no-repeat,
    linear-gradient(var(--magenta), var(--magenta)) right top / 2px 42px no-repeat,
    linear-gradient(var(--violet), var(--violet)) left bottom / 42px 2px no-repeat,
    linear-gradient(var(--violet), var(--violet)) left bottom / 2px 42px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) right bottom / 42px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) right bottom / 2px 42px no-repeat;
}

.gate {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 20px 32px;
  text-align: center;
}

.gate-kicker {
  margin: 0 0 12px;
  color: var(--cyan);
  font-family: "Oxanium", sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.gate-logo {
  width: min(76vw, 600px);
  filter: drop-shadow(0 0 28px rgba(68, 244, 237, 0.45));
  animation: gate-glow 3.6s ease-in-out infinite;
}

.gate-plate {
  position: relative;
  width: min(92vw, 820px);
  margin: 12px 0 0;
  padding: 16px 28px 14px;
  overflow: hidden;
  border: 1px solid rgba(68, 244, 237, 0.7);
  background:
    linear-gradient(180deg, rgba(68, 244, 237, 0.12), transparent 26%),
    repeating-linear-gradient(90deg, rgba(68, 244, 237, 0.1) 0 1px, transparent 1px 18px),
    repeating-linear-gradient(rgba(68, 244, 237, 0.05) 0 1px, transparent 1px 10px),
    #061018;
  box-shadow: inset 0 0 0 1px rgba(164, 99, 255, 0.28), 0 0 32px rgba(68, 244, 237, 0.18);
  clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}

.gate-plate::before,
.gate-plate::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid var(--cyan);
}

.gate-plate::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.gate-plate::after { right: 8px; bottom: 8px; border-top: 0; border-left: 0; }

.gate-rivet {
  position: absolute;
  top: 11px;
  left: 11px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--cyan);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #061018;
}

.gate-rivet-tr { left: auto; right: 11px; }
.gate-rivet-bl { top: auto; bottom: 11px; }
.gate-rivet-br { top: auto; right: 11px; bottom: 11px; left: auto; }

.gate-plate-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #7f93ab;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
}

.gate-plate-meta b:nth-child(2) { color: var(--cyan); }

.gate-plate-meta i {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #36f4a1;
  box-shadow: 0 0 10px #36f4a1;
  animation: gate-blink 1.4s ease-in-out infinite;
}

.gate-plate-rule {
  display: block;
  height: 1px;
  margin: 8px 0;
  background: linear-gradient(90deg, transparent, var(--cyan), #ff3f55, var(--violet), transparent);
}

.gate-plate-line {
  display: block;
  color: #f7fbff;
  font-family: "Oxanium", sans-serif;
  font-size: clamp(1.7rem, 5vw, 3.45rem);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #12343a, 0 0 16px rgba(68, 244, 237, 0.45);
}

.gate-plate-line-hot {
  color: #44f4ed;
  text-shadow: 0 0 12px rgba(68, 244, 237, 0.8), 0 2px 0 #0b3034;
}

.gate-plate-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  color: #7f93ab;
  font-family: "Share Tech Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.gate-plate-ticks {
  flex: 1;
  height: 8px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 8px, transparent 8px 12px, #ff3f55 12px 14px, transparent 14px 22px);
}

.gate-plate-scan {
  position: absolute;
  inset: 0 auto 0 -20%;
  width: 16%;
  background: linear-gradient(90deg, transparent, rgba(68, 244, 237, 0.2), transparent);
  animation: gate-scan 3.2s linear infinite;
  pointer-events: none;
}

.gate-sub {
  margin: 14px 0 0;
  color: #9eb0c2;
  font-size: 1.05rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gate-enter {
  margin-top: 16px;
  padding: 14px 26px;
  color: #00110f;
  background: linear-gradient(100deg, var(--cyan), #4ebdff 68%, var(--violet));
  font-family: "Oxanium", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}

@keyframes gate-glow {
  0%, 100% { filter: drop-shadow(0 0 18px rgba(68, 244, 237, 0.3)); }
  50% { filter: drop-shadow(0 0 32px rgba(68, 244, 237, 0.65)); }
}

@keyframes gate-scan {
  from { transform: translateX(0); }
  to { transform: translateX(700%); }
}

@keyframes gate-blink {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

@media (max-width: 640px) {
  .gate-frame { inset: 10px; }
  .gate-sub { letter-spacing: 0.08em; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  .gate-logo, .gate-plate-scan, .gate-plate-meta i { animation: none; }
}
