:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-muted: #f0f2f8;
  --text: #111827;
  --text-muted: #667085;
  --border: #dfe3ec;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --primary-soft: #eef2ff;
  --success: #15803d;
  --danger: #dc2626;
  --shadow: 0 20px 50px rgba(17, 24, 39, 0.08);
  --header-bg: rgba(255, 255, 255, 0.82);
}

html[data-theme="dark"] {
  --bg: #0b1020;
  --surface: #11182b;
  --surface-muted: #182138;
  --text: #f5f7fb;
  --text-muted: #a7b0c0;
  --border: #2a3550;
  --primary: #818cf8;
  --primary-hover: #a5b4fc;
  --primary-soft: #1d2440;
  --success: #4ade80;
  --danger: #fb7185;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.28);
  --header-bg: rgba(11, 16, 32, 0.82);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(99, 102, 241, 0.10), transparent 32rem),
    radial-gradient(circle at 92% 30%, rgba(14, 165, 233, 0.08), transparent 30rem),
    var(--bg);
  line-height: 1.6;
  transition: background-color .25s ease, color .25s ease;
}

button, input {
  font: inherit;
}

button {
  color: inherit;
}

svg {
  width: 1.2em;
  height: 1.2em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.12rem;
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: white;
  background: linear-gradient(135deg, #4f46e5, #06b6d4);
  box-shadow: 0 10px 25px rgba(79, 70, 229, .24);
}

.theme-toggle,
.text-button,
.primary-button,
.secondary-button,
.remove-button,
.download-button {
  border: 0;
  cursor: pointer;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: .9rem;
  font-weight: 600;
}

.theme-toggle:hover {
  background: var(--surface-muted);
}

.moon-icon {
  display: none;
}

html[data-theme="dark"] .sun-icon {
  display: none;
}

html[data-theme="dark"] .moon-icon {
  display: block;
}

.hero {
  text-align: center;
  padding: 76px 0 42px;
}

.eyebrow,
.section-label {
  margin: 0 0 10px;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 auto;
  max-width: 820px;
  font-size: clamp(2.4rem, 7vw, 5rem);
  line-height: 1.03;
  letter-spacing: -.055em;
}

.hero h1 span {
  color: var(--primary);
}

.hero-copy {
  max-width: 700px;
  margin: 22px auto 18px;
  color: var(--text-muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
}

.hero-copy strong {
  color: var(--text);
}

.privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid rgba(21, 128, 61, .18);
  border-radius: 999px;
  color: var(--success);
  background: rgba(34, 197, 94, .08);
  font-size: .86rem;
  font-weight: 700;
}

.converter {
  padding-bottom: 70px;
}

.converter-card,
.disclosure-card {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.converter-card {
  padding: clamp(20px, 4vw, 34px);
}

.card-heading,
.action-row,
.footer-inner,
.disclosure-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.card-heading {
  margin-bottom: 22px;
}

.card-heading h2,
.disclosure h2,
.faq h2 {
  margin: 0;
  letter-spacing: -.035em;
}

.text-button {
  color: var(--danger);
  background: transparent;
  font-weight: 700;
}

.drop-zone {
  min-height: 300px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  padding: 28px;
  border: 2px dashed var(--border);
  border-radius: 22px;
  background: var(--surface-muted);
  outline: none;
  cursor: pointer;
  transition: border-color .2s ease, transform .2s ease, background .2s ease;
}

.drop-zone:hover,
.drop-zone:focus-visible,
.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-soft);
  transform: translateY(-2px);
}

.upload-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 20px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.8rem;
}

.drop-zone h3 {
  margin: 0;
  font-size: 1.22rem;
}

.drop-zone p {
  margin: 4px 0 6px;
  color: var(--text-muted);
}

.drop-zone span {
  color: var(--text-muted);
  font-size: .83rem;
}

.settings-panel {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(260px, 2fr);
  align-items: center;
  gap: 26px;
  margin-top: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
}

.setting-copy label {
  display: block;
  font-weight: 800;
}

.setting-copy p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: .88rem;
}

.range-group {
  display: grid;
  grid-template-columns: 1fr 60px;
  align-items: center;
  gap: 14px;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--primary);
}

output {
  text-align: center;
  padding: 6px 8px;
  border-radius: 10px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: .85rem;
  font-weight: 800;
}

.file-list {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.file-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
}

.file-preview {
  width: 58px;
  height: 58px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-muted);
}

.file-details {
  min-width: 0;
}

.file-name {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}

.file-meta {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: .84rem;
}

.file-saving {
  color: var(--success);
  font-weight: 700;
}

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

.remove-button,
.download-button {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: .84rem;
  font-weight: 700;
}

.remove-button {
  color: var(--danger);
  background: rgba(220, 38, 38, .08);
}

.download-button {
  color: var(--primary);
  background: var(--primary-soft);
}

.action-row {
  margin-top: 22px;
  justify-content: flex-start;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 19px;
  border-radius: 13px;
  font-weight: 800;
}

.primary-button {
  color: white;
  background: var(--primary);
  box-shadow: 0 10px 20px rgba(79, 70, 229, .20);
}

.primary-button:hover {
  background: var(--primary-hover);
}

.secondary-button {
  color: var(--primary);
  border: 1px solid var(--border);
  background: var(--surface);
}

.primary-button:disabled {
  opacity: .55;
  cursor: wait;
}

.status-message {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 12px;
  color: var(--text-muted);
  background: var(--surface-muted);
  font-size: .9rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  padding-bottom: 76px;
}

.feature-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  color: var(--primary);
  background: var(--primary-soft);
  font-size: 1.2rem;
}

.feature-card h3 {
  margin: 16px 0 6px;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: .94rem;
}

.disclosure {
  padding-bottom: 76px;
}

.disclosure-card {
  align-items: flex-start;
  padding: clamp(24px, 4vw, 38px);
}

.disclosure-card > div {
  min-width: 260px;
}

.disclosure-card > p {
  max-width: 660px;
  margin: 0;
  color: var(--text-muted);
}

.faq {
  padding-bottom: 86px;
}

.faq > h2 {
  margin-bottom: 22px;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

details {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
  overflow: hidden;
}

summary {
  padding: 17px 18px;
  cursor: pointer;
  font-weight: 800;
}

details p {
  margin: 0;
  padding: 0 18px 18px;
  color: var(--text-muted);
}

footer {
  border-top: 1px solid var(--border);
}

.footer-inner {
  min-height: 82px;
  color: var(--text-muted);
  font-size: .86rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  .hero {
    padding-top: 56px;
  }

  .settings-panel,
  .features,
  .faq-grid {
    grid-template-columns: 1fr;
  }

  .file-item {
    grid-template-columns: 52px minmax(0, 1fr);
  }

  .file-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .disclosure-card,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .disclosure-card > div {
    min-width: 0;
  }

  .footer-inner {
    justify-content: center;
    gap: 2px;
    padding: 20px 0;
  }

  .footer-inner p {
    margin: 0;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 22px, 1120px);
  }

  .theme-toggle span {
    display: none;
  }

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

  .range-group {
    grid-template-columns: 1fr 54px;
  }

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

  .primary-button,
  .secondary-button {
    width: 100%;
  }
}
