:root {
  --bg: #f6f7fb;
  --panel: #ffffff;
  --text: #171922;
  --muted: #6d7385;
  --line: #d8dbe6;
  --accent: #0e9f6e;
  --accent-strong: #067a55;
  --accent-soft: #e8f7f1;
  --danger: #c53030;
  --shadow: 0 24px 50px rgba(23, 25, 34, 0.08);
  --radius-xl: 24px;
  --radius-lg: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 5% 15%, #dff4eb 0%, transparent 28%),
    radial-gradient(circle at 95% 90%, #e9f0ff 0%, transparent 30%),
    var(--bg);
  display: grid;
  place-items: center;
  padding: 24px;
}

body > :not(.modal-overlay) {
  width: min(900px, 100%);
}

.app-shell {
  width: min(900px, 100%);
}

.site-footer {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}

.footer-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  line-height: 1;
  vertical-align: middle;
}

.footer-link:hover {
  color: var(--accent-strong);
}

.instagram-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transform: translateY(1px);
}

.hero {
  margin-bottom: 18px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  color: var(--accent-strong);
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.05;
}

.subtitle {
  margin: 10px 0 0;
  max-width: 620px;
  color: var(--muted);
  margin-inline: auto;
}

.panel {
  background: var(--panel);
  border: 1px solid #f0f1f6;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(18px, 3vw, 28px);
  animation: panel-enter 420ms ease;
}

.dropzone {
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: #fcfcff;
  padding: clamp(22px, 4vw, 34px);
  display: block;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.dropzone-content {
  text-align: center;
}

.drop-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.drop-help {
  margin: 7px 0 0;
  color: var(--muted);
}

.controls {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
  justify-content: center;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.92rem;
}

select {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  min-height: 40px;
  padding: 0 10px;
  font: inherit;
  background: white;
}

.btn {
  min-height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 160ms ease, filter 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.6;
  transform: none;
}

.btn.is-disabled {
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(0.2);
  opacity: 0.6;
  transform: none;
}

.btn.is-downloaded {
  background: #1f8f63;
  color: #ffffff;
  opacity: 0.9;
}

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

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary {
  background: #111827;
  color: white;
}

.status-wrap {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
}

.status {
  margin: 0;
  color: var(--muted);
  font-weight: 600;
  text-align: center;
}

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

.file-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  text-align: left;
}

.file-list li {
  border: 1px solid #eceef5;
  background: #fafbff;
  border-radius: 10px;
  padding: 8px 10px;
  color: #2b3246;
  font-size: 0.92rem;
  animation: file-enter 260ms ease;
}

.file-list li.is-done {
  border-color: #bfe9d8;
  background: #f3fbf7;
}

.progress-wrap {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #e9edf6;
  border-radius: 10px;
  background: #fafcff;
  text-align: left;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.86rem;
  color: #52617f;
  margin-bottom: 8px;
}

.progress-track {
  width: 100%;
  height: 10px;
  background: #e8edf8;
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #0e9f6e, #2cb387);
  border-radius: inherit;
  transition: width 220ms ease;
}

.download-btn {
  margin-top: 12px;
  align-self: center;
}

.support-note {
  margin-top: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.support-note p {
  margin: 0;
}

.support-note a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: none;
}

.support-note a:hover {
  text-decoration: underline;
}

.legal-note {
  margin-top: 6px;
  text-align: center;
}

.privacy-link {
  background: transparent;
  border: none;
  color: #7a839a;
  font-size: 0.78rem;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.privacy-link:hover {
  color: #55617d;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 28, 0.45);
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 90;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-card {
  width: min(560px, 100%);
  background: #ffffff;
  border-radius: 16px;
  border: 1px solid #e7eaf3;
  box-shadow: 0 30px 80px rgba(16, 22, 39, 0.22);
  padding: 18px;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.modal-card p {
  margin: 0 0 10px;
  color: #4b556e;
  line-height: 1.5;
}

.modal-close {
  margin-top: 4px;
}

@keyframes panel-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes file-enter {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  body {
    padding: 14px;
  }

  .controls {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }
}
