:root {
  color-scheme: dark;
  --bg: #07141c;
  --bg-deep: #041017;
  --surface: rgba(9, 27, 37, 0.82);
  --surface-strong: rgba(15, 39, 52, 0.92);
  --surface-soft: rgba(255, 255, 255, 0.05);
  --surface-glow: rgba(40, 199, 163, 0.14);
  --line: rgba(159, 196, 207, 0.16);
  --line-strong: rgba(159, 196, 207, 0.3);
  --text: #edf7f5;
  --muted: #98b1ba;
  --accent: #28c7a3;
  --accent-soft: #7ef0ce;
  --accent-warm: #f2aa47;
  --accent-cool: #78d4f4;
  --danger: #ff735c;
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --max-width: 1220px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(120, 212, 244, 0.16), transparent 32%),
    radial-gradient(circle at 90% 10%, rgba(242, 170, 71, 0.16), transparent 28%),
    linear-gradient(180deg, #091923 0%, var(--bg) 42%, var(--bg-deep) 100%);
  color: var(--text);
  overflow-x: hidden;
}

body::selection {
  background: rgba(126, 240, 206, 0.28);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

code,
.mono {
  font-family: "IBM Plex Mono", "Cascadia Code", Consolas, monospace;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at center, black, transparent 90%);
}

.page-orb {
  position: fixed;
  width: 34rem;
  height: 34rem;
  border-radius: 50%;
  filter: blur(55px);
  opacity: 0.28;
  pointer-events: none;
  animation: drift 14s ease-in-out infinite alternate;
}

.orb-one {
  top: -8rem;
  left: -10rem;
  background: rgba(120, 212, 244, 0.32);
}

.orb-two {
  right: -8rem;
  bottom: -10rem;
  background: rgba(242, 170, 71, 0.22);
  animation-duration: 18s;
}

.site-shell {
  position: relative;
  z-index: 1;
  width: min(var(--max-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero-card,
.tool-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.035), transparent 32%),
    linear-gradient(180deg, rgba(126, 240, 206, 0.04), transparent 65%),
    var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.9fr);
  gap: 24px;
  padding: 34px;
  animation: reveal-up 800ms ease both;
}

.hero-card::after,
.tool-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.04);
  pointer-events: none;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow,
.tool-kicker {
  margin: 0;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.hero-card h1 {
  margin: 0;
  max-width: 12ch;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(3rem, 5vw, 5.15rem);
  line-height: 0.94;
  letter-spacing: -0.04em;
}

.hero-card h1 span {
  display: block;
  color: #f8cf92;
}

.hero-text,
.tool-copy,
.subtle {
  margin: 0;
  color: var(--muted);
  line-height: 1.68;
}

.hero-actions,
.form-actions,
.action-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button-primary,
.button-secondary,
.copy-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    opacity 180ms ease,
    box-shadow 180ms ease;
}

.button-primary {
  color: #072118;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-soft), var(--accent));
  box-shadow: 0 14px 32px rgba(40, 199, 163, 0.28);
}

.button-secondary,
.copy-inline {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button-primary:hover,
.button-secondary:hover,
.copy-inline:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.button-primary:disabled,
.button-secondary:disabled,
.copy-inline:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.hero-tool-button.is-selected {
  border-color: rgba(126, 240, 206, 0.34);
  box-shadow: 0 18px 38px rgba(40, 199, 163, 0.22);
}

.hero-status {
  display: grid;
  gap: 14px;
}

.status-tile {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 112px;
  padding: 18px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at top right, rgba(40, 199, 163, 0.12), transparent 42%),
    rgba(255, 255, 255, 0.035);
}

.status-tile strong {
  font-size: 1.12rem;
  line-height: 1.35;
  word-break: break-word;
}

.status-label {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-cloud {
  min-height: unset;
}

.provider-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.provider-pill,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.92rem;
}

.chip {
  min-height: 30px;
  color: var(--muted);
}

.chip-accent {
  color: var(--accent-soft);
  border-color: rgba(126, 240, 206, 0.24);
  background: rgba(40, 199, 163, 0.08);
}

.chip-warm {
  color: #ffd89f;
  border-color: rgba(242, 170, 71, 0.24);
  background: rgba(242, 170, 71, 0.09);
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
}

.tool-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 28px;
  min-height: 720px;
  animation: reveal-up 920ms ease both;
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    opacity 220ms ease,
    box-shadow 220ms ease;
}

.tool-card.is-active {
  border-color: rgba(126, 240, 206, 0.28);
  box-shadow:
    0 26px 80px rgba(0, 0, 0, 0.34),
    0 0 0 1px rgba(126, 240, 206, 0.12);
}

.tool-card.is-dimmed {
  opacity: 0.78;
}

.tool-card[hidden] {
  display: none !important;
}

.tool-card:nth-child(2) {
  animation-delay: 100ms;
}

.tool-head {
  display: grid;
  gap: 10px;
}

.tool-head h2 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3vw, 2.85rem);
  line-height: 1;
  letter-spacing: -0.03em;
}

.tool-form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 9px;
}

.field span {
  font-size: 0.95rem;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(3, 15, 22, 0.6);
  color: var(--text);
  padding: 15px 16px;
  outline: none;
  resize: vertical;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(152, 177, 186, 0.62);
}

.field input:focus,
.field textarea:focus {
  border-color: rgba(126, 240, 206, 0.46);
  background: rgba(4, 18, 27, 0.88);
  box-shadow: 0 0 0 4px rgba(40, 199, 163, 0.12);
}

.feedback {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.95rem;
}

.feedback.is-error {
  color: #ffb1a2;
}

.feedback.is-success {
  color: var(--accent-soft);
}

.result-shell {
  display: grid;
  align-content: start;
  gap: 18px;
  flex: 1;
  min-height: 320px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(126, 240, 206, 0.03), transparent 20%),
    rgba(3, 14, 21, 0.58);
}

.result-shell.empty-state {
  place-items: center;
  text-align: center;
  color: var(--muted);
}

.result-stack,
.result-grid {
  display: grid;
  gap: 16px;
}

.result-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-card,
.code-banner,
.mail-link,
.otp-display,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.028), transparent 100%),
    rgba(255, 255, 255, 0.03);
}

.detail-card,
.notice,
.mail-link,
.otp-display {
  padding: 16px;
}

.detail-card h3,
.notice h3 {
  margin: 0 0 10px;
  font-size: 1rem;
}

.detail-title {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-value {
  margin: 0;
  line-height: 1.55;
  word-break: break-word;
}

.code-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  background:
    radial-gradient(circle at right top, rgba(242, 170, 71, 0.14), transparent 40%),
    rgba(255, 255, 255, 0.035);
}

.code-banner strong {
  display: block;
  font-size: 1.35rem;
  letter-spacing: 0.16em;
}

.code-surface {
  display: grid;
  gap: 10px;
}

.code-value-button,
.otp-code-button {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 100%),
    rgba(255, 255, 255, 0.03);
  color: #fff3d7;
  cursor: pointer;
  text-align: left;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease,
    box-shadow 180ms ease;
  user-select: all;
}

.code-value-button:hover,
.otp-code-button:hover {
  transform: translateY(-1px);
  border-color: rgba(242, 170, 71, 0.28);
  box-shadow: 0 12px 28px rgba(242, 170, 71, 0.12);
}

.code-value-button.is-copied,
.otp-code-button.is-copied {
  border-color: rgba(126, 240, 206, 0.34);
  box-shadow: 0 0 0 4px rgba(40, 199, 163, 0.12);
}

.code-value-button {
  padding: 14px 16px;
  font-size: 1.55rem;
  letter-spacing: 0.16em;
}

.copy-hint {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.mail-link {
  display: grid;
  gap: 8px;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.mail-link:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 212, 244, 0.36);
  background: rgba(120, 212, 244, 0.08);
}

.mail-link span {
  color: var(--muted);
  font-size: 0.92rem;
}

.mail-link strong {
  font-size: 1rem;
  line-height: 1.45;
}

.mail-link em {
  font-style: normal;
  color: var(--accent-cool);
  font-size: 0.92rem;
  word-break: break-all;
}

.message-block {
  white-space: pre-wrap;
  margin: 0;
  max-height: 320px;
  overflow: auto;
  line-height: 1.65;
  color: #dce8e9;
}

.otp-shell {
  align-content: start;
}

.otp-display {
  display: grid;
  gap: 16px;
  padding: 22px;
}

.otp-code {
  margin: 0;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff3d7;
  text-shadow: 0 0 18px rgba(242, 170, 71, 0.2);
}

.otp-code-button {
  padding: 18px 0;
  font-size: clamp(2.8rem, 8vw, 4.6rem);
  line-height: 1;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: left;
  text-shadow: 0 0 18px rgba(242, 170, 71, 0.2);
  background:
    radial-gradient(circle at top right, rgba(242, 170, 71, 0.14), transparent 42%),
    rgba(255, 255, 255, 0.03);
  border: none;
  box-shadow: none;
}

.otp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.otp-progress {
  display: grid;
  gap: 10px;
}

.otp-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.otp-bar {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #ffd08d, var(--accent-warm), #ff7f5f);
  box-shadow: 0 0 18px rgba(242, 170, 71, 0.24);
  transition: width 900ms linear;
}

.otp-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
}

.notice {
  display: grid;
  gap: 12px;
}

.loading {
  opacity: 0.8;
}

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

@keyframes drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(18px, 22px, 0) scale(1.07);
  }
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1080px) {
  .hero-card,
  .tool-grid {
    grid-template-columns: 1fr;
  }

  .tool-card {
    min-height: unset;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--max-width));
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .hero-card,
  .tool-card {
    padding: 22px;
    border-radius: 24px;
  }

  .hero-card h1 {
    max-width: none;
  }

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

  .otp-code {
    font-size: clamp(2.2rem, 12vw, 3.2rem);
    letter-spacing: 0.16em;
  }

  .button-primary,
  .button-secondary {
    width: 100%;
  }

  .form-actions {
    display: grid;
  }
}
