:root {
  --background: oklch(0.14 0.03 280);
  --foreground: oklch(0.98 0.005 280);
  --card: oklch(0.19 0.035 280);
  --muted: oklch(0.25 0.03 280);
  --muted-foreground: oklch(0.72 0.02 280);
  --primary: oklch(0.72 0.22 350);
  --primary-foreground: oklch(0.14 0.03 280);
  --secondary: oklch(0.78 0.18 195);
  --secondary-foreground: oklch(0.14 0.03 280);
  --accent: oklch(0.78 0.18 195);
  --border: oklch(0.3 0.04 280);
  --input: oklch(0.25 0.03 280);
  --ring: oklch(0.72 0.22 350);
  --destructive: oklch(0.577 0.245 27.325);
  --destructive-foreground: oklch(0.984 0.003 247.858);
  --radius: 0.75rem;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--foreground);
  font-family:
    ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.bg-glow {
  position: absolute;
  inset: 0 0 auto 0;
  height: 480px;
  background: linear-gradient(
    135deg,
    color-mix(in oklch, var(--primary) 30%, transparent),
    transparent 50%,
    color-mix(in oklch, var(--accent) 20%, transparent)
  );
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: 5rem 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pill {
  border: 1px solid color-mix(in oklch, var(--border) 60%, transparent);
  background: color-mix(in oklch, var(--card) 60%, transparent);
  color: var(--muted-foreground);
  padding: 0.25rem 1rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  backdrop-filter: blur(10px);
}

.hero-title {
  margin: 1.5rem 0 0;
  text-align: center;
  font-size: clamp(2.5rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.gradient-text {
  display: block;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 1.25rem 0 0;
  max-width: 32rem;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 1.05rem;
  line-height: 1.5;
}

.form {
  margin-top: 2.5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--card) 70%, transparent);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px color-mix(in oklch, var(--primary) 15%, transparent);
  backdrop-filter: blur(10px);
}

@media (min-width: 640px) {
  .form {
    flex-direction: row;
  }
}

.input {
  flex: 1;
  width: 100%;
  background: var(--input);
  color: var(--foreground);
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
}

.input::placeholder {
  color: var(--muted-foreground);
}

.input:focus {
  outline: 2px solid var(--ring);
  outline-offset: 1px;
}

.btn {
  cursor: pointer;
  border: none;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-foreground);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  background: var(--secondary);
  color: var(--secondary-foreground);
}

.btn-secondary:hover {
  opacity: 0.9;
}

.btn-ghost {
  background: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  background: var(--muted);
}

.error {
  margin-top: 1.25rem;
  border: 1px solid color-mix(in oklch, var(--destructive) 40%, transparent);
  background: color-mix(in oklch, var(--destructive) 12%, transparent);
  color: var(--destructive-foreground);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.result {
  margin-top: 2.5rem;
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.result-inner {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.25rem;
}

@media (min-width: 640px) {
  .result-inner {
    flex-direction: row;
  }
}

.result-cover {
  width: 100%;
  height: 14rem;
  object-fit: cover;
  border-radius: 0.75rem;
}

@media (min-width: 640px) {
  .result-cover {
    width: 10rem;
    height: 14rem;
  }
}

.result-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.result-author {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-foreground);
}

.result-title {
  margin: 0.25rem 0 0;
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.4;
}

.result-actions {
  margin-top: auto;
  padding-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.steps {
  margin-top: 5rem;
  width: 100%;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .steps {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  border: 1px solid var(--border);
  background: color-mix(in oklch, var(--card) 60%, transparent);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.step h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
}

.step p {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: var(--muted-foreground);
}

.footer {
  margin-top: 4rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}