
:root {
  --bg-1: #050420;
  --bg-2: #001033;
  --neon-a: #4b6bff;
  --neon-b: #9b4bff;
  --neon-c: #ff4bb3;
  --glass: rgba(255, 255, 255, 0.06);
  --text: #e6f0ff;
  --muted: #bcd0ff;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 24px 16px;
  font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(
      1000px 600px at 10% 10%,
      rgba(75, 107, 255, 0.08),
      transparent
    ),
    linear-gradient(180deg, var(--bg-1), var(--bg-2));
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  overflow-y: auto;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #9bafff;
  outline-offset: 3px;
}

/* Animated background */

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.particle {
  position: absolute;
  background: linear-gradient(135deg, var(--neon-a), var(--neon-b));
  opacity: 0.09;
  border-radius: 6px;
  filter: blur(6px);
  animation: float 8s infinite ease-in-out;
  will-change: transform;
}

@keyframes float {
  0% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-60px) rotate(180deg);
  }

  100% {
    transform: translateY(0) rotate(360deg);
  }
}

/* Main homepage card */

.center {
  position: relative;
  z-index: 5;
  width: 100%;
  max-width: 560px;
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.035),
    rgba(255, 255, 255, 0.01)
  );
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  text-align: center;
  animation: cardEnter 0.65s ease both;
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo and neon glow */

.logo-wrap {
  position: relative;
  display: inline-block;
  isolation: isolate;
}

.logo {
  position: relative;
  z-index: 1;
  width: 92px;
  height: 92px;
  border-radius: 999px;
  margin: 0 auto 18px;
  display: block;
  object-fit: cover;
  box-shadow: 0 8px 30px rgba(75, 107, 255, 0.12);
  border: 6px solid rgba(255, 255, 255, 0.03);
}

.logo-glow {
  position: absolute;
  inset: -8px;
  z-index: 0;
  border-radius: 999px;
  background: conic-gradient(
    from 0deg,
    var(--neon-a),
    var(--neon-b),
    var(--neon-c),
    var(--neon-a)
  );
  filter: blur(12px);
  opacity: 0.6;
  animation: logoPulse 3s ease-in-out infinite alternate;
}

@keyframes logoPulse {
  from {
    opacity: 0.4;
  }

  to {
    opacity: 0.8;
  }
}

/* Heading and introduction */

.center h1 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: 0.2px;
}

p.lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

/* Credential input and verify button */

.search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

input#searchInput,
.modal-input {
  width: 100%;
  max-width: 380px;
  min-width: 0;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

input#searchInput::placeholder {
  color: #9baed0;
}

input#searchInput:focus,
.modal-input:focus {
  border-color: var(--neon-a);
  box-shadow: 0 0 18px rgba(75, 107, 255, 0.2);
}

.verify-btn {
  flex-shrink: 0;
  padding: 14px 18px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(
    110deg,
    var(--neon-a),
    var(--neon-b),
    var(--neon-c)
  );
  box-shadow: 0 6px 22px rgba(75, 107, 255, 0.22);
  transition:
    transform 0.2s ease,
    box-shadow 0.25s ease,
    filter 0.25s ease;
}

.verify-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 9px 28px rgba(155, 75, 255, 0.3);
  filter: brightness(1.08);
}

.verify-btn:active {
  transform: translateY(0);
}

.verify-btn:disabled {
  cursor: not-allowed;
  opacity: 0.65;
  transform: none;
}

/* Help and clear actions */

.small-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.link-btn {
  background: transparent;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  padding: 8px 12px;
  border-radius: 12px;
  color: #cfe3ff;
  font-size: 13px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.link-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(155, 75, 255, 0.6);
}

/* Custom popup modal */

.custom-modal {
  position: fixed;
  inset: 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.custom-modal.active {
  display: flex;
}

.modal-content {
  width: 100%;
  max-width: 380px;
  background: #fff;
  color: #050420;
  padding: 24px;
  border-radius: 16px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  animation: modalEnter 0.2s ease both;
}

@keyframes modalEnter {
  from {
    opacity: 0;
    transform: scale(0.97);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-title {
  font-weight: 700;
  font-size: 18px;
  margin-bottom: 12px;
  display: block;
}

.modal-msg {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 16px;
  color: #444;
}

.modal-input {
  color: #000;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 10px;
}

.modal-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.btn-confirm,
.btn-cancel {
  padding: 10px 20px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: filter 0.2s ease;
}

.btn-confirm {
  background: var(--bg-1);
  color: #fff;
}

.btn-cancel {
  background: #eee;
  color: #333;
}

.btn-confirm:hover,
.btn-cancel:hover {
  filter: brightness(0.94);
}

/* Verification spinner */

.verifying {
  display: none;
  position: fixed;
  inset: 0;
  padding: 16px;
  z-index: 60;
  align-items: center;
  justify-content: center;
  background: rgba(3, 5, 25, 0.55);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.verifying.active {
  display: flex;
}

.spinner {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(255, 255, 255, 0.02),
    transparent
  );
  box-shadow: 0 0 40px rgba(75, 107, 255, 0.12);
  position: relative;
}

.spinner::before {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--neon-a),
    var(--neon-b),
    var(--neon-c),
    var(--neon-a)
  );
  filter: blur(10px);
  opacity: 0.95;
  animation: spin 1.4s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.spinner-inner {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.98),
    rgba(0, 0, 0, 0.02)
  );
  display: flex;
  align-items: center;
  justify-content: center;
}

.spinner-text {
  margin-top: 18px;
  color: #fff;
  font-size: 14px;
  text-align: center;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
}

/* Legacy result modal — retained for existing JavaScript */

.result-card {
  display: none;
  position: fixed;
  inset: 0;
  padding: 16px;
  z-index: 70;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.result-card.active {
  display: flex;
}

.card {
  width: 100%;
  max-width: 360px;
  background: rgba(255, 255, 255, 0.96);
  padding: 22px;
  border-radius: 16px;
  text-align: center;
  color: #042033;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

.check-wrap {
  width: 94px;
  height: 94px;
  border-radius: 999px;
  margin: -60px auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    90deg,
    var(--neon-a),
    var(--neon-b),
    var(--neon-c)
  );
}

.check {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--neon-c);
  font-size: 34px;
}

/* How it works modal */

.how-modal {
  position: fixed;
  inset: 0;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  overflow-y: auto;
}

.how-modal.active {
  display: flex;
}

.how-card {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  padding: 22px;
  border-radius: 14px;
  color: #042033;
}

.how-close {
  float: right;
  background: transparent;
  border: none;
  color: #042033;
  font-size: 24px;
  cursor: pointer;
}

.how-logo {
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: block;
  margin: 10px auto;
}

.how-text {
  line-height: 1.7;
}

/* Responsive layouts */

@media (max-width: 520px) {
  body {
    align-items: flex-start;
    padding: 20px 12px;
  }

  .center {
    margin: auto 0;
    padding: 26px 18px;
    border-radius: 16px;
  }

  .search-row {
    flex-direction: column;
  }

  .search-row input,
  .verify-btn {
    max-width: none;
    width: 100%;
  }

  .card {
    width: 100%;
    margin: 16px;
  }

  .modal-content {
    width: 100%;
  }
}

/* Respect device accessibility preferences */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
