:root {
  color-scheme: light;
  --ink: #15233f;
  --muted: #61708a;
  --line: #dce4ef;
  --surface: #ffffff;
  --surface-soft: #f4f7fb;
  --navy: #142d55;
  --blue: #2b6ff7;
  --blue-dark: #1d55c4;
  --blue-soft: #eaf1ff;
  --green: #16865b;
  --green-soft: #e8f8f1;
  --red: #be3045;
  --red-soft: #fff0f2;
  --shadow: 0 22px 65px rgba(35, 61, 105, 0.12);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% -15%, rgba(54, 116, 247, 0.18), transparent 30rem),
    linear-gradient(180deg, #f8fbff 0, #f4f7fb 32rem, #ffffff 100%);
  line-height: 1.6;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.site-header {
  width: min(1180px, calc(100% - 40px));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  border-bottom: 1px solid rgba(180, 194, 216, 0.55);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--navy);
  font-size: 1.08rem;
  font-weight: 760;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--blue), var(--navy));
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(43, 111, 247, 0.22);
}

nav {
  display: flex;
  gap: 22px;
}

nav a {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 620;
  text-decoration: none;
}

nav a:hover,
nav a:focus-visible {
  color: var(--blue);
}

main {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  max-width: 810px;
  margin: 92px auto 44px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 13px;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border: 1px solid #cedcff;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 23px 0 18px;
  font-size: clamp(2.25rem, 6vw, 4.15rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
  color: var(--navy);
}

.hero-copy {
  max-width: 710px;
  margin: 0 auto;
  color: var(--muted);
  font-size: clamp(1.02rem, 2vw, 1.18rem);
}

.privacy-note {
  width: fit-content;
  max-width: 100%;
  margin: 25px auto 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #376a59;
  font-size: 0.9rem;
}

.privacy-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}

.converter-card,
.result-card {
  padding: clamp(24px, 5vw, 42px);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(198, 210, 228, 0.85);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card-heading,
.result-heading,
.preview-heading,
.selected-file,
.result-actions {
  display: flex;
  align-items: center;
}

.card-heading,
.preview-heading {
  justify-content: space-between;
  gap: 20px;
}

.card-heading h2,
.result-heading h2 {
  margin-bottom: 5px;
  color: var(--navy);
  font-size: 1.35rem;
  letter-spacing: -0.025em;
}

.card-heading p,
.result-heading p,
.preview-heading span {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

code {
  padding: 2px 5px;
  background: var(--surface-soft);
  border-radius: 5px;
}

.step-badge {
  flex: 0 0 auto;
  padding: 6px 10px;
  color: var(--muted);
  background: var(--surface-soft);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
}

.drop-zone {
  min-height: 285px;
  margin-top: 28px;
  padding: 38px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: linear-gradient(180deg, #fbfdff, #f7faff);
  border: 2px dashed #b8c8df;
  border-radius: 18px;
  cursor: pointer;
  transition: 180ms ease;
}

.drop-zone:hover,
.drop-zone:focus-within,
.drop-zone.is-dragging {
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-color: var(--blue);
  outline: none;
  transform: translateY(-2px);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-icon {
  width: 62px;
  height: 62px;
  margin-bottom: 20px;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #fff;
  border: 1px solid #d5e1f5;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(43, 111, 247, 0.12);
}

.upload-icon svg {
  width: 29px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.drop-title {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 730;
}

.drop-subtitle {
  margin: 4px 0 19px;
  font-size: 0.9rem;
}

.choose-button {
  padding: 9px 16px;
  color: var(--blue-dark);
  background: #fff;
  border: 1px solid #b9cef7;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 720;
}

.selected-file {
  margin-top: 28px;
  padding: 17px;
  gap: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 15px;
}

.conversion-option {
  margin-top: 18px;
  padding: 16px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.conversion-option label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 0.84rem;
  font-weight: 750;
}

.conversion-option select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #bcc9dc;
  border-radius: 9px;
}

.conversion-option p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.file-icon {
  flex: 0 0 auto;
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  color: var(--blue-dark);
  background: var(--blue-soft);
  border-radius: 12px;
  font-size: 0.69rem;
  font-weight: 850;
}

.file-copy {
  min-width: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
}

.file-copy strong {
  overflow: hidden;
  color: var(--ink);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-copy span {
  color: var(--muted);
  font-size: 0.84rem;
}

.icon-button {
  width: 38px;
  height: 38px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 9px;
  cursor: pointer;
  font-size: 1.55rem;
}

.icon-button:hover {
  color: var(--red);
  background: var(--red-soft);
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  font-weight: 760;
  cursor: pointer;
  transition: 160ms ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, var(--blue), #205fd9);
  border: 0;
  box-shadow: 0 10px 24px rgba(43, 111, 247, 0.22);
}

.converter-card > .primary-button {
  width: 100%;
  margin-top: 18px;
}

.primary-button:hover:not(:disabled) {
  background: linear-gradient(135deg, #367bff, var(--blue-dark));
  transform: translateY(-1px);
}

.primary-button:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  box-shadow: none;
}

.secondary-button {
  color: var(--navy);
  background: #fff;
  border: 1px solid var(--line);
}

.secondary-button:hover {
  background: var(--surface-soft);
}

.spinner {
  width: 18px;
  height: 18px;
  margin-left: 9px;
  display: inline-block;
  vertical-align: -3px;
  border: 2px solid rgba(255, 255, 255, 0.42);
  border-top-color: #fff;
  border-radius: 999px;
  animation: spin 0.75s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-text {
  min-height: 1.45em;
  margin: 10px 0 -5px;
  color: var(--muted);
  text-align: center;
  font-size: 0.84rem;
}

.message {
  margin-top: 20px;
  padding: 13px 15px;
  border-radius: 11px;
  font-size: 0.9rem;
}

.message-error {
  color: #922337;
  background: var(--red-soft);
  border: 1px solid #f3c5ce;
}

.result-card {
  margin-top: 30px;
}

.result-heading {
  gap: 14px;
}

.success-mark {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  border-radius: 14px;
  font-size: 1.2rem;
  font-weight: 850;
  box-shadow: 0 10px 22px rgba(22, 134, 91, 0.18);
}

.result-stats {
  margin: 28px 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.result-stats div {
  min-width: 0;
  padding: 15px;
  background: var(--surface-soft);
  border: 1px solid #e3e9f1;
  border-radius: 12px;
}

.result-stats dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.035em;
  text-transform: uppercase;
}

.result-stats dd {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--navy);
  font-size: 1.05rem;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-actions {
  flex-wrap: wrap;
  gap: 10px;
}

.warnings-panel {
  margin: -10px 0 24px;
  padding: 16px 18px;
  color: #6e4d0a;
  background: #fff8e6;
  border: 1px solid #ead49c;
  border-radius: 12px;
}

.warnings-panel h3 {
  margin-bottom: 7px;
  font-size: 0.92rem;
}

.warnings-panel ul {
  margin: 0;
  padding-left: 20px;
  font-size: 0.84rem;
}

.preview-block {
  margin-top: 32px;
  padding-top: 27px;
  border-top: 1px solid var(--line);
}

.preview-heading h3 {
  margin: 0;
  color: var(--navy);
  font-size: 1rem;
}

.table-scroll {
  margin-top: 13px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  white-space: nowrap;
}

th,
td {
  max-width: 260px;
  padding: 10px 12px;
  overflow: hidden;
  border-bottom: 1px solid #e6ebf2;
  text-align: left;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  color: #52637c;
  background: #f2f6fb;
  font-weight: 760;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #f8faff;
}

.feature-grid {
  margin: 72px 0 84px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.feature-grid article {
  padding: 25px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 17px;
}

.feature-number {
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 820;
  letter-spacing: 0.08em;
}

.feature-grid h2 {
  margin: 15px 0 8px;
  color: var(--navy);
  font-size: 1rem;
  letter-spacing: -0.015em;
}

.feature-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

footer {
  width: min(1180px, calc(100% - 40px));
  min-height: 86px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
}

footer a {
  color: var(--blue-dark);
  font-weight: 650;
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
  }

  nav {
    display: none;
  }

  .hero {
    margin-top: 58px;
  }

  .privacy-note {
    align-items: flex-start;
    text-align: left;
  }

  .card-heading {
    align-items: flex-start;
  }

  .step-badge {
    display: none;
  }

  .drop-zone {
    min-height: 245px;
    padding: 30px 16px;
  }

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

  footer {
    padding: 24px 0;
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .site-header,
  main,
  footer {
    width: min(100% - 24px, 1040px);
  }

  .hero {
    margin-top: 45px;
  }

  .converter-card,
  .result-card {
    border-radius: 17px;
  }

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

  .result-actions > * {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

