:root {
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-strong: #f6f8fb;
  --ink: #101820;
  --text: #1b2530;
  --muted: #657385;
  --line: #d9e1e8;
  --accent: #008a7a;
  --accent-dark: #006a5f;
  --accent-soft: #e0f5f1;
  --warm: #f0a736;
  --warm-soft: #fff4df;
  --danger: #b42318;
  --shadow: 0 34px 90px rgba(21, 34, 48, 0.16);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 138, 122, 0.14), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(240, 167, 54, 0.16), transparent 27%),
    var(--bg);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  margin: 0 auto;
  display: grid;
  place-items: center;
  padding: 40px 0;
}

.workspace {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 42px;
  align-items: center;
}

.intro {
  min-width: 0;
  padding: 8px 0;
}

.brand-row {
  width: fit-content;
  margin-bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 8px;
  border: 1px solid rgba(16, 24, 32, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(21, 34, 48, 0.08);
  font-weight: 800;
}

.brand-mark {
  min-width: 42px;
  min-height: 32px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: var(--ink);
  font-size: 0.76rem;
  letter-spacing: 0.06em;
}

.eyebrow,
.result-label {
  margin: 0 0 12px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  max-width: 620px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(2.45rem, 5.2vw, 5.45rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.lead {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.hero-visual {
  width: min(470px, 100%);
  margin-top: 30px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 22px 60px rgba(21, 34, 48, 0.16);
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.compressor {
  width: 100%;
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.form-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.form-header h2 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1.35rem;
}

.panel-kicker {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.limit-badge {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  color: #7b4d00;
  background: var(--warm-soft);
  font-size: 0.78rem;
  font-weight: 900;
}

.drop-zone {
  min-height: 216px;
  border: 1.5px dashed #98a9b8;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(246, 248, 251, 0.98)),
    var(--surface-strong);
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.drop-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--accent-dark);
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(0, 106, 95, 0.14);
}

.drop-icon svg,
.primary-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-title {
  font-size: 1.35rem;
  font-weight: 800;
}

.drop-copy,
.auto-panel span,
.message,
.stats dt {
  color: var(--muted);
}

.picker-actions {
  margin: 18px 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.secondary-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  font-weight: 850;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}

.secondary-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.auto-panel {
  margin: 0 0 18px;
  padding: 14px;
  border: 1px solid rgba(0, 138, 122, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 4px;
  background: var(--accent-soft);
}

.auto-panel strong {
  color: var(--accent-dark);
}

.primary-button,
.download-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #ffffff;
  background: linear-gradient(135deg, var(--accent), #154d49);
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 16px 30px rgba(0, 106, 95, 0.24);
}

.primary-button:hover,
.download-button:hover {
  background: linear-gradient(135deg, var(--accent-dark), #123e3b);
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.progress-wrap {
  margin-top: 18px;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.progress-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce6ec;
}

.progress-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 160ms ease;
}

.message {
  min-height: 24px;
  margin: 14px 0 0;
  line-height: 1.45;
}

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

.result-panel {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.result-panel h2 {
  margin: 0;
  font-size: 1.2rem;
}

.stats {
  margin: 16px 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.stats div {
  padding: 12px;
  border-radius: 8px;
  background: var(--surface-strong);
}

.stats dt,
.stats dd {
  margin: 0;
}

.stats dt {
  font-size: 0.78rem;
}

.stats dd {
  margin-top: 4px;
  font-weight: 800;
}

@media (max-width: 860px) {
  .app-shell {
    place-items: start center;
  }

  .workspace {
    grid-template-columns: 1fr;
    gap: 26px;
  }

  h1 {
    font-size: clamp(2.2rem, 12vw, 4rem);
  }

  .hero-visual {
    width: min(520px, 100%);
  }
}

@media (max-width: 520px) {
  .app-shell {
    width: min(100% - 20px, 1120px);
    padding: 20px 0;
  }

  .compressor {
    padding: 14px;
  }

  .brand-row {
    margin-bottom: 18px;
  }

  .drop-zone {
    min-height: 190px;
    padding: 20px 14px;
  }

  .picker-actions {
    grid-template-columns: 1fr;
  }

  .stats {
    grid-template-columns: 1fr;
  }
}
