/* Pastego — aurora glass theme */

:root {
  --bg: #0b0e1c;
  --aurora-1: rgba(124, 58, 237, 0.26);
  --aurora-2: rgba(34, 211, 238, 0.16);
  --aurora-3: rgba(236, 72, 153, 0.12);
  --surface: rgba(23, 26, 48, 0.62);
  --surface-2: rgba(10, 12, 27, 0.55);
  --ink: #edeff9;
  --muted: #9aa1c0;
  --accent: #a78bfa;
  --accent-strong: #c4b5fd;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-ink: #ffffff;
  --grad: linear-gradient(135deg, #8b5cf6, #38bdf8);
  --amber: #fbbf24;
  --success: #34d399;
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.12);
  --line: rgba(148, 163, 214, 0.16);
  --line-strong: rgba(148, 163, 214, 0.34);
  --shadow: 0 8px 28px rgba(4, 7, 20, 0.45);
  --shadow-lg: 0 20px 60px rgba(4, 7, 20, 0.55);
  --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.35);
  --sel-bg: rgba(139, 92, 246, 0.35);
  --radius: 20px;
  --radius-sm: 13px;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection { background: var(--sel-bg); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--sans);
  color: var(--ink);
  background:
    radial-gradient(46% 38% at 18% -6%, var(--aurora-1), transparent 70%),
    radial-gradient(40% 34% at 88% 8%, var(--aurora-2), transparent 70%),
    radial-gradient(48% 40% at 55% 108%, var(--aurora-3), transparent 70%),
    var(--bg);
  background-attachment: fixed;
}

.theme-toggle {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 10;
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  cursor: pointer;
  font: 600 0.76rem/1 var(--sans);
  letter-spacing: 0.02em;
  transition: border-color 160ms, color 160ms, box-shadow 160ms;
}

.theme-toggle::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.page {
  position: relative;
  z-index: 1;
  width: min(100% - 36px, 920px);
  margin: 0 auto;
  padding: clamp(56px, 10vh, 104px) 0 80px;
  display: grid;
  gap: clamp(30px, 5vw, 48px);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  justify-items: center;
  gap: 20px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  font: 600 11.5px/1.2 var(--sans);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--grad);
  animation: pulse-dot 2.6s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.8); }
}

.title {
  margin: 0;
  max-width: 20ch;
  font-family: var(--display);
  font-size: clamp(2.2rem, 6.4vw, 3.9rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.title em {
  font-style: normal;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 42rem;
  margin: 0;
  color: var(--muted);
  font-size: clamp(0.95rem, 1.4vw, 1.05rem);
  line-height: 1.75;
}

.lede code {
  padding: 2px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-family: var(--mono);
  font-size: 0.85em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tag {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--muted);
  font: 500 12.5px/1 var(--sans);
  cursor: default;
  transition: border-color 160ms, color 160ms, background 160ms, transform 160ms;
}

.tag:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
  color: var(--ink);
  transform: translateY(-1px);
}

.cli-wrap {
  position: relative;
  width: min(580px, 100%);
  margin-top: 6px;
}

.cli {
  margin: 0;
  padding: 18px 96px 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--ink);
  font: 500 13px/1.7 var(--mono);
  text-align: left;
  overflow: auto;
  box-shadow: var(--shadow);
}

.copy-cli {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 62px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 600 11.5px/1.3 var(--sans);
  cursor: pointer;
  transition: border-color 160ms, color 160ms, background 160ms;
}

.copy-cli:hover {
  border-color: var(--line-strong);
  color: var(--ink);
  background: var(--accent-soft);
}

.copy-cli.copied {
  border-color: transparent;
  background: var(--grad);
  color: var(--accent-ink);
}

/* ---------- Composer panel ---------- */

.composer {
  position: relative;
  padding: clamp(24px, 3.6vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow-lg);
}

.composer::before {
  content: "";
  position: absolute;
  inset: -1px -1px auto;
  height: 3px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--grad);
  opacity: 0.9;
}

.composer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.form-kicker {
  display: block;
  margin-bottom: 7px;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font: 700 0.68rem/1 var(--sans);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.composer-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.size-pill {
  flex: 0 0 auto;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font: 600 0.72rem/1 var(--sans);
}

.error {
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(251, 113, 133, 0.4);
  border-radius: var(--radius-sm);
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 500;
}

form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

input, textarea, button, select { font: inherit; }

.field {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.field-label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

textarea {
  width: 100%;
  min-height: clamp(220px, 34vh, 320px);
  min-height: clamp(220px, 34dvh, 320px);
  resize: vertical;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--ink);
  caret-color: var(--accent);
  font: 13.5px/1.7 var(--mono);
  transition: border-color 160ms, box-shadow 160ms;
}

textarea:hover { border-color: var(--line-strong); }

textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

textarea::placeholder { color: var(--muted); opacity: 0.7; }

.upload {
  position: relative;
  padding: 14px 18px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  overflow: hidden;
  transition: border-color 170ms, background 170ms, box-shadow 170ms;
}

.upload:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.upload.drag-over {
  border-color: var(--accent);
  border-style: solid;
  background: var(--accent-soft);
  box-shadow: var(--focus-ring);
}

.file-label {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
  cursor: pointer;
}

.file-label input[type="file"] { display: none; }

.upload-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--grad);
  color: var(--accent-ink);
  box-shadow: var(--shadow);
}

.upload-icon svg { width: 20px; height: 20px; }

.file-name {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font: 500 0.88rem/1.35 var(--sans);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-label:hover .file-name { color: var(--ink); }

.upload-progress {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.upload-progress[hidden] { display: none; }

.upload-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font: 600 0.74rem/1.2 var(--sans);
}

.upload-progress-track {
  position: relative;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}

.upload-progress-fill {
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--grad);
  transition: width 120ms ease;
}

.upload-progress.is-indeterminate .upload-progress-fill {
  width: 42%;
  animation: upload-slide 1s ease-in-out infinite;
}

@keyframes upload-slide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(250%); }
}

.button-row {
  display: grid;
  grid-template-columns: auto minmax(100px, 132px) minmax(120px, 1fr);
  gap: 10px;
  align-items: center;
}

button[type="submit"] {
  position: relative;
  min-height: 48px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  background: var(--grad);
  color: var(--accent-ink);
  cursor: pointer;
  font-family: var(--display);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  box-shadow: 0 8px 24px rgba(109, 78, 233, 0.35);
  transition: box-shadow 170ms, transform 170ms, opacity 170ms;
}

button[type="submit"]::after {
  content: "→";
  margin-left: 9px;
  display: inline-block;
  transition: transform 170ms ease;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 32px rgba(109, 78, 233, 0.5);
}

button[type="submit"]:hover::after { transform: translateX(3px); }

button[type="submit"]:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

select {
  width: 100%;
  min-height: 48px;
  padding: 0 36px 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239aa1c0' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E")
    no-repeat right 15px center / 10px,
    var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  font-size: 0.87rem;
  font-weight: 500;
  transition: border-color 160ms, box-shadow 160ms;
}

select:hover { border-color: var(--line-strong); }

select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.form-options {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  gap: 10px 18px;
  align-items: center;
}

.burn-check {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.87rem;
  font-weight: 500;
  user-select: none;
  transition: color 150ms;
}

.burn-check:hover { color: var(--danger); }

.burn-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: #8b5cf6;
  cursor: pointer;
}

.pass-label {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 48px;
  min-width: 0;
  gap: 10px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  transition: border-color 160ms, box-shadow 160ms;
}

.pass-label:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.pass-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  color: var(--muted);
}

.pass-input {
  flex: 1;
  width: 0;
  min-width: 0;
  height: 46px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  caret-color: var(--accent);
  font: 500 0.88rem/46px var(--sans);
}

.pass-input:focus { outline: none; }
.pass-input::placeholder { color: var(--muted); opacity: 0.7; }

.form-hint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

/* ---------- Light theme ---------- */

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f2f4fc;
    --aurora-1: rgba(124, 58, 237, 0.14);
    --aurora-2: rgba(14, 165, 233, 0.13);
    --aurora-3: rgba(236, 72, 153, 0.09);
    --surface: rgba(255, 255, 255, 0.72);
    --surface-2: rgba(240, 242, 252, 0.85);
    --ink: #1b1f3a;
    --muted: #5b6285;
    --accent: #7c3aed;
    --accent-strong: #6d28d9;
    --accent-soft: rgba(124, 58, 237, 0.1);
    --accent-ink: #ffffff;
    --grad: linear-gradient(135deg, #7c3aed, #0ea5e9);
    --amber: #b45309;
    --success: #047857;
    --danger: #e11d48;
    --danger-soft: rgba(225, 29, 72, 0.08);
    --line: rgba(27, 31, 58, 0.12);
    --line-strong: rgba(27, 31, 58, 0.26);
    --shadow: 0 8px 28px rgba(31, 41, 90, 0.1);
    --shadow-lg: 0 20px 60px rgba(31, 41, 90, 0.14);
    --focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.25);
    --sel-bg: rgba(124, 58, 237, 0.22);
  }
}

:root[data-theme="light"] {
  --bg: #f2f4fc;
  --aurora-1: rgba(124, 58, 237, 0.14);
  --aurora-2: rgba(14, 165, 233, 0.13);
  --aurora-3: rgba(236, 72, 153, 0.09);
  --surface: rgba(255, 255, 255, 0.72);
  --surface-2: rgba(240, 242, 252, 0.85);
  --ink: #1b1f3a;
  --muted: #5b6285;
  --accent: #7c3aed;
  --accent-strong: #6d28d9;
  --accent-soft: rgba(124, 58, 237, 0.1);
  --accent-ink: #ffffff;
  --grad: linear-gradient(135deg, #7c3aed, #0ea5e9);
  --amber: #b45309;
  --success: #047857;
  --danger: #e11d48;
  --danger-soft: rgba(225, 29, 72, 0.08);
  --line: rgba(27, 31, 58, 0.12);
  --line-strong: rgba(27, 31, 58, 0.26);
  --shadow: 0 8px 28px rgba(31, 41, 90, 0.1);
  --shadow-lg: 0 20px 60px rgba(31, 41, 90, 0.14);
  --focus-ring: 0 0 0 3px rgba(124, 58, 237, 0.25);
  --sel-bg: rgba(124, 58, 237, 0.22);
}

:root[data-theme="dark"] {
  --bg: #0b0e1c;
  --aurora-1: rgba(124, 58, 237, 0.26);
  --aurora-2: rgba(34, 211, 238, 0.16);
  --aurora-3: rgba(236, 72, 153, 0.12);
  --surface: rgba(23, 26, 48, 0.62);
  --surface-2: rgba(10, 12, 27, 0.55);
  --ink: #edeff9;
  --muted: #9aa1c0;
  --accent: #a78bfa;
  --accent-strong: #c4b5fd;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-ink: #ffffff;
  --grad: linear-gradient(135deg, #8b5cf6, #38bdf8);
  --amber: #fbbf24;
  --success: #34d399;
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.12);
  --line: rgba(148, 163, 214, 0.16);
  --line-strong: rgba(148, 163, 214, 0.34);
  --shadow: 0 8px 28px rgba(4, 7, 20, 0.45);
  --shadow-lg: 0 20px 60px rgba(4, 7, 20, 0.55);
  --focus-ring: 0 0 0 3px rgba(139, 92, 246, 0.35);
  --sel-bg: rgba(139, 92, 246, 0.35);
}

/* ---------- Responsive ---------- */

@media (max-width: 560px) {
  .page {
    width: calc(100% - 24px);
    padding-top: clamp(46px, 8vh, 70px);
  }

  .composer { padding: 20px; }

  .cli { padding-right: 20px; white-space: pre-wrap; }
  .copy-cli { position: static; margin-top: 10px; width: 100%; }

  .composer-head { align-items: stretch; flex-direction: column; gap: 10px; }
  .size-pill { width: fit-content; }

  .button-row,
  .form-options { grid-template-columns: 1fr; }

  button[type="submit"],
  select,
  .pass-input { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow::before { animation: none; }
  .tag:hover,
  button[type="submit"]:hover { transform: none; }
}
