:root {
  --bg: #0d0f1a;
  --panel: rgba(255, 255, 255, 0.05);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #e9edf5;
  --muted: #b3bdd4;
  --accent: #ff5f9e;
  --accent-2: #5668ff;
  --accent-3: #6ce0ff;
  --success: #5be29b;
  --danger: #ff9b73;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(86, 104, 255, 0.18), transparent 30%),
    radial-gradient(circle at 74% 12%, rgba(255, 95, 158, 0.18), transparent 30%),
    radial-gradient(circle at 46% 78%, rgba(108, 224, 255, 0.12), transparent 32%),
    var(--bg);
  color: var(--text);
  font-family: 'Space Grotesk', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero {
  padding: 60px 0 32px;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  text-align: center;
}

.hero__brand-bar {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 4px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.hero__brand-mark {
  height: 48px;
  width: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 20%, rgba(86, 104, 255, 0.18), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(255, 95, 158, 0.18), transparent 52%),
    rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 95, 158, 0.28);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 10px 24px rgba(0, 0, 0, 0.25);
  flex-shrink: 0;
}

.hero__logo {
  height: 32px;
  width: 32px;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.24));
}

.hero__brand-text {
  display: grid;
  gap: 4px;
  line-height: 1.2;
  text-align: center;
}

.hero__brand-name {
  font-weight: 600;
  color: #fff;
}

.hero h1 {
  margin: 12px 0 10px;
  font-size: clamp(32px, 4.6vw, 48px);
  letter-spacing: -0.02em;
}

.lead {
  margin: 0;
  color: var(--muted);
  max-width: 780px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 12px;
}

.cta-link,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease, border-color 0.15s ease, background 0.15s ease;
  background: linear-gradient(135deg, rgba(255, 95, 158, 0.16), rgba(86, 104, 255, 0.14));
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.btn--sm {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.3;
}

.cta-link.primary,
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
  box-shadow: 0 16px 46px rgba(255, 95, 158, 0.35);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
}

.cta-link:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 50px rgba(124, 58, 237, 0.35);
}

.cta-link:active,
.btn:active {
  transform: translateY(0);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(34, 211, 238, 0.2));
  color: #e2e8f0;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

main {
  padding: 0 0 72px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.panel__title {
  margin: 0;
  font-size: 22px;
}

.panel__lede {
  margin: 0;
  color: var(--muted);
}

.dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.35);
  border-radius: 18px;
  padding: 48px;
  text-align: center;
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 95, 158, 0.16), transparent 44%),
    radial-gradient(circle at 82% 18%, rgba(86, 104, 255, 0.2), transparent 38%),
    rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  cursor: pointer;
}

.dropzone.dragover {
  border-color: var(--accent-2);
  background:
    radial-gradient(circle at 24% 24%, rgba(255, 95, 158, 0.24), transparent 44%),
    radial-gradient(circle at 82% 18%, rgba(86, 104, 255, 0.26), transparent 38%),
    rgba(86, 104, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 22px 70px rgba(86, 104, 255, 0.28);
}

.drop-actions {
  display: grid;
  gap: 10px;
  align-items: center;
  justify-items: center;
  color: var(--muted);
  font-size: 16px;
}

.drop-actions strong {
  color: #fff;
  letter-spacing: -0.01em;
  font-size: 20px;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  margin-top: 22px;
  width: 100%;
}

.control {
  display: grid;
  gap: 6px;
  min-width: 220px;
  flex: 1 1 0;
}

.control--actions {
  flex: 1;
  min-width: 260px;
}

label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

select,
button,
input[type='range'] {
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.12s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  cursor: pointer;
  outline: none;
}

select:focus,
button:focus,
input[type='range']:focus {
  border-color: rgba(124, 58, 237, 0.6);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.18);
}

button.primary {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  box-shadow: 0 14px 40px rgba(255, 95, 158, 0.45);
}

button.primary.ghost {
  background: rgba(34, 211, 238, 0.14);
  border: 1px solid rgba(34, 211, 238, 0.5);
  box-shadow: none;
}

button.secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(255, 95, 158, 0.3);
}

input[type='range'] {
  accent-color: var(--accent);
  padding: 0;
}

.helper {
  color: var(--muted);
  font-size: 12px;
}

.file-grid {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.file-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  gap: 12px;
  min-height: 96px;
  position: relative;
  overflow: hidden;
  align-items: stretch;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
}

.file-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(124, 58, 237, 0.18), transparent 46%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.file-card:hover::after {
  opacity: 1;
}

.file-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.file-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.file-body {
  flex: 1;
  display: grid;
  gap: 10px;
}

.size-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  align-items: center;
}

.size-stat {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.size-stat .label {
  color: var(--muted);
  font-weight: 700;
  letter-spacing: 0.02em;
  font-size: 12px;
  text-transform: uppercase;
}

.size-stat .value {
  color: #fff;
  font-weight: 800;
}

.size-delta {
  padding: 10px 12px;
  border-radius: 14px;
  text-align: center;
  font-weight: 800;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, rgba(255, 95, 158, 0.12), rgba(86, 104, 255, 0.12));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.size-delta[data-trend='down'] {
  color: var(--success);
  border-color: rgba(91, 226, 155, 0.4);
}

.size-delta[data-trend='up'] {
  color: var(--danger);
  border-color: rgba(255, 155, 115, 0.4);
}

.size-delta[data-trend='neutral'] {
  color: var(--muted);
}

.file-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.file-name {
  font-weight: 800;
  font-size: 15px;
  word-break: break-word;
}

.file-meta {
  color: var(--muted);
  font-size: 13px;
}

.file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 12px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status.running {
  color: var(--accent-2);
}

.status.done {
  color: var(--success);
}

.status.error {
  color: var(--danger);
}

.progress-bar {
  height: 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  position: relative;
}

.progress-bar span {
  display: block;
  height: 100%;
  width: var(--percent, 0%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transition: width 0.2s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
}

.file-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  margin-top: 10px;
}

.file-controls .control {
  flex: 1;
  min-width: 180px;
}

.actions,
.file-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

details {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 10px 12px;
}

details summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
}

.pill {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.pill.warning {
  border-color: rgba(255, 196, 109, 0.6);
  color: #ffd89c;
  background: rgba(255, 196, 109, 0.08);
}

.empty-state {
  text-align: center;
  color: var(--muted);
  padding: 40px 0;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 18px;
}

.modal.open {
  display: flex;
}

.modal__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(86, 104, 255, 0.12), transparent 32%),
    radial-gradient(circle at 80% 0%, rgba(255, 95, 158, 0.12), transparent 30%),
    rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 180ms ease;
}

.modal__content {
  position: relative;
  background: linear-gradient(150deg, #0d1024 0%, #0b0f20 40%, #0d1024 100%);
  color: var(--text);
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  max-width: 720px;
  width: min(94vw, 720px);
  max-height: 90vh;
  overflow: auto;
  opacity: 0;
  transform: translateY(10px) scale(0.99);
  transition: opacity 180ms ease, transform 200ms ease;
  outline: none;
}

.modal.open .modal__overlay {
  opacity: 1;
}

.modal.open .modal__content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 20px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1), 0 12px 30px rgba(0, 0, 0, 0.3);
  transition: background 120ms ease, transform 120ms ease;
}

.modal__close:hover {
  background: rgba(255, 255, 255, 0.14);
  transform: translateY(-1px);
}

.modal__close:active {
  transform: translateY(0);
}

.modal__header {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
  padding-right: 28px;
}

.modal__lede {
  margin: 0;
  color: var(--muted);
}

.modal__body {
  display: grid;
  gap: 14px;
}

.modal__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.16);
  border: 1px solid rgba(124, 58, 237, 0.35);
  color: #fff;
  font-weight: 700;
  letter-spacing: 0.01em;
  font-size: 13px;
}

.modal__point p {
  margin: 6px 0 0;
  color: rgba(226, 232, 240, 0.92);
}

.modal__cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 4px;
}

.footer {
  padding: 36px 0 44px;
  color: var(--muted);
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 95, 158, 0.08), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(86, 104, 255, 0.1), transparent 28%),
    rgba(11, 18, 32, 0.92);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -12px 60px rgba(0, 0, 0, 0.35);
}

.footer__stack {
  display: grid;
  gap: 16px;
  text-align: center;
}

.footer__brand {
  display: grid;
  gap: 4px;
  align-items: center;
  justify-items: center;
}

.footer__eyebrow {
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin: 0;
}

.footer__headline {
  margin: 2px 0 6px;
  color: #e2e8f0;
  font-weight: 700;
}

.footer__summary {
  margin: 0;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

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

.footer__badges span {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #e2e8f0;
  font-weight: 600;
  font-size: 14px;
}

.footer__promo {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  flex-wrap: wrap;
}

.footer__promo-label {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-weight: 700;
  letter-spacing: 0.01em;
}

.footer__promo-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__promo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 40px rgba(124, 58, 237, 0.35);
  transition: transform 0.14s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.footer__promo-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 48px rgba(124, 58, 237, 0.45);
  filter: brightness(1.05);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer__link {
  color: rgba(255, 255, 255, 0.86);
  text-decoration: none;
  font-weight: 700;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 10px 14px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.footer__link:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.footer__copyright {
  text-align: center;
  margin: 6px 0 0;
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

input[type='file'] {
  display: none;
}

@media (max-width: 820px) {
  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .control {
    width: 100%;
  }

  .hero {
    padding: 48px 0 28px;
  }

  .container {
    padding: 0 16px;
  }
}

@media (max-width: 540px) {
  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .cta-link,
  .btn {
    width: 100%;
    justify-content: center;
  }

  .dropzone {
    padding: 32px 18px;
  }

  .panel {
    padding: 18px;
  }
}
