:root {
  --bg-deep: #011a22;
  --bg-mid: #06111a;
  --bg-card: #012a35;
  --bg-input: #023849;
  --accent-cyan: #08dcfd;
  --accent-teal: #46f9ea;
  --accent-teal-soft: #06f1ec;
  --accent-blue: #037ccd;
  --text-primary: #ffffff;
  --text-muted: #b0b0bb;
  --text-subtle: #808099;
  --border: #5e6b73;
  --border-light: #075169;
  --success-bg: rgba(70, 249, 234, 0.08);
  --success-border: rgba(70, 249, 234, 0.35);
  --error: #ff4d6d;
  --glow: rgba(8, 220, 253, 0.25);
}

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

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  min-height: 100vh;
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(8, 220, 253, 0.12), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 100%, rgba(70, 249, 234, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(3, 124, 205, 0.06), transparent 60%),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-mid) 100%);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(8, 220, 253, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 220, 253, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 40%, black 20%, transparent 75%);
  pointer-events: none;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.25rem 3rem;
}

.header {
  text-align: center;
  margin-bottom: 2.5rem;
  max-width: 560px;
}

.title-section {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.form-logo {
  display: block;
  width: auto;
  height: clamp(32px, 8vw, 44px);
  max-width: 100%;
  margin: 0 auto 1.75rem;
  object-fit: contain;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(8, 220, 253, 0.35);
  background: rgba(8, 220, 253, 0.08);
  color: var(--accent-cyan);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.header h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-teal) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 480px;
  margin: 0 auto;
}

.form-card {
  width: 100%;
  max-width: 480px;
  background: rgba(1, 42, 53, 0.75);
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 2rem;
  backdrop-filter: blur(12px);
  box-shadow:
    0 0 0 1px rgba(8, 220, 253, 0.05),
    0 24px 48px rgba(0, 0, 0, 0.35),
    0 0 80px var(--glow);
}

.form-card.hidden {
  display: none;
}

.field {
  margin-bottom: 1.25rem;
}

.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.45rem;
}

.optional {
  color: var(--text-subtle);
  font-weight: 400;
  font-size: 0.8rem;
}

.field input {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text-primary);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input::placeholder {
  color: var(--text-subtle);
}

.field input:hover {
  border-color: rgba(8, 220, 253, 0.4);
}

.field input:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(8, 220, 253, 0.15);
}

.field input.error {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(255, 77, 109, 0.12);
}

.field-error {
  display: none;
  margin-top: 0.35rem;
  font-size: 0.8rem;
  color: var(--error);
}

.field-error.visible {
  display: block;
}

.form-error {
  margin-top: 0.25rem;
  text-align: center;
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--bg-deep);
  background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-teal) 100%);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.2s;
  letter-spacing: 0.02em;
}

.submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(8, 220, 253, 0.35);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.success-card {
  display: none;
  width: 100%;
  max-width: 480px;
  text-align: center;
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 20px;
  padding: 2.5rem 2rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.25);
}

.success-card.visible {
  display: block;
  animation: fadeUp 0.45s ease-out;
}

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

.success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  background: rgba(70, 249, 234, 0.15);
  border: 1px solid rgba(70, 249, 234, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--accent-teal);
}

.success-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.success-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.success-card .highlight {
  color: var(--accent-teal);
  font-weight: 600;
}

.footer {
  margin-top: 2.5rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-subtle);
}

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

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

@media (max-width: 480px) {
  .form-card,
  .success-card {
    padding: 1.5rem;
  }

  .header {
    margin-bottom: 2rem;
  }
}
