:root {
  --bg-base: #101010;
  --bg-accent: #191919;
  --bg-darker: #0c0c0c;
  --text-main: #f0f0f0;
  --text-dim: #888888;
  --accent: #ffffff;
  --border: rgba(255, 255, 255, 0.06);
  --good: #4ade80;
  --bad: #f87171;
  --sys-hover: rgba(255, 255, 255, 0.05);
  font-family: 'Poppins', sans-serif;
}

* { box-sizing: border-box; }

html {
  background: var(--bg-base);
}

body {
  margin: 0;
  min-height: 100vh;
  width: 100vw;
  background: var(--bg-base);
  color: var(--text-main);
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
}

::-webkit-scrollbar {
  width: 0;
  display: none;
}

/* faint vignette layer behind everything */
#bg-img-layer {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 50% 30%, #1a1a1a 0%, var(--bg-base) 70%);
  opacity: 0.9;
  z-index: 0;
  pointer-events: none;
}

/* the rounded "window" shell */
.app-wrapper {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 5vh auto;
  min-height: 88vh;
  background-color: rgba(16, 16, 16, 0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.5), 0 20px 60px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
}

/* dotted grid backdrop inside the shell */
.app-wrapper::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  transform: rotate(15deg);
  pointer-events: none;
  z-index: 0;
}

/* header */
.hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  z-index: 10;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--bad);
  font-size: 0.95rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.logo-text {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.2px;
}

.ctrls {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* center stage */
.view-stack {
  position: relative;
  flex: 1;
  padding: 20px 40px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 10;
}

.view {
  display: none;
  width: 100%;
  max-width: 480px;
  animation: fadeUp 0.3s ease forwards;
}

.view.active { display: block; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.lead {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0 0 24px 0;
  line-height: 1.6;
}

.lead strong { color: var(--text-main); font-weight: 600; }

/* form */
form {
  display: flex;
  gap: 8px;
  margin: 0 0 12px 0;
}

input[type="email"] {
  flex: 1;
  min-width: 0;
  background: var(--bg-darker);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  padding: 11px 14px;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input[type="email"]:focus {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

input[type="email"]::placeholder { color: #555; }

button {
  background: var(--bg-accent);
  border: 1px solid var(--border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 11px 26px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

button:hover {
  background: #222;
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
}

button:active { transform: translateY(1px); }

button.btn-primary {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

button.btn-primary:hover { background: rgba(255, 255, 255, 0.15); }

button:disabled { opacity: 0.55; cursor: progress; transform: none; }

.privacy {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin: 0 0 20px 0;
}

/* result card */
.result {
  display: none;
  text-align: left;
  background: var(--bg-accent);
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-top: 4px;
  animation: fadeUp 0.25s ease forwards;
}

.result.show { display: block; }

.result h2 { margin: 0 0 6px 0; font-size: 1.05rem; font-weight: 600; }
.result p { margin: 0; font-size: 0.82rem; color: var(--text-dim); line-height: 1.55; }

.result.pending {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}

.result.good { border-color: rgba(74, 222, 128, 0.35); background: rgba(74, 222, 128, 0.06); }
.result.good h2 { color: var(--good); }

.result.bad { border-color: rgba(248, 113, 113, 0.35); background: rgba(248, 113, 113, 0.06); }
.result.bad h2 { color: var(--bad); }

.result code {
  font-family: 'Consolas', 'Courier New', monospace;
  background: var(--bg-darker);
  padding: 0.1em 0.4em;
  border-radius: 5px;
  font-size: 0.9em;
  color: var(--text-main);
  word-break: break-all;
}

/* footer */
.footer {
  padding: 14px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-dim);
  z-index: 10;
}

.badge {
  background: var(--bg-accent);
  padding: 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-weight: 500;
  cursor: default;
  transition: all 0.2s ease;
}

.status-badge { opacity: 0.6; font-style: italic; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 560px) {
  .app-wrapper { margin: 0; min-height: 100vh; border-radius: 0; border: none; }
  .view-stack { padding: 16px 20px 32px; }
  form { flex-direction: column; }
  button { width: 100%; }
  h1 { font-size: 1.3rem; }
}
