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

body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: #0a0a0f;
  color: #e4e4e7;
  overflow-x: hidden;
}

/* ── Aurora Background ── */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.aurora::before,
.aurora::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: drift 18s ease-in-out infinite alternate;
}

.aurora::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, #7c3aed 0%, transparent 70%);
  top: -15%;
  left: -10%;
}

.aurora::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #06b6d4 0%, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -8s;
  animation-direction: alternate-reverse;
}

@keyframes drift {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(80px, 40px) scale(1.15); }
  100% { transform: translate(-40px, 80px) scale(0.95); }
}

/* ── Grid Overlay ── */
.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  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: 60px 60px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 30%, transparent 100%);
}

/* ── Top Nav ── */
.top-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
  animation: fadeDown 0.6s cubic-bezier(0.16,1,0.3,1) both;
}

.top-nav a {
  color: #71717a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.top-nav a:hover {
  color: #e4e4e7;
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Generator Page ── */
.generator {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  gap: 2rem;
}

.title-group {
  text-align: center;
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) both;
}

.generator h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  background: linear-gradient(135deg, #e4e4e7 0%, #a1a1aa 50%, #7c3aed 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
}

.tagline {
  margin-top: 0.75rem;
  font-size: 1.05rem;
  color: #71717a;
  letter-spacing: 0.01em;
}

/* ── Glass Card ── */
.glass-card {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 2rem;
  width: 100%;
  max-width: 600px;
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) 0.15s both;
}

/* ── Form ── */
.generator form {
  display: flex;
  gap: 0.5rem;
}

.generator input[type="text"] {
  flex: 1;
  padding: 0.85rem 1.1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  font-size: 0.95rem;
  color: #e4e4e7;
  outline: none;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.generator input[type="text"]::placeholder {
  color: #52525b;
}

.generator input[type="text"]:focus {
  border-color: rgba(124,58,237,0.5);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.15);
}

.generate-btn {
  padding: 0.85rem 1.6rem;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}

.generate-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.generate-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(124,58,237,0.35);
}

.generate-btn:hover::before {
  opacity: 1;
}

.generate-btn:active {
  transform: translateY(0) scale(0.98);
}

/* ── Result Panel ── */
.result {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  margin-top: 1.5rem;
  animation: scaleIn 0.5s cubic-bezier(0.16,1,0.3,1) both;
}

.result-url {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.result-url input {
  flex: 1;
  padding: 0.7rem 0.9rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 0.82rem;
  color: #a1a1aa;
  cursor: pointer;
  transition: border-color 0.2s;
}

.result-url input:hover {
  border-color: rgba(255,255,255,0.15);
}

/* ── Buttons ── */
.btn {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.btn:active { transform: scale(0.96); }

.btn-copy {
  background: rgba(255,255,255,0.08);
  color: #d4d4d8;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-copy:hover {
  background: rgba(255,255,255,0.12);
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.btn-open {
  background: linear-gradient(135deg, #06b6d4, #0891b2);
  color: #fff;
}

.btn-open:hover {
  box-shadow: 0 4px 20px rgba(6,182,212,0.35);
  transform: translateY(-1px);
}

/* ── QR Code Container ── */
.qr-container {
  padding: 1rem;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-container img {
  display: block;
  border-radius: 8px;
}

.file-id {
  font-size: 0.75rem;
  color: #3f3f46;
  font-family: "JetBrains Mono", "Fira Code", monospace;
}

/* ── Error ── */
.gen-error {
  color: #f87171;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* ── Feedback Bar ── */
.feedback {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: fadeUp 0.3s ease both;
}

.feedback-checking {
  background: rgba(124,58,237,0.1);
  border: 1px solid rgba(124,58,237,0.2);
  color: #a78bfa;
}

.feedback-success {
  background: rgba(34,197,94,0.1);
  border: 1px solid rgba(34,197,94,0.2);
  color: #4ade80;
}

.feedback-error {
  background: rgba(248,113,113,0.1);
  border: 1px solid rgba(248,113,113,0.2);
  color: #f87171;
}

.fb-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(124,58,237,0.3);
  border-top-color: #a78bfa;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

.fb-icon {
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

/* ── Preview ── */
.preview-wrapper {
  margin-top: 1rem;
  animation: scaleIn 0.4s cubic-bezier(0.16,1,0.3,1) both;
}

.preview-frame {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  background: #fff;
}

.preview-label {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 0.4rem 0.8rem;
  background: rgba(10,10,15,0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #a1a1aa;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.preview-frame iframe {
  display: block;
  width: 100%;
  height: 260px;
  border: none;
  pointer-events: none;
}

/* ── Status / Loading ── */
.status-container {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  gap: 1.25rem;
  color: #71717a;
}

.status-container.error {
  color: #f87171;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.08);
  border-top-color: #7c3aed;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Keyframes ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

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

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(124,58,237,0.9);
  backdrop-filter: blur(12px);
  color: #fff;
  padding: 0.6rem 1.2rem;
  border-radius: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  animation: toastIn 0.3s ease, toastOut 0.3s ease 1.5s forwards;
  z-index: 100;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

/* ── About Page ── */
.about-page {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
}

.about-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(10,10,15,0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-back {
  color: #71717a;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-back:hover { color: #e4e4e7; }

.nav-brand {
  font-size: 0.85rem;
  font-weight: 700;
  color: #52525b;
  letter-spacing: 0.03em;
}

.about-hero {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeUp 0.8s cubic-bezier(0.16,1,0.3,1) both;
}

.about-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #e4e4e7;
}

.gradient-text {
  background: linear-gradient(135deg, #7c3aed, #06b6d4);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.about-subtitle {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  color: #71717a;
  line-height: 1.7;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.about-section {
  margin-bottom: 3.5rem;
  animation: fadeUp 0.7s cubic-bezier(0.16,1,0.3,1) both;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #d4d4d8;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.about-card { padding: 2rem; }

/* ── How It Works Flow ── */
.how-it-works {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  min-width: 120px;
  transition: border-color 0.3s, transform 0.3s;
}

.flow-step:hover {
  border-color: rgba(124,58,237,0.3);
  transform: translateY(-2px);
}

.flow-icon { font-size: 1.8rem; }

.flow-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #a1a1aa;
}

.flow-arrow {
  font-size: 1.2rem;
  color: #3f3f46;
}

.flow-description {
  color: #71717a;
  font-size: 0.92rem;
  line-height: 1.7;
  text-align: center;
}

.flow-description code {
  background: rgba(124,58,237,0.15);
  color: #a78bfa;
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
}

/* ── Steps Grid ── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.step-card {
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.step-card:hover {
  border-color: rgba(124,58,237,0.25);
  transform: translateY(-2px);
}

.step-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  color: #7c3aed;
  background: rgba(124,58,237,0.12);
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #d4d4d8;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: 0.88rem;
  color: #71717a;
  line-height: 1.6;
}

/* ── Examples Grid ── */
.examples-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.example-card {
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.example-card:hover {
  border-color: rgba(6,182,212,0.25);
  transform: translateY(-2px);
}

.example-icon {
  font-size: 1.5rem;
  display: block;
  margin-bottom: 0.75rem;
}

.example-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #d4d4d8;
  margin-bottom: 0.4rem;
}

.example-card p {
  font-size: 0.88rem;
  color: #71717a;
  line-height: 1.6;
}

/* ── Features Grid ── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.feature {
  padding: 1.5rem;
  transition: border-color 0.3s, transform 0.3s;
}

.feature:hover {
  border-color: rgba(124,58,237,0.2);
  transform: translateY(-2px);
}

.feature h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #d4d4d8;
  margin-bottom: 0.5rem;
}

.feature p {
  font-size: 0.85rem;
  color: #71717a;
  line-height: 1.6;
}

.feature code {
  background: rgba(124,58,237,0.12);
  color: #a78bfa;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

/* ── Footer ── */
.about-footer {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  margin-top: 2rem;
}

.about-footer p {
  font-size: 0.82rem;
  color: #3f3f46;
}

/* ── Responsive ── */
@media (max-width: 540px) {
  .generator form {
    flex-direction: column;
  }

  .result-url {
    flex-direction: column;
  }

  .steps-grid,
  .examples-grid,
  .features-grid {
    grid-template-columns: 1fr;
  }

  .how-it-works {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .about-page {
    padding: 5rem 1.25rem 3rem;
  }
}
