body {
  margin: 0;
  overflow-x: hidden;
  font-family: "Inter", sans-serif;
}

.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
  padding-bottom: 50px;
}

.title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.main-card {
  padding-bottom: 0px !important;
}

.icon-box {
  width: 100px;
  height: 100px;
  border-radius: 18px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6958ff;
  font-size: 24px;
  margin-bottom: 7px;
  box-shadow: none !important;
}

.icon-box i {
  font-size: 60px;
}

h1 {
  font-size: 42px;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 0px !important;
}

.desc {
  max-width: 560px;
  color: #727b91;
  line-height: 1.7;
  font-size: 15px;
  margin-top: 0px;
  margin-bottom: 20px !important;
}

.features {
  display: flex;
  gap: 15px;
  margin-top: 10px;
  flex-wrap: wrap;
  margin-left: -15px;
}

.feature {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: #f7f8ff;
  font-size: 13px;
  font-weight: 500;
  color: #5d6478;
}

.feature i {
  font-size: 13px;
  border: 7px solid #fff;
  border-radius: 50%;
  background: #fff;
}

.feature:nth-child(1) i {
  color: #6958ff;
}
.feature:nth-child(2) i {
  color: #6958ff;
}
.feature:nth-child(3) i {
  color: #6958ff;
}
.feature:nth-child(4) i {
  color: #6958ff;
}

@media (max-width: 768px) {
  .page-container {
    padding-bottom: 40px;
  }
}

body {
  padding: 0px;
}

body.dark .icon-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

body.dark .upload-circle,
body.dark .merge-btn,
body.dark .export-btn,
body.dark .browse-btn,
body.dark .rotate-btn,
body.dark .big-btn,
body.dark #browse-btn,
body.dark .convert-btn {
  background: #3b82f6 !important;
}

body.dark .upload-circle i,
body.dark #browse-btn i {
  color: #fff;
}

body.dark .icon-box i,
body.dark .shield i {
  color: #3b82f6;
}

body.dark .shield {
  background: #1b1e34 !important;
}

body.dark .feature i {
  border: none;
  color: #3b82f6;
  background: transparent !important;
}

body.dark .feature {
  border: none;
  background: none;
}

body.dark .file {
  background: #111827 !important;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
}

body.dark .file-item,
body.dark .file-row,
body.dark .file-card {
  background: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  color: #e2e8f0 !important;
}

body.dark .file-item:hover,
body.dark .file-row:hover,
body.dark .file-card:hover {
  border-color: rgba(96, 165, 250, 0.35) !important;
  background: #131c31 !important;
}

body.dark .file-name,
body.dark .file-title {
  color: #f8fafc !important;
}

body.dark .file-size,
body.dark .file-meta,
body.dark .file-status {
  color: #94a3b8 !important;
}

body.dark .file-icon {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #60a5fa !important;
}

body.dark .remove-file,
body.dark .delete-file {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
}

body.dark .remove-file:hover,
body.dark .delete-file:hover {
  background: #dc2626 !important;
  color: white !important;
  border-color: transparent !important;
}

body.dark .file::-webkit-scrollbar {
  width: 8px;
}

body.dark .file::-webkit-scrollbar-track {
  background: #0f172a;
}

body.dark .file::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 20px;
}

body.dark .file::-webkit-scrollbar-thumb:hover {
  background: #475569;
}

@media (max-width: 768px) {
  .icon-box {
    display: none;
  }
  body.dark .feature {
    font-size: 12px;
    padding: none !important;
  }
  .reorder {
    display: none !important;
  }
  .hint {
    display: none !important;
  }
}

body.dark .browse-btn:hover,
body.dark .rotate-btn:hover,
body.dark .merge-btn:hover,
body.dark .export-btn:hover,
body.dark .browse-btn:hover,
body.dark .big-btn:hover,
body.dark .convert-btn:hover {
  background: #2563eb !important;
}

.setting-card {
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 22px;
  background: #ffffff;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
}

.safe {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1 !important;
}
.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 5px;
  letter-spacing: -0.3px;
  color: #161b33;
}

.shield {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #f0edff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6958ff;
  font-size: 24px;
  flex-shrink: 0;
  margin-top: 0px !important;
}

.safe h4 {
  font-size: 17px;
  margin-bottom: 0px;
}

.safe p {
  color: #7f8799;
  font-size: 13px;
  line-height: 1.3;
  margin-top: 0px;
  margin-bottom: 0px;
}

body.dark .features {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}
body.dark .feature {
  background: transparent !important;
  color: #cbd5e1 !important;
  box-shadow: none !important;
}
body.dark .feature i {
  background: none !important;
  color: #60a5fa !important;
}

.trash {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #a0a8bc;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.trash:hover {
  background: #fff1f1;
  color: #ff5d5d;
}

body.dark .trash {
  background: rgba(255, 93, 93, 0.1);
  color: var(--danger);
}

body.dark .trash:hover {
  background: rgba(255, 93, 93, 0.2);
}

.split-trash {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: #a0a8bc;
  cursor: pointer;
  transition: 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

.split-trash:hover {
  background: #fff1f1;
  color: #ff5d5d;
}

body.dark .split-trash {
  background: rgba(255, 93, 93, 0.1);
  color: var(--danger);
}

body.dark .split-trash:hover {
  background: rgba(255, 93, 93, 0.2);
}

.sub {
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 18px;
  margin-left: 0px !important;
  margin-right: 0px !important;
  margin-top: 0px !important;
}

.note {
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 18px;
  margin-left: 0px !important;
  margin-right: 0px !important;
}

.desc {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
  margin-top: 0px;
  margin-left: 0px !important;
}

.convert-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none;
}

/* =============================================================================
   REORDER — under 425 px
============================================================================= */

@media (max-width: 425px) {
  .reorder {
    margin-top: 10px;
    width: 100%;
    flex-wrap: wrap;
    row-gap: 3px;
    line-height: 1.35;
    padding: 7px 11px;
    border-radius: 10px;
    font-size: 10.5px;
    font-weight: 600;
    gap: 5px;
  }

  .reorder i {
    font-size: 10.5px;
    flex-shrink: 0;
  }

  .reorder span {
    min-width: 0;
    word-break: break-word;
    font-size: 10.5px;
    line-height: 1.35;
  }
}

@media (max-width: 375px) {
  .reorder {
    margin-top: 8px;
    padding: 6px 9px;
    border-radius: 9px;
    font-size: 10px;
    gap: 4px;
    row-gap: 2px;
    line-height: 1.3;
  }

  .reorder i {
    font-size: 10px;
  }

  .reorder span {
    font-size: 10px;
    line-height: 1.3;
  }
}

@media (max-width: 340px) {
  .reorder {
    margin-top: 6px;
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 9.5px;
    gap: 3px;
    row-gap: 2px;
    line-height: 1.25;
  }

  .reorder i {
    font-size: 9px;
  }

  .reorder span {
    font-size: 9.5px;
    line-height: 1.25;
  }
}

@media (max-width: 300px) {
  .reorder {
    margin-top: 5px;
    padding: 4px 6px;
    border-radius: 6px;
    font-size: 8.5px;
    gap: 3px;
    row-gap: 1px;
    line-height: 1.2;
  }

  .reorder i {
    font-size: 8px;
  }

  .reorder span {
    font-size: 8.5px;
    line-height: 1.2;
  }
}

/* ---- Reorder dark mode — under 425px ---- */

@media (max-width: 425px) {
  body.dark .reorder {
    background: rgba(139, 123, 255, 0.08);
    color: #9ea5c0;
  }

  body.dark .reorder i {
    color: #8b92ab;
  }

  body.dark .reorder span {
    color: #9ea5c0;
  }
}

@media (max-width: 340px) {
  body.dark .reorder {
    background: rgba(139, 123, 255, 0.06);
    color: #8b93ad;
  }

  body.dark .reorder i {
    color: #7a82a0;
  }

  body.dark .reorder span {
    color: #8b93ad;
  }
}

@media (max-width: 300px) {
  body.dark .reorder {
    background: rgba(139, 123, 255, 0.05);
    color: #7f88a5;
  }

  body.dark .reorder i {
    color: #6d7593;
  }

  body.dark .reorder span {
    color: #7f88a5;
  }
}

/* ---- Reorder landscape — narrow height ---- */

@media (max-height: 500px) and (orientation: landscape) and (max-width: 425px) {
  .reorder {
    margin-top: 4px;
    padding: 3px 7px;
    border-radius: 6px;
    font-size: 9px;
    gap: 3px;
    line-height: 1.2;
  }

  .reorder i {
    font-size: 8px;
  }

  .reorder span {
    font-size: 9px;
    line-height: 1.2;
  }

  body.dark .reorder {
    background: rgba(139, 123, 255, 0.06);
    color: #8b93ad;
  }
}

/* ---- Reorder — very long text safety net ---- */

@media (max-width: 340px) {
  .reorder {
    max-height: 60px;
    overflow: hidden;
  }

  .reorder span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

@media (max-width: 300px) {
  .reorder {
    max-height: 48px;
  }

  .reorder span {
    -webkit-line-clamp: 2;
  }
}

.format-group select {
  width: 100%;
  height: 52px;
  border-radius: 16px;
  border: 1px solid #dde1ef;
  background: #fff;
  padding: 0 15px;
  outline: none;
  font-family: "Inter", sans-serif;
  color: #2f3547;
  font-size: 14px;
  transition: 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.format-group select:hover {
  border-color: #cbd2e8;
}

.format-group select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.format-group select option {
  color: #2f3547;
}

.pdf-mini {
  color: #ff5d5d !important;
  background: #fff1f1 !important;
}
.ppt-mini {
  color: #ff5d5d !important;
  background: #fff1f1 !important;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

@media (max-width: 500px) {
  .sfe {
    display: none;
  }
}

/* Truncate long file names with ellipsis on small screens */
@media (max-width: 500px) {
  .file-name {
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 380px) {
  .file-name {
    max-width: 120px;
  }
}

@media (max-width: 320px) {
  .file-name {
    max-width: 90px;
  }
}

.progress-text:empty {
  display: none;
}

.icon-box {
  border: 1px solid #ececff;
}

@media (max-width: 768px) {
  .page-container {
    padding-bottom: 40px !important;
  }
}
