* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: #070a1c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #eef1f8;
  overflow: hidden;
}

#reader-frame {
  position: fixed; inset: 0; width: 100%; height: 100%;
  border: 0; display: none; background: #070a1c;
}

#gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(1200px 800px at 50% -10%, rgba(40, 90, 220, 0.25), transparent 60%),
    #070a1c;
  overflow-y: auto;
}

.gate-card {
  width: 100%; max-width: 380px;
  text-align: center;
}

.gate-card img.cover {
  width: 160px; border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.55);
  margin-bottom: 22px;
}

.gate-card h1 {
  font-size: 1.4rem; margin: 0 0 6px;
  letter-spacing: 0.5px;
}

.gate-card p.tagline {
  color: #a9b3cc; font-size: 0.92rem; margin: 0 0 28px;
}

.code-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-align: center;
  text-transform: uppercase;
  border-radius: 10px;
  border: 1px solid #2a3358;
  background: #0e1330;
  color: #fff;
  outline: none;
  margin-bottom: 14px;
}
.code-input:focus { border-color: #3b6cff; }

.activate-btn {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #2b5cff, #6ea1ff);
  transition: opacity .15s ease;
}
.activate-btn:disabled { opacity: 0.6; cursor: default; }

.gate-msg {
  min-height: 20px;
  margin-top: 14px;
  font-size: 0.88rem;
}
.gate-msg.error { color: #ff8686; }
.gate-msg.info { color: #8fb3ff; }

.gate-footer {
  margin-top: 26px;
  font-size: 0.78rem;
  color: #6b7599;
  line-height: 1.5;
}
.gate-footer a { color: #8fb3ff; }

.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
