:root {
  --bg: #0a0a16;
  --bg-2: #11102a;
  --cyan: #2dd4ef;
  --blue: #4f7df9;
  --purple: #8b5cf6;
  --pink: #c084fc;
  --text: #f4f5fb;
  --text-dim: #a9aac4;
  --card: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.1);
  --safe: #34d399;
  --phish: #fb7185;
  --radius: 22px;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 60vw at 15% 0%, rgba(45, 212, 239, 0.18), transparent 60%),
    radial-gradient(55vw 55vw at 90% 10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(70vw 70vw at 50% 110%, rgba(79, 125, 249, 0.2), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
}

.page {
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 20px 48px;
  display: flex;
  flex-direction: column;
}

/* Header */
.site-header {
  display: flex;
  justify-content: center;
  margin-bottom: 28px;
}

.logo {
  width: 168px;
  max-width: 60%;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(79, 125, 249, 0.35));
}

/* Screens */
.screen {
  display: none;
  animation: fade-in 0.4s ease;
}

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

@keyframes fade-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Card */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 32px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}

.card--intro,
.card--result {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cyan);
  background: rgba(45, 212, 239, 0.12);
  border: 1px solid rgba(45, 212, 239, 0.25);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.title {
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  background: linear-gradient(100deg, var(--cyan), var(--blue) 45%, var(--purple));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 16px;
}

.lead {
  font-size: 1.05rem;
  color: var(--text-dim);
  margin-bottom: 22px;
}

.lead strong {
  color: var(--text);
}

.hints {
  list-style: none;
  text-align: left;
  max-width: 420px;
  margin: 0 auto 28px;
  display: grid;
  gap: 10px;
}

.hints li {
  position: relative;
  padding-left: 30px;
  color: var(--text-dim);
  font-size: 0.96rem;
}

.hints li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--purple));
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

/* Buttons */
.btn {
  font-family: inherit;
  font-weight: 600;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  color: var(--text);
}

.btn:active {
  transform: scale(0.97);
}

.btn--lg {
  font-size: 1.05rem;
  padding: 15px 34px;
}

.btn--primary {
  background: linear-gradient(100deg, var(--cyan), var(--blue) 50%, var(--purple));
  color: #0a0a16;
  font-weight: 700;
  box-shadow: 0 14px 30px -10px rgba(79, 125, 249, 0.6);
}

.btn--primary:hover {
  box-shadow: 0 18px 36px -10px rgba(79, 125, 249, 0.75);
  transform: translateY(-2px);
}

/* Quiz */
.quiz-top {
  margin-bottom: 18px;
}

.progress-meta {
  display: flex;
  justify-content: center;
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), var(--blue), var(--purple));
  transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.card--quiz {
  padding: 20px;
}

.frame {
  border-radius: 16px;
  overflow: hidden;
  background: #f3f4f8;
  margin-bottom: 20px;
}

.frame-zoom {
  display: block;
  width: 100%;
  border: none;
  padding: 0;
  background: #f3f4f8;
  cursor: zoom-in;
  position: relative;
  line-height: 0;
}

.frame-zoom img {
  display: block;
  width: 100%;
  height: clamp(320px, 52vh, 540px);
  object-fit: contain;
  background: #f3f4f8;
}

.zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: rgba(10, 10, 22, 0.62);
  backdrop-filter: blur(4px);
  padding: 7px 12px;
  border-radius: 999px;
  pointer-events: none;
}

.vote {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.btn--vote {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 1.08rem;
  font-weight: 700;
  padding: 18px 16px;
  border: 1.5px solid var(--card-border);
  background: rgba(255, 255, 255, 0.04);
}

.vote-emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.95rem;
  font-weight: 800;
}

.btn--phish .vote-emoji {
  background: rgba(251, 113, 133, 0.18);
  color: var(--phish);
}

.btn--safe .vote-emoji {
  background: rgba(52, 211, 153, 0.18);
  color: var(--safe);
}

.btn--phish:hover {
  border-color: rgba(251, 113, 133, 0.7);
  background: rgba(251, 113, 133, 0.12);
}

.btn--safe:hover {
  border-color: rgba(52, 211, 153, 0.7);
  background: rgba(52, 211, 153, 0.12);
}

/* Result */
.score-ring {
  --pct: 0;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  margin: 8px auto 22px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(closest-side, var(--bg-2) 70%, transparent 71%),
    conic-gradient(var(--cyan), var(--blue), var(--purple) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.08) 0);
  transition: background 0.6s ease;
}

.score-ring-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.score-num {
  font-size: 3.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.score-total {
  font-size: 1rem;
  color: var(--text-dim);
  margin-top: 4px;
}

.result-line {
  font-size: 1.15rem;
  margin-bottom: 8px;
}

.result-line strong {
  color: var(--cyan);
}

.result-note {
  color: var(--text-dim);
  font-size: 0.96rem;
  max-width: 420px;
  margin: 0 auto 26px;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 5, 12, 0.92);
  backdrop-filter: blur(6px);
}

.lightbox.is-open {
  display: flex;
  animation: fade-in 0.2s ease;
}

.lightbox-img {
  max-width: 100%;
  max-height: 92vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* Footer */
footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(0, 0, 0, 0.25);
}

.footer-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 26px 20px;
  text-align: center;
  display: grid;
  gap: 8px;
}

.footer-demo-notice {
  font-size: 0.92rem;
  color: var(--text-dim);
}

.footer-copy {
  font-size: 0.82rem;
  color: #71728c;
}

footer a {
  color: var(--cyan);
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 560px) {
  .page {
    padding: 22px 14px 36px;
  }

  .card {
    padding: 24px 20px;
  }

  .card--quiz {
    padding: 14px;
  }

  .vote {
    grid-template-columns: 1fr;
  }

  .btn--vote {
    padding: 16px;
  }

  .frame-zoom img {
    height: clamp(280px, 46vh, 420px);
  }

  .score-ring {
    width: 156px;
    height: 156px;
  }

  .score-num {
    font-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
