* {
  box-sizing: border-box;
}

body {
  margin: 0;

  font-family:
    Arial,
    Helvetica,
    sans-serif;

  background: #f5f7fa;

  color: #1f2937;
}


.container {
  width: min(1000px, 92%);

  margin: 60px auto;
}


h1 {
  margin-bottom: 10px;

  font-size: 2.4rem;
}


.subtitle {
  margin-top: 0;
  margin-bottom: 30px;

  color: #5f6b7a;

  font-size: 1.05rem;
}


.trust-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;

  margin-bottom: 28px;
}

.trust-row span {
  padding: 7px 11px;

  border-radius: 999px;

  background: #e8eef7;

  color: #334155;

  font-size: 0.88rem;
}


.drop-zone {
  padding: 55px 30px;

  border: 2px dashed #94a3b8;

  border-radius: 16px;

  background: white;

  text-align: center;

  transition:
    border-color 0.2s,
    background 0.2s,
    transform 0.2s;

  box-shadow:
    0 4px 18px rgba(15, 23, 42, 0.05);
}


.drop-zone.drag-over {
  border-color: #2563eb;

  background: #eff6ff;

  transform: scale(1.01);
}


.drop-zone p {
  margin: 6px 0;

  font-size: 1.2rem;
}


.drop-zone .small {
  color: #6b7280;

  font-size: 0.95rem;
}

.supported-formats {
  margin-top: 16px !important;

  color: #64748b;

  font-size: 0.85rem !important;
}

.remove-all-button {
  background: #64748b;
}

.remove-all-button:hover {
  background: #475569;
}

button {
  padding: 12px 20px;

  border: 0;

  border-radius: 8px;

  font-size: 1rem;

  cursor: pointer;

  background: #2563eb;

  color: white;
}


button:hover {
  background: #1d4ed8;
}


button:disabled {
  background: #94a3b8;

  cursor: not-allowed;
}


#chooseFilesButton {
  margin-top: 18px;
}


.batch-section {
  margin-top: 30px;
}

.batch-header {
  display: flex;

  justify-content: space-between;

  align-items: center;

  margin-bottom: 0;

  padding: 0 4px;

  color: #475569;
}

#fileCount {
  margin-left: 10px;
  font-size: 0.9rem;
  color: #64748b;
}


.batch-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 14px;
  background: white;
}



.format-control {
  display: flex;

  align-items: center;

  gap: 12px;
}


select {
  padding: 10px;

  border: 1px solid #cbd5e1;

  border-radius: 8px;

  font-size: 1rem;
}


.status-message {
  min-height: 24px;

  margin-bottom: 15px;

  color: #475569;
}


.file-list {
  display: grid;

  gap: 14px;
}


.file-card {
  display: flex;

  align-items: center;

  gap: 20px;

  padding: 15px;

  border-radius: 12px;

  background: white;
}


/*
  The thumbnail is deliberately kept small.

  Even a very large phone image will only appear
  inside this 160 × 120 pixel preview box.
*/

.thumbnail-wrapper {
  width: 160px;

  height: 120px;

  flex-shrink: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  overflow: hidden;

  border-radius: 8px;

  background: #f1f5f9;
}


.thumbnail {
  max-width: 100%;

  max-height: 100%;

  object-fit: contain;
}


.file-details {
  flex: 1;

  min-width: 0;
}


.file-name {
  margin-bottom: 7px;

  font-weight: bold;

  word-break: break-word;
}


.file-size {
  color: #64748b;

  font-size: 0.9rem;
}


.file-actions {
  display: flex;

  align-items: center;

  gap: 10px;

  flex-wrap: wrap;
}


.remove-button {
  background: #64748b;
}


.remove-button:hover {
  background: #475569;
}


.download-link {
  display: inline-block;

  padding: 10px 14px;

  border-radius: 8px;

  background: #15803d;

  color: white;

  text-decoration: none;
}


.download-link:hover {
  background: #166534;
}

.download-zip-button {
  background: #15803d;
}

.download-zip-button:hover {
  background: #166534;
}

.conversion-options > * {
  min-width: 0;
  max-width: 100%;
}

.conversion-options {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}


.control-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}


.quality-control {
  min-width: 180px;
}


#qualitySlider {
  width: 180px;
}


.resize-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}


.resize-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;

  font-weight: bold;

  cursor: pointer;
}


.resize-fields {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}


.resize-fields div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}


.resize-fields input {
  width: 130px;

  padding: 9px;

  border: 1px solid #cbd5e1;

  border-radius: 8px;

  font-size: 1rem;
}


.batch-buttons {
  display: flex;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  gap: 10px;
  flex-wrap: wrap;
}

.ico-note {
  max-width: 340px;

  padding: 10px 12px;

  border-radius: 8px;

  background: #f1f5f9;

  color: #475569;

  font-size: 0.9rem;

  line-height: 1.4;
}

.thumbnail-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  font-size: 1rem;
  font-weight: bold;

  color: #64748b;
  background: #e2e8f0;
}


.hidden {
  display: none;
}


@media (max-width: 650px) {

  .container {
    margin-top: 30px;
  }


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


  .thumbnail-wrapper {
    width: 120px;

    height: 90px;
  }


  .file-actions {
    margin-top: 10px;
  }

}

.converted-info {
  margin-top: 7px;

  color: #15803d;

  font-size: 0.9rem;

  font-weight: 600;
}
.option-note {
  max-width: 340px;
  color: #64748b;
  font-size: 0.85rem;
  line-height: 1.4;
}

.resize-mode-control {
  flex-basis: 100%;
}

.resize-fields select {
  max-width: 100%;
}

/* Public site shell: keep the converter dominant; stack before it gets cramped. */
.site-layout {
  width: min(1360px, 92%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 32px;
  margin-bottom: 40px;
}
.converter-main, .site-sidebar { min-width: 0; }
.converter-main h1 { margin-top: 0; }
.site-sidebar { display: grid; gap: 20px; }
.sidebar-card {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.03);
}
.sidebar-card h2, .why-ads h2 { margin: 0 0 12px; font-size: 1.15rem; }
.sidebar-card p, .why-ads p { line-height: 1.6; color: #526174; }
.sidebar-card p:last-child, .why-ads p:last-child { margin-bottom: 0; }
.ad-card { padding: 16px; }
.ad-card .eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #64748b;
  text-align: center;
}
.ad-placeholder {
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 20px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
}
.ad-placeholder small { font-size: 0.75rem; line-height: 1.5; }
.support-link, .feedback-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-weight: 600;
  color: #334155;
  text-decoration: none;
  background: #f8fafc;
}
.support-link:hover { background: #eef2f6; border-color: #94a3b8; }
.feedback-link[aria-disabled="true"] { pointer-events: none; color: #64748b; }
.sidebar-card .sidebar-note { font-size: 0.8rem; }
.why-ads { padding: 0 12px; font-size: 0.85rem; }
.why-ads h2 { font-size: 0.95rem; }
.site-footer {
  width: min(1360px, 92%);
  margin: 0 auto;
  padding: 24px 0 32px;
  border-top: 1px solid #dde4ec;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }
.site-footer a { color: #526174; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-brand { font-weight: 600; }
.page-content { width: min(800px, 92%); margin: 48px auto; }
.page-content article {
  padding: clamp(24px, 5vw, 48px);
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  margin-top: 24px;
  line-height: 1.7;
}
.page-content h1 { margin-top: 0; line-height: 1.2; }
.page-content h2 { margin-top: 28px; font-size: 1.2rem; }
.page-content a { color: #1d4ed8; }
.page-content p, .page-content li { color: #475569; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 3px;
}
@media (max-width: 1100px) {
  .site-layout { grid-template-columns: minmax(0, 1fr); }
  .site-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 650px) {
  .site-sidebar { grid-template-columns: minmax(0, 1fr); }
  .site-layout { gap: 28px; }
  .drop-zone { padding: 32px 18px; }
  .file-card { flex-wrap: wrap; gap: 14px; }
  .file-actions { flex-basis: 100%; }
  .file-details { flex-basis: 100px; }
  .resize-fields > div { min-width: 0; max-width: 100%; }
  .batch-buttons button, .download-link { min-height: 44px; }
  .site-footer { align-items: flex-start; }
}
