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

/* ── Design tokens ───────────────────────────────────────────────────────── */

:root {
  /* Background gradient stops */
  --bg-from:  #070c1e;
  --bg-mid-1: #10103a;
  --bg-mid-2: #1a0c3d;
  --bg-to:    #07121e;

  /* Accent colours — stored as R,G,B so rgba() works at any opacity */
  --accent-rgb:   99, 102, 241;   /* indigo  #6366f1 */
  --accent-2-rgb: 139, 92, 246;   /* violet  #8b5cf6 */
  --orb-2-rgb:    168, 85, 247;   /* purple  #a855f7 */

  /* Solid accent shorthands (for properties that don't need alpha) */
  --accent:   #6366f1;
  --accent-2: #8b5cf6;

  /* Dropdown / popover surface */
  --surface-deep: #1e1b4b;

  /* Status colours — stored as R,G,B for the same reason */
  --status-success-rgb: 34, 197, 94;
  --status-error-rgb:   239, 68, 68;

  /* Status text */
  --status-loading-text: #c4b5fd;
  --status-success-text: #86efac;
  --status-error-text:   #fca5a5;

  /* Misc */
  --radio-selected-text: #e9d5ff;
  --radio-accent:        #a78bfa;
  --file-selected-color: rgba(134, 239, 172, 0.75);
}

/* ── Background ─────────────────────────────────────────────────────────── */

body {
  font-family: system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: #f1f5f9;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background: linear-gradient(135deg, var(--bg-from) 0%, var(--bg-mid-1) 40%, var(--bg-mid-2) 70%, var(--bg-to) 100%);
  position: relative;
  overflow-x: hidden;
}

/* Decorative orbs */
body::before {
  content: "";
  position: fixed;
  top: -12%;
  right: -10%;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(var(--accent-rgb), 0.3) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  bottom: -18%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(var(--orb-2-rgb), 0.22) 0%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */

.container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

/* ── Glass card ──────────────────────────────────────────────────────────── */

#app {
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-top-color: rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  padding: 36px;
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(var(--accent-rgb), 0.08) inset;
}

/* ── Header ──────────────────────────────────────────────────────────────── */

h1 {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 28px;
}

.divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 0 0 24px;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

form {
  background: transparent;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

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

label,
.field-label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

/* ── Select ──────────────────────────────────────────────────────────────── */

select {
  appearance: none;
  width: 100%;
  padding: 10px 36px 10px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 9px;
  font-size: 15px;
  background:
    rgba(255, 255, 255, 0.07)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23ffffff' stroke-width='1.5' fill='none' stroke-linecap='round' opacity='.45'/%3E%3C/svg%3E")
    no-repeat right 13px center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.88);
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

select:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

select:focus {
  outline: none;
  border-color: rgba(var(--accent-2-rgb), 0.65);
  box-shadow: 0 0 0 3px rgba(var(--accent-2-rgb), 0.18);
  background-color: rgba(255, 255, 255, 0.09);
}

select option {
  background: var(--surface-deep);
  color: #f1f5f9;
}

/* ── File input ──────────────────────────────────────────────────────────── */

input[type="file"] {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  width: 100%;
}

input[type="file"]::file-selector-button {
  padding: 7px 14px;
  margin-right: 12px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

input[type="file"]::file-selector-button:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.28);
}

.file-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.2s;
}

.file-hint--selected {
  color: var(--file-selected-color);
}

/* ── Format selector ─────────────────────────────────────────────────────── */

.radio-group {
  display: flex;
  gap: 10px;
}

.radio-group label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.65);
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  user-select: none;
}

.radio-group label:has(input:checked) {
  background: rgba(var(--accent-2-rgb), 0.18);
  border-color: rgba(var(--accent-2-rgb), 0.5);
  color: var(--radio-selected-text);
}

.radio-group label:hover:not(:has(input:checked)) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.radio-group input[type="radio"] {
  accent-color: var(--radio-accent);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── Submit button ───────────────────────────────────────────────────────── */

button[type="submit"] {
  margin-top: 6px;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 18px rgba(var(--accent-rgb), 0.45);
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}

button[type="submit"]:hover {
  opacity: 0.9;
  box-shadow: 0 6px 24px rgba(var(--accent-rgb), 0.55);
}

button[type="submit"]:active {
  transform: translateY(1px);
  box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.4);
}

button[type="submit"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Status banner ───────────────────────────────────────────────────────── */

.status {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 9px;
  font-size: 14px;
  min-height: 42px;
  display: flex;
  align-items: center;
  border: 1px solid transparent;
  transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}

.status--idle {
  opacity: 0;
  pointer-events: none;
}

.status--loading {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
  color: var(--status-loading-text);
}

.status--success {
  background: rgba(var(--status-success-rgb), 0.09);
  border-color: rgba(var(--status-success-rgb), 0.22);
  color: var(--status-success-text);
}

.status--error {
  background: rgba(var(--status-error-rgb), 0.09);
  border-color: rgba(var(--status-error-rgb), 0.22);
  color: var(--status-error-text);
}
