:root {
  --bg: #0f1720;
  --bg-soft: #172330;
  --surface: rgba(18, 28, 39, 0.82);
  --surface-strong: rgba(16, 24, 34, 0.92);
  --surface-faint: rgba(255, 255, 255, 0.05);
  --border: rgba(147, 184, 196, 0.24);
  --text: #eef4f7;
  --muted: #adc1c9;
  --muted-strong: #d9e4e8;
  --accent: #7ae1c3;
  --accent-strong: #34c49a;
  --accent-shadow: rgba(52, 196, 154, 0.28);
  --warn: #ffbc6b;
  --danger: #ff8071;
  --ink: #071117;
  --code-bg: rgba(3, 8, 12, 0.42);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --mono: "Consolas", "SFMono-Regular", "Courier New", monospace;
  --sans: "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  --serif: "Georgia", "Times New Roman", serif;
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(122, 225, 195, 0.14), transparent 34%),
    radial-gradient(circle at 84% 12%, rgba(255, 188, 107, 0.13), transparent 26%),
    linear-gradient(180deg, #13202c 0%, #0d141c 62%, #091018 100%);
}

button,
textarea {
  font: inherit;
}

.scene {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(36px);
  opacity: 0.75;
  animation: drift 16s ease-in-out infinite;
}

.glow-a {
  top: -12rem;
  left: -9rem;
  width: 26rem;
  height: 26rem;
  background: rgba(122, 225, 195, 0.17);
}

.glow-b {
  right: -12rem;
  bottom: -11rem;
  width: 32rem;
  height: 32rem;
  background: rgba(255, 188, 107, 0.14);
  animation-delay: -7s;
}

.grid-wash {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75), transparent 92%);
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.panel {
  background: linear-gradient(180deg, rgba(27, 39, 52, 0.78), rgba(14, 22, 31, 0.92));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 2.2rem;
}

.hero-copy {
  max-width: 760px;
}

.hero-kicker,
.panel-kicker,
.tip-title,
.field-label,
.field-name,
.meta-chip,
.summary-label,
.summary-value,
.status-pill,
.live-label,
.account-badge,
.field-tag,
.empty-kicker {
  text-transform: uppercase;
  letter-spacing: 0.16em;
}

.hero-kicker,
.panel-kicker,
.tip-title,
.field-label,
.summary-label,
.status-pill,
.field-tag,
.empty-kicker {
  font-size: 0.72rem;
  color: var(--muted);
}

.hero h1,
.panel h2,
.security-copy h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.hero h1 {
  margin-top: 0.45rem;
  font-size: clamp(2.2rem, 4vw, 4.2rem);
  line-height: 0.98;
}

.hero p,
.security-copy p,
.tip-card p,
.empty-state p,
.summary-note,
.field-copy,
.field-value,
.error-banner {
  color: var(--muted-strong);
}

.hero p {
  max-width: 62ch;
  margin: 1rem 0 0;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.action-btn,
.mode-chip,
.copy-btn,
.otp-copy-btn {
  border: 0;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, color 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.action-btn {
  min-width: 9.25rem;
  padding: 0.9rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
}

.action-btn:hover,
.mode-chip:hover,
.copy-btn:hover,
.otp-copy-btn:hover {
  transform: translateY(-1px);
}

.action-btn-primary {
  color: var(--ink);
  background: linear-gradient(135deg, #97f0d4, #58d4ad);
  box-shadow: 0 18px 40px rgba(88, 212, 173, 0.22);
}

.action-btn-secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.98fr) minmax(340px, 1.18fr);
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.layout > .panel {
  padding: 1.45rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.panel-head h2,
.security-copy h2 {
  font-size: clamp(1.45rem, 2vw, 2rem);
  margin-top: 0.25rem;
}

.status-pill,
.meta-chip,
.field-tag,
.live-cluster {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-switch {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.mode-chip {
  padding: 0.72rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border: 1px solid transparent;
}

.mode-chip.active {
  background: linear-gradient(135deg, rgba(122, 225, 195, 0.22), rgba(52, 196, 154, 0.14));
  border-color: rgba(122, 225, 195, 0.24);
  box-shadow: inset 0 0 0 1px rgba(122, 225, 195, 0.14);
}

.credentials-input {
  width: 100%;
  min-height: 19rem;
  resize: vertical;
  margin-top: 0.75rem;
  padding: 1.1rem 1rem;
  border-radius: calc(var(--radius-md) + 4px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(4, 8, 12, 0.62), rgba(11, 19, 26, 0.9));
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.96rem;
  line-height: 1.62;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.credentials-input:focus {
  outline: 2px solid rgba(122, 225, 195, 0.28);
  outline-offset: 2px;
}

.error-banner {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 128, 113, 0.12);
  border: 1px solid rgba(255, 128, 113, 0.22);
  line-height: 1.5;
}

.tip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.tip-card {
  min-height: 100%;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--surface-faint);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.tip-card p {
  margin: 0.55rem 0 0;
  line-height: 1.55;
  font-size: 0.94rem;
}

.live-cluster {
  color: var(--text);
}

.live-dot {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(122, 225, 195, 0.5);
  animation: pulse 2.4s ease-out infinite;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.summary-card {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.summary-card-wide {
  display: flex;
  align-items: center;
}

.summary-value {
  display: block;
  font-size: 1.4rem;
  color: var(--text);
  letter-spacing: 0.04em;
}

.summary-card .summary-label {
  letter-spacing: 0.08em;
}

.results {
  min-height: 24rem;
}

.results-grid {
  display: grid;
  gap: 0.95rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 24rem;
  padding: 1.5rem;
  text-align: center;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px dashed rgba(255, 255, 255, 0.09);
}

.empty-state h3 {
  margin: 0.55rem 0 0.45rem;
  font-size: 1.4rem;
  font-family: var(--serif);
}

.empty-state p {
  margin: 0;
  line-height: 1.65;
  max-width: 38ch;
}

.account-card {
  padding: 1rem;
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(122, 225, 195, 0.12), transparent 28%),
    linear-gradient(180deg, rgba(26, 38, 50, 0.84), rgba(10, 17, 24, 0.94));
  border: 1px solid rgba(147, 184, 196, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.account-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.account-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.15rem;
  height: 2.15rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(122, 225, 195, 0.16);
  color: var(--accent);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
}

.account-title h3 {
  margin: 0 0 0.28rem;
  font-size: 1.1rem;
}

.account-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.meta-row {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.meta-chip,
.field-tag {
  font-size: 0.7rem;
  color: var(--muted-strong);
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.field-card {
  padding: 0.8rem 0.85rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.field-name {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--muted);
  font-size: 0.67rem;
}

.field-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.field-value {
  font-family: var(--mono);
  word-break: break-word;
  font-size: 0.9rem;
  line-height: 1.5;
}

.copy-btn {
  flex: 0 0 auto;
  padding: 0.45rem 0.68rem;
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.copy-btn.copied,
.otp-copy-btn.copied {
  background: rgba(122, 225, 195, 0.18);
  color: var(--accent);
}

.otp-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(5, 10, 14, 0.72), rgba(16, 27, 38, 0.82));
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.otp-main {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.otp-code {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: 0.16em;
}

.otp-support {
  color: var(--muted);
  font-size: 0.88rem;
}

.timer-shell {
  position: relative;
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
}

.timer-shell svg {
  width: 52px;
  height: 52px;
  transform: rotate(-90deg);
}

.timer-bg,
.timer-progress {
  fill: none;
  stroke-width: 4;
}

.timer-bg {
  stroke: rgba(255, 255, 255, 0.08);
}

.timer-progress {
  stroke: var(--accent);
  stroke-linecap: round;
  filter: drop-shadow(0 0 6px rgba(122, 225, 195, 0.34));
}

.timer-progress.warning {
  stroke: var(--warn);
  filter: drop-shadow(0 0 6px rgba(255, 188, 107, 0.24));
}

.timer-progress.danger {
  stroke: var(--danger);
  filter: drop-shadow(0 0 6px rgba(255, 128, 113, 0.24));
}

.timer-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.82rem;
}

.otp-copy-btn {
  min-width: 7.1rem;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(122, 225, 195, 0.18), rgba(52, 196, 154, 0.12));
  color: var(--text);
  border: 1px solid rgba(122, 225, 195, 0.18);
}

.otp-copy-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.extra-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.field-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.72rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted-strong);
}

.security-band {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 1.5rem;
  padding: 1.5rem;
  margin-top: 1.25rem;
}

.security-copy p {
  line-height: 1.7;
  margin: 0.85rem 0 0;
}

.security-steps {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted-strong);
  line-height: 1.7;
}

.security-steps li + li {
  margin-top: 0.65rem;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 4;
  max-width: min(26rem, calc(100vw - 2rem));
  padding: 0.92rem 1rem;
  border-radius: 18px;
  background: rgba(8, 14, 20, 0.95);
  border: 1px solid rgba(122, 225, 195, 0.18);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
  color: var(--text);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.rise-in {
  opacity: 0;
  transform: translateY(18px);
  animation: rise 700ms ease forwards;
}

.delay-1 {
  animation-delay: 80ms;
}

.delay-2 {
  animation-delay: 160ms;
}

.delay-3 {
  animation-delay: 240ms;
}

@keyframes drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(16px, 20px, 0) scale(1.06);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(122, 225, 195, 0.5);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(122, 225, 195, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(122, 225, 195, 0);
  }
}

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

@media (max-width: 1080px) {
  .layout,
  .security-band {
    grid-template-columns: 1fr;
  }

  .tip-grid,
  .summary-strip,
  .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .hero,
  .layout > .panel,
  .security-band {
    padding: 1.1rem;
  }

  .hero {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions,
  .mode-switch {
    width: 100%;
  }

  .action-btn,
  .mode-chip {
    flex: 1 1 100%;
  }

  .tip-grid,
  .summary-strip,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .panel-head,
  .account-head,
  .otp-row,
  .otp-main {
    align-items: stretch;
    flex-direction: column;
  }

  .otp-row {
    gap: 1rem;
  }

  .otp-copy-btn {
    width: 100%;
  }

  .timer-shell {
    width: 48px;
    height: 48px;
  }

  .timer-shell svg {
    width: 48px;
    height: 48px;
  }
}
