:root {
  --bg: #06060a;
  --bg-elev: #10101a;
  --panel: rgba(18, 18, 28, 0.82);
  --panel-2: rgba(25, 23, 39, 0.94);
  --border: rgba(178, 130, 255, 0.18);
  --border-strong: rgba(178, 130, 255, 0.38);
  --text: #f5f7ff;
  --text-soft: #c2c6dc;
  --text-dim: #8e93ad;
  --primary: #8b5cf6;
  --primary-2: #a78bfa;
  --primary-3: #6d28d9;
  --success: #2dd4bf;
  --danger: #fb7185;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.34);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(139, 92, 246, 0.20), transparent 30%),
    radial-gradient(circle at bottom right, rgba(167, 139, 250, 0.15), transparent 32%),
    linear-gradient(180deg, #050509 0%, #090911 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.65), transparent 90%);
}

.page-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
}

.brand-text {
  font-size: 1rem;
}

.topbar-badge {
  border: 1px solid var(--border);
  color: var(--text-soft);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.875rem;
}

.hero-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  align-items: stretch;
}

.hero-copy,
.auth-panel,
.response-card {
  backdrop-filter: blur(16px);
}

.hero-copy {
  padding: 28px 10px 10px 2px;
}

.eyebrow,
.panel-kicker,
.response-kicker {
  color: var(--primary-2);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  margin: 0 0 14px;
}

.hero-copy h1 {
  margin: 0;
  max-width: 11ch;
  font-size: clamp(2.6rem, 6vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.lead {
  max-width: 58ch;
  margin: 22px 0 0;
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 34px;
}

.feature-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  padding: 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow);
}

.feature-card h2 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 0.92rem;
  line-height: 1.65;
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.32), rgba(167, 139, 250, 0.16));
  color: var(--text);
  font-size: 1rem;
}

.panel-wrap {
  position: relative;
}

.panel-glow {
  position: absolute;
  inset: 10% 6% auto auto;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(139,92,246,0.35), rgba(139,92,246,0));
  filter: blur(24px);
  pointer-events: none;
}

.auth-panel,
.response-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.auth-panel {
  padding: 28px;
  min-height: 100%;
}

.panel-text {
  margin: 10px 0 0;
  color: var(--text-soft);
  line-height: 1.7;
}

.summary-form {
  display: grid;
  gap: 18px;
  margin-top: 26px;
}

.field-label {
  font-size: 0.92rem;
  color: var(--text-soft);
  font-weight: 600;
}

.input-wrap {
  position: relative;
}

.text-input,
.text-area {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.035);
  color: var(--text);
  border-radius: 16px;
  padding: 16px 18px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.text-input {
  min-height: 56px;
}

.text-area {
  resize: vertical;
  min-height: 124px;
  font: inherit;
}

.text-input::placeholder,
.text-area::placeholder {
  color: #777d98;
}

.text-input:focus,
.text-area:focus {
  border-color: var(--border-strong);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.14);
  background: rgba(255,255,255,0.055);
}

.google-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--panel-2);
  border: 1px solid rgba(255,255,255,0.06);
}

.google-header {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 0.92rem;
  font-weight: 600;
}

.google-pill {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--danger);
  box-shadow: 0 0 16px rgba(251, 113, 133, 0.45);
  transition: background 180ms ease;
}

.google-button-mount {
  min-height: 42px;
}

.google-custom-btn,
.primary-btn {
  border: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease, background 180ms ease;
}

.google-custom-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 14px 18px;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
}

.google-custom-btn:hover,
.primary-btn:hover {
  transform: translateY(-1px);
}

.google-custom-btn:active,
.primary-btn:active {
  transform: translateY(0);
}

.google-logo {
  display: inline-flex;
  align-items: center;
}

.helper-text {
  margin: 0;
  color: var(--text-soft);
  font-size: 0.88rem;
  line-height: 1.6;
}

.helper-text.muted {
  color: var(--text-dim);
}

.helper-text code {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--text-soft);
}

.primary-btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 16px 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  color: white;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 16px 34px rgba(109, 40, 217, 0.32);
}

.primary-btn[disabled],
.google-custom-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.response-card {
  margin-top: 28px;
  padding: 24px 26px;
}

.response-header h3 {
  margin: 0;
  font-size: 1.4rem;
}

#resultBox {
  margin: 16px 0 0;
  padding: 18px;
  min-height: 160px;
  overflow: auto;
  border-radius: 18px;
  background: #0b0c13;
  border: 1px solid rgba(255,255,255,0.06);
  color: #d7dbf0;
  font-size: 0.92rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.status-success .google-pill {
  background: var(--success);
  box-shadow: 0 0 16px rgba(45, 212, 191, 0.45);
}

.status-success #googleStatus {
  color: #b5fff3;
}

@media (max-width: 1040px) {
  .hero-layout {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    padding-right: 0;
  }

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

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 22px;
  }

  .auth-panel,
  .response-card {
    padding: 20px;
    border-radius: 22px;
  }

  .hero-copy h1 {
    max-width: 13ch;
    font-size: clamp(2.2rem, 12vw, 3.4rem);
  }
}
