* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #f7f8ff;
  --card: #ffffff;
  --text: #161b33;
  --muted: #727b91;
  --muted-2: #8a91a5;
  --border: #ececff;
  --primary: #6958ff;
  --primary-2: #836dff;
  --primary-soft: #f0edff;
  --success: #11b56d;
  --warning: #ff8b2d;
  --danger: #ff5d5d;
  --danger-soft: #fff3f3;
}

body {
  font-family: "Inter", sans-serif;
  background:
    radial-gradient(circle at top, rgba(105, 88, 255, 0.08), transparent 35%),
    var(--bg);
  color: var(--text);
  padding: 28px;
}

.container {
  max-width: 1150px;
  margin: 0 auto;
}

.main-card {
  padding-bottom: 10px;
}

/* HEADER */
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 34px;
  margin-bottom: 28px;
}

.left {
  flex: 1;
  min-width: 0;
}

.title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.icon-box {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f6f4ff);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  box-shadow: 0 14px 28px rgba(105, 88, 255, 0.12);
  flex: 0 0 auto;
  margin-bottom: 40px;
}

.icon-box i {
  font-size: 54px;
}

h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -1.6px;
  margin-bottom: 0px !important;
}

.desc {
  max-width: 670px;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  margin-top: 0px;
}

.features {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.feature {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  font-size: 13px;
  font-weight: 600;
  color: #5d6478;
}

.feature i {
  font-size: 13px;
  border: 7px solid #fff;
  border-radius: 50%;
  background: #fff;
}

/* TOOL BOX */
.tool-box {
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(99, 91, 255, 0.05);
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
  color: #161b33;
}

.sub {
  color: var(--muted-2);
  font-size: 13px;
  margin-bottom: 18px;
}

/* DROP ZONE */
.drop {
  border: 2px dashed #d9d2ff;
  background: linear-gradient(180deg, #ffffff, #fbfaff);
  border-radius: 22px;
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 22px;
  transition: 0.22s ease;
}

.drop.dragover {
  border-color: var(--primary);
  background: #f8f6ff;
  transform: translateY(-1px);
}

.drop.hidden {
  display: none;
}

.upload-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--primary-2), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  color: white;
  font-size: 28px;
  box-shadow: 0 12px 25px rgba(99, 91, 255, 0.25);
}

.drop h2 {
  font-size: 24px;
  margin-bottom: 10px;
  letter-spacing: -0.5px;
}

.drop p {
  color: var(--muted-2);
  margin-bottom: 18px;
  font-size: 14px;
}

/* BUTTONS */
.browse-btn,
.merge-btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.browse-btn {
  height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  background: linear-gradient(to right, var(--primary), var(--primary-2));
  color: white;
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 12px 25px rgba(99, 91, 255, 0.22);
  transition: 0.2s ease;
}

.browse-btn:hover {
  transform: translateY(-1px);
}

.browse-btn i {
  margin-right: 8px;
}

/* FILE LIST */
.files {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}

.file {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #fff;
  transition: 0.2s ease;
}

.file:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(99, 91, 255, 0.06);
}

.left-file {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.pdf-mini {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff3f3;
  color: #ff6161;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 auto;
}

.file-meta {
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 540px;
}

.size {
  font-size: 12px;
  color: var(--muted-2);
}

.trash {
  color: #9aa1b6;
  cursor: pointer;
  transition: 0.2s;
  flex: 0 0 auto;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
}

.trash:hover {
  color: #ff6161;
  background: #fff3f3;
}

/* EDITOR SECTION */
.editor-section {
  margin-top: 24px;
  display: none;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
}

.editor-section.visible {
  display: flex;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fdfcff, #f9f7ff);
  flex-wrap: wrap;
  gap: 10px;
}

.editor-header-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.editor-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-title i {
  color: var(--primary);
}

.editor-hint {
  font-size: 12px;
  color: var(--muted-2);
}

.redaction-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 50px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
}

/* TOOLBAR */
.editor-toolbar {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: #fafbff;
  flex-wrap: wrap;
  gap: 16px;
  overflow: auto;
}

.toolbar-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.toolbar-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.toolbar-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

.color-group {
  display: flex;
  gap: 6px;
}

.color-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: 0.18s ease;
}

.color-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.color-btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.color-swatch {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  display: inline-block;
  flex-shrink: 0;
}

.swatch-white {
  background: #ffffff;
  border: 1.5px solid #d0d4e8;
}

.tool-group {
  display: flex;
  gap: 6px;
}

.tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: 0.18s ease;
}

.tool-btn:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.tool-btn.danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}

.tool-btn i {
  font-size: 12px;
}

.page-wrapper {
  position: relative;
  display: inline-block;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.22);
  border-radius: 4px;
  overflow: auto;
  line-height: 0;
}

.page-containers {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 28px;
  background: #ebedf5;
}

#pdfCanvas,
#drawCanvas {
  display: block;
}

#drawCanvas {
  position: absolute;
  top: 0;
  left: 0;
  cursor: crosshair;
}

/* PAGE NAV */
.page-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #fafbff;
}

.nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.page-info {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  min-width: 110px;
  text-align: center;
}

/* INFO NOTE */
.reorder {
  margin-top: 12px;
  color: #9aa1b2;
  font-size: 12px;
  background: rgba(154, 161, 184, 0.18);
  width: max-content;
  padding: 7px 12px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.reorder svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  display: block;
}

/* SETTINGS */
.settings {
  margin-top: 22px;
}

.setting-card {
  border: 1px solid rgba(224, 227, 242, 0.95);
  border-radius: 24px;
  padding: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbff 100%);
  box-shadow: 0 14px 30px rgba(99, 91, 255, 0.06);
  width: 100%;
}

.format-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.format-group {
  min-width: 0;
}

.format-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #4f566b;
  margin-left: 7px;
}

.format-group select {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  border: 1px solid #dde1ef;
  background: #fff;
  padding: 0 16px;
  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: #6958ff;
  box-shadow: 0 0 0 4px rgba(105, 88, 255, 0.12);
}

.setting-note {
  margin-top: 10px;
  font-size: 12px;
  line-height: 1.6;
  color: #8a91a5;
  margin-left: 7px;
}

/* PROGRESS */
.progress-wrap {
  width: 100%;
  height: 10px;
  background: #ececff;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 18px;
  display: none;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(to right, #6958ff, #836dff);
  transition: width 0.25s ease;
}

.progress-text {
  margin-top: 10px;
  font-size: 13px;
  color: #7f8799;
  font-weight: 500;
  min-height: 18px;
}

/* CTA BUTTON */
.merge-btn {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(to right, var(--primary), #836dff);
  margin-top: 18px;
  color: white;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 18px 30px rgba(99, 91, 255, 0.22);
  transition: 0.22s ease;
  cursor: pointer;
  border: none;
  outline: none;
}

.merge-btn:hover {
  transform: translateY(-2px);
}

.merge-btn i {
  margin-right: 8px;
}

.merge-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none;
}

/* Custom color picker button */
.color-picker-btn {
  position: relative;
  cursor: pointer;
}

.color-picker-btn input[type="color"] {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
  border: none;
  padding: 0;
}

.color-picker-btn i {
  font-size: 13px;
}

/* ==============================================
   LARGE SCREENS — starts at 1200px
=============================================== */

@media (min-width: 1200px) {
  body {
    padding: 30px 3vw;
  }

  .page-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .container {
    max-width: 94vw !important;
    width: 94vw !important;
  }
}

/* ——— 1440 px ——— */
@media (min-width: 1440px) {
  body {
    padding: 36px 3vw;
  }
  .container {
    max-width: 94vw !important;
    width: 94vw !important;
  }

  h1 {
    font-size: 50px;
    letter-spacing: -1.8px;
  }
  .desc {
    max-width: 55vw;
    font-size: 16px;
  }

  .icon-box {
    width: 112px;
    height: 112px;
    border-radius: 20px;
  }
  .icon-box i {
    font-size: 66px;
  }

  .features {
    gap: 18px;
    margin-top: 18px;
  }
  .feature {
    font-size: 14px;
    padding: 12px 18px;
  }

  .tool-box {
    padding: 32px;
    border-radius: 28px;
  }
  .section-title {
    font-size: 21px;
  }
  .sub {
    font-size: 14px;
  }

  .drop {
    min-height: 270px;
    border-radius: 24px;
  }
  .drop h2 {
    font-size: 27px;
  }
  .drop p {
    font-size: 15px;
  }
  .upload-circle {
    width: 80px;
    height: 80px;
    font-size: 32px;
  }
  .browse-btn {
    height: 50px;
    padding: 0 26px;
    font-size: 15px;
  }

  .file {
    padding: 18px 20px;
    border-radius: 18px;
  }
  .file-name {
    font-size: 15px;
  }
  .size {
    font-size: 13px;
  }
  .pdf-mini {
    width: 46px;
    height: 46px;
    font-size: 21px;
  }

  .editor-section {
    border-radius: 26px;
  }
  .editor-header {
    padding: 18px 24px;
  }
  .editor-title {
    font-size: 16px;
  }
  .redaction-badge {
    font-size: 14px;
    padding: 9px 16px;
  }
  .editor-toolbar {
    padding: 16px 24px;
    gap: 18px;
  }
  .toolbar-label {
    font-size: 13px;
  }
  .color-btn,
  .tool-btn {
    height: 40px;
    padding: 0 16px;
    font-size: 14px;
    border-radius: 12px;
  }
  .color-swatch {
    width: 16px;
    height: 16px;
  }
  .page-containers {
    padding: 34px;
  }
  .nav-btn {
    width: 42px;
    height: 42px;
    font-size: 15px;
  }
  .page-info {
    font-size: 16px;
    min-width: 130px;
  }

  .setting-card {
    padding: 28px;
    border-radius: 26px;
  }
  .format-group label {
    font-size: 14px;
  }
  .format-group select {
    height: 56px;
    font-size: 15px;
  }
  .setting-note {
    font-size: 14px;
  }

  .merge-btn {
    height: 58px;
    font-size: 16px;
  }
}

/* ——— 1600 px ——— */
@media (min-width: 1600px) {
  body {
    padding: 38px 3vw;
  }
  h1 {
    font-size: 56px;
    letter-spacing: -2px;
  }
  .desc {
    font-size: 16.5px;
  }

  .icon-box {
    width: 120px;
    height: 120px;
  }
  .icon-box i {
    font-size: 72px;
  }

  .tool-box {
    padding: 36px;
  }
  .section-title {
    font-size: 23px;
  }
  .sub {
    font-size: 15px;
  }

  .drop {
    min-height: 290px;
  }
  .drop h2 {
    font-size: 30px;
  }
  .drop p {
    font-size: 16px;
  }
  .upload-circle {
    width: 86px;
    height: 86px;
    font-size: 34px;
  }
  .browse-btn {
    height: 54px;
    font-size: 15.5px;
  }

  .file {
    padding: 20px 22px;
  }
  .file-name {
    font-size: 16px;
  }
  .size {
    font-size: 13.5px;
  }
  .pdf-mini {
    width: 50px;
    height: 50px;
    font-size: 23px;
  }

  .setting-card {
    padding: 32px;
  }
  .format-group select {
    height: 58px;
  }
  .merge-btn {
    height: 62px;
    font-size: 17px;
  }
}

/* ——— 1920 px ——— */
@media (min-width: 1920px) {
  body {
    padding: 42px 3vw;
  }
  h1 {
    font-size: 66px;
    letter-spacing: -2.2px;
  }
  .desc {
    max-width: 52vw;
    font-size: 18px;
    line-height: 1.75;
  }
  .title {
    gap: 24px;
    margin-bottom: 20px;
  }
  .top {
    gap: 60px;
    margin-bottom: 40px;
  }

  .icon-box {
    width: 134px;
    height: 134px;
    border-radius: 24px;
  }
  .icon-box i {
    font-size: 80px;
  }

  .features {
    gap: 20px;
    margin-top: 22px;
  }
  .feature {
    font-size: 16px;
    padding: 14px 22px;
    gap: 10px;
  }
  .feature i {
    font-size: 16px;
  }

  .tool-box {
    padding: 44px;
    border-radius: 34px;
  }
  .section-title {
    font-size: 26px;
    margin-bottom: 10px;
  }
  .sub {
    font-size: 17px;
    margin-bottom: 26px;
  }

  .drop {
    min-height: 330px;
    border-radius: 28px;
  }
  .drop h2 {
    font-size: 34px;
    margin-bottom: 14px;
  }
  .drop p {
    font-size: 18px;
    margin-bottom: 28px;
  }
  .upload-circle {
    width: 96px;
    height: 96px;
    font-size: 38px;
    margin-bottom: 26px;
  }
  .browse-btn {
    height: 58px;
    padding: 0 32px;
    font-size: 17px;
    border-radius: 14px;
  }

  .files {
    gap: 16px;
  }
  .file {
    padding: 22px 26px;
    border-radius: 22px;
  }
  .left-file {
    gap: 18px;
  }
  .file-name {
    font-size: 18px;
    margin-bottom: 5px;
  }
  .size {
    font-size: 14.5px;
  }
  .pdf-mini {
    width: 56px;
    height: 56px;
    font-size: 26px;
    border-radius: 14px;
  }
  .trash {
    font-size: 18px;
  }

  .editor-section {
    border-radius: 30px;
  }
  .editor-header {
    padding: 22px 30px;
  }
  .editor-title {
    font-size: 18px;
    gap: 10px;
  }
  .editor-hint {
    font-size: 14px;
  }
  .redaction-badge {
    font-size: 15px;
    padding: 10px 18px;
    gap: 8px;
  }
  .editor-toolbar {
    padding: 20px 30px;
    gap: 22px;
  }
  .toolbar-label {
    font-size: 14px;
    letter-spacing: 0.8px;
  }
  .toolbar-divider {
    height: 40px;
  }
  .color-group,
  .tool-group {
    gap: 10px;
  }
  .color-btn,
  .tool-btn {
    height: 46px;
    padding: 0 20px;
    font-size: 15px;
    border-radius: 12px;
    border-width: 2px;
  }
  .color-btn i,
  .tool-btn i {
    font-size: 16px;
  }
  .color-swatch {
    width: 18px;
    height: 18px;
    border-radius: 6px;
  }
  .page-containers {
    padding: 44px;
    background: #dde0ec;
  }
  .page-nav {
    padding: 18px 30px;
    gap: 20px;
  }
  .nav-btn {
    width: 48px;
    height: 48px;
    font-size: 16px;
    border-radius: 12px;
    border-width: 2px;
  }
  .page-info {
    font-size: 18px;
    min-width: 140px;
  }

  .reorder {
    font-size: 14px;
    padding: 9px 16px;
    margin-top: 20px;
  }
  .reorder svg {
    width: 18px;
    height: 18px;
  }

  .setting-card {
    padding: 36px;
    border-radius: 28px;
  }
  .format-row {
    gap: 26px;
  }
  .format-group label {
    font-size: 16px;
    margin-bottom: 14px;
  }
  .format-group select {
    height: 62px;
    font-size: 16px;
    border-radius: 14px;
    padding: 0 18px;
  }
  .setting-note {
    font-size: 16px;
    margin-top: 14px;
  }

  .merge-btn {
    height: 70px;
    font-size: 19px;
    border-radius: 18px;
    margin-top: 28px;
  }
}

/* ——— 2560 px ——— */
@media (min-width: 2560px) {
  body {
    padding: 52px 3vw;
  }
  h1 {
    font-size: 84px;
    letter-spacing: -3px;
  }
  .desc {
    max-width: 50vw;
    font-size: 22px;
    line-height: 1.8;
  }
  .title {
    gap: 30px;
    margin-bottom: 28px;
  }
  .top {
    gap: 80px;
    margin-bottom: 56px;
  }

  .icon-box {
    width: 170px;
    height: 170px;
    border-radius: 30px;
  }
  .icon-box i {
    font-size: 100px;
  }

  .features {
    gap: 26px;
    margin-top: 28px;
  }
  .feature {
    font-size: 20px;
    padding: 18px 28px;
    gap: 14px;
  }
  .feature i {
    font-size: 20px;
    border-width: 10px;
  }

  .tool-box {
    padding: 60px;
    border-radius: 42px;
  }
  .section-title {
    font-size: 34px;
    margin-bottom: 14px;
  }
  .sub {
    font-size: 21px;
    margin-bottom: 34px;
  }

  .drop {
    min-height: 430px;
    border-radius: 36px;
    border-width: 3px;
  }
  .drop h2 {
    font-size: 48px;
    margin-bottom: 18px;
    letter-spacing: -1px;
  }
  .drop p {
    font-size: 23px;
    margin-bottom: 38px;
  }
  .upload-circle {
    width: 124px;
    height: 124px;
    font-size: 52px;
    margin-bottom: 34px;
    box-shadow: 0 24px 48px rgba(99, 91, 255, 0.3);
  }
  .browse-btn {
    height: 78px;
    padding: 0 48px;
    font-size: 21px;
    border-radius: 20px;
  }

  .files {
    gap: 24px;
  }
  .file {
    padding: 30px 36px;
    border-radius: 28px;
  }
  .left-file {
    gap: 26px;
  }
  .file-name {
    font-size: 23px;
    margin-bottom: 7px;
  }
  .size {
    font-size: 18px;
  }
  .pdf-mini {
    width: 74px;
    height: 74px;
    font-size: 34px;
    border-radius: 18px;
  }
  .trash {
    font-size: 26px;
  }

  .editor-section {
    border-radius: 38px;
  }
  .editor-header {
    padding: 28px 40px;
  }
  .editor-title {
    font-size: 24px;
    gap: 14px;
  }
  .editor-hint {
    font-size: 18px;
  }
  .redaction-badge {
    font-size: 19px;
    padding: 14px 22px;
    border-radius: 999px;
  }
  .editor-toolbar {
    padding: 26px 40px;
    gap: 28px;
  }
  .toolbar-label {
    font-size: 18px;
    letter-spacing: 1px;
  }
  .toolbar-divider {
    height: 54px;
  }
  .color-group,
  .tool-group {
    gap: 14px;
  }
  .color-btn,
  .tool-btn {
    height: 60px;
    padding: 0 28px;
    font-size: 19px;
    border-radius: 16px;
    border-width: 2px;
  }
  .color-btn i,
  .tool-btn i {
    font-size: 22px;
  }
  .color-swatch {
    width: 22px;
    height: 22px;
    border-radius: 8px;
  }
  .page-containers {
    padding: 60px;
    background: #d2d6e8;
  }
  .page-nav {
    padding: 24px 40px;
    gap: 26px;
  }
  .nav-btn {
    width: 62px;
    height: 62px;
    font-size: 22px;
    border-radius: 16px;
    border-width: 2px;
  }
  .page-info {
    font-size: 22px;
    min-width: 180px;
  }

  .reorder {
    font-size: 18px;
    padding: 12px 22px;
    margin-top: 26px;
    border-radius: 50px;
    gap: 12px;
  }
  .reorder svg {
    width: 22px;
    height: 22px;
  }

  .setting-card {
    padding: 44px;
    border-radius: 34px;
  }
  .format-row {
    gap: 34px;
  }
  .format-group label {
    font-size: 20px;
    margin-bottom: 20px;
    margin-left: 10px;
  }
  .format-group select {
    height: 78px;
    font-size: 19px;
    border-radius: 18px;
    padding: 0 24px;
  }
  .setting-note {
    font-size: 20px;
    margin-top: 18px;
    margin-left: 10px;
  }

  .merge-btn {
    height: 88px;
    font-size: 23px;
    border-radius: 24px;
    margin-top: 36px;
    box-shadow: 0 24px 48px rgba(99, 91, 255, 0.28);
  }
}

/* =========================
   SMALL SCREENS
========================= */

@media (max-width: 950px) {
  .top {
    flex-direction: column;
    align-items: flex-start;
  }
  .format-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .format-row {
    grid-template-columns: 1fr;
  }
  .editor-toolbar {
    gap: 10px;
  }
  .toolbar-divider {
    display: none;
  }
}

@media (max-width: 600px) {
  body {
    padding: 14px;
  }
  .main-card {
    padding: 18px;
  }
  .tool-box {
    padding: 18px;
    border-radius: 20px;
  }
  .title {
    align-items: flex-start;
  }
  .icon-box {
    width: 74px;
    height: 74px;
  }
  .icon-box i {
    font-size: 40px;
  }
  h1 {
    font-size: 32px;
  }
  .drop h2 {
    font-size: 20px;
  }
  .drop {
    min-height: 220px;
    padding: 16px;
  }
  .file-name {
    max-width: 180px;
  }
  .page-containers {
    padding: 14px;
  }
}

@media (max-width: 425px) {
  body {
    padding: 10px;
    font-size: 13px;
  }
  .main-card {
    padding-bottom: 0;
  }
  h1 {
    font-size: 26px;
    line-height: 1.15;
  }
  .desc {
    font-size: 13px;
    line-height: 1.6;
  }
  .section-title {
    font-size: 16px;
  }
  .sub {
    font-size: 12px;
  }
  .feature {
    font-size: 12px;
    padding: 9px 12px;
    gap: 6px;
  }
  .feature i {
    font-size: 12px;
  }
  .drop h2 {
    font-size: 18px;
  }
  .drop p {
    font-size: 12px;
  }
  .browse-btn,
  .merge-btn {
    font-size: 13px;
    height: 46px;
  }
  .file-name {
    font-size: 13px;
  }
  .size {
    font-size: 11px;
  }
  .setting-card label {
    font-size: 12px;
  }
  .format-group select {
    font-size: 13px;
    height: 46px;
  }
  .tool-btn,
  .color-btn {
    font-size: 12px;
    height: 34px;
    padding: 0 10px;
  }
  .nav-btn {
    width: 34px;
    height: 34px;
  }
  .page-info {
    font-size: 13px;
  }
  .icon-box {
    display: none;
  }
  .tool-box,
  .setting-card,
  .editor-section {
    border-radius: 16px;
  }
  .drop {
    min-height: 180px;
    padding: 16px;
  }
  .settings {
    gap: 12px;
  }
  .editor-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .toolbar-section {
    flex-wrap: wrap;
  }
  .color-group,
  .tool-group {
    width: 100%;
  }
  .color-btn,
  .tool-btn {
    flex: 1;
    justify-content: center;
  }
  .page-nav {
    flex-wrap: wrap;
  }
  .page-info {
    order: 2;
    width: 100%;
  }
  .nav-btn {
    order: 1;
  }
}

@media (max-width: 375px) {
  body {
    padding: 8px;
    font-size: 12.5px;
  }
  h1 {
    font-size: 23px;
    line-height: 1.2;
  }
  .desc {
    font-size: 12px;
    line-height: 1.5;
  }
  .section-title {
    font-size: 15px;
  }
  .sub {
    font-size: 11.5px;
  }
  .title {
    gap: 10px;
  }
  .feature {
    font-size: 11.5px;
    padding: 8px 10px;
  }
  .drop {
    min-height: 165px;
    padding: 14px;
    border-radius: 16px;
  }
  .drop h2 {
    font-size: 17px;
  }
  .drop p {
    font-size: 11.5px;
  }
  .upload-circle {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }
  .browse-btn,
  .merge-btn {
    font-size: 12.5px;
    height: 44px;
    border-radius: 10px;
  }
  .file {
    padding: 12px;
  }
  .file-name {
    font-size: 12.5px;
  }
  .size {
    font-size: 10.5px;
  }
  .pdf-mini {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }
  .setting-card {
    padding: 12px;
    border-radius: 14px;
  }
  .setting-card label {
    font-size: 11.5px;
  }
  .format-group select {
    font-size: 12.5px;
    height: 42px;
    border-radius: 10px;
  }
  .setting-note {
    font-size: 11px;
  }
  .editor-title {
    font-size: 13px;
  }
  .redaction-badge {
    font-size: 11px;
    padding: 6px 10px;
  }
  .toolbar-label {
    font-size: 11px;
  }
  .tool-btn,
  .color-btn {
    height: 32px;
    font-size: 11px;
  }
  .color-swatch {
    width: 12px;
    height: 12px;
  }
  .reorder {
    font-size: 10.5px;
    padding: 5px 9px;
  }
  .tool-box {
    padding: 12px;
    border-radius: 16px;
  }
  .icon-box {
    display: none;
  }
}

@media (max-width: 325px) {
  body {
    padding: 6px;
    font-size: 12px;
  }
  .tool-box,
  .setting-card,
  .editor-section {
    padding: 10px;
    border-radius: 12px;
  }
  h1 {
    font-size: 21px;
    line-height: 1.18;
  }
  .desc {
    font-size: 11.5px;
    line-height: 1.45;
  }
  .section-title {
    font-size: 14px;
  }
  .sub {
    font-size: 10.5px;
  }
  .title {
    gap: 8px;
  }
  .feature {
    font-size: 10.5px;
    padding: 7px 9px;
    gap: 5px;
  }
  .drop {
    min-height: 150px;
    padding: 12px;
    border-radius: 14px;
  }
  .drop h2 {
    font-size: 15px;
  }
  .drop p {
    font-size: 10.5px;
    margin-bottom: 14px;
  }
  .upload-circle {
    width: 48px;
    height: 48px;
    font-size: 20px;
    margin-bottom: 14px;
  }
  .browse-btn,
  .merge-btn {
    height: 42px;
    font-size: 12px;
    border-radius: 10px;
  }
  .file {
    padding: 10px;
    border-radius: 12px;
  }
  .left-file {
    gap: 8px;
  }
  .pdf-mini {
    width: 32px;
    height: 32px;
    font-size: 15px;
    border-radius: 10px;
  }
  .file-name {
    font-size: 12px;
  }
  .size {
    font-size: 10px;
  }
  .setting-card label {
    font-size: 11px;
    margin-bottom: 8px;
  }
  .format-group select {
    height: 40px;
    font-size: 12px;
    border-radius: 10px;
  }
  .setting-note {
    font-size: 10px;
  }
  .tool-btn,
  .color-btn {
    height: 30px;
    font-size: 10px;
    padding: 0 8px;
  }
  .nav-btn {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }
  .page-info {
    font-size: 12px;
  }
  .reorder {
    font-size: 10px;
    padding: 4px 8px;
    gap: 4px;
  }
  .icon-box {
    display: none;
  }
}

/* =========================
   REDACT PDF - DARK MODE
========================= */

body.dark {
  color-scheme: dark;

  --bg: #0b1220;
  --card: #111827;
  --card-2: #0f172a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --border: rgba(148, 163, 184, 0.14);
  --primary: #ef4444;
  --primary-2: #b91c1c;
  --primary-soft: rgba(239, 68, 68, 0.12);
  --danger: #f87171;
  --danger-soft: rgba(239, 68, 68, 0.1);
}

body.dark {
  background:
    radial-gradient(circle at top, rgba(139, 123, 255, 0.12), transparent 35%),
    var(--bg);
  color: var(--text);
}

/* Main layout */
body.dark .tool-box,
body.dark .setting-card,
body.dark .drop,
body.dark .files,
body.dark .editor-section,
body.dark .page-nav {
  background: var(--card) !important;
  border-color: var(--border) !important;
  box-shadow: none !important;
}

/* Titles & text */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark .section-title,
body.dark .editor-title {
  color: #ffffff !important;
}

body.dark p,
body.dark .desc,
body.dark .sub,
body.dark label,
body.dark .editor-hint,
body.dark .setting-note,
body.dark .page-info {
  color: var(--muted) !important;
}

/* Features */
body.dark .features {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Drop zone */
body.dark .drop {
  background: var(--card-2) !important;
  border: 1px dashed rgba(148, 163, 184, 0.25) !important;
}

body.dark .drop h2 {
  color: #ffffff !important;
}
body.dark .drop p {
  color: var(--muted) !important;
}

body.dark .upload-circle {
  background: linear-gradient(
    to bottom,
    var(--primary),
    var(--primary-2)
  ) !important;
  box-shadow: 0 12px 25px rgba(99, 91, 255, 0.25);
}

/* Buttons */
body.dark .browse-btn,
body.dark .merge-btn {
  background: linear-gradient(
    to right,
    var(--primary),
    var(--primary-2)
  ) !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28) !important;
}

body.dark .browse-btn:hover,
body.dark .merge-btn:hover {
  filter: brightness(1.1);
}

body.dark .tool-btn {
  background: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
  color: #e2e8f0 !important;
}

body.dark .tool-btn:hover {
  background: #1f2937 !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

body.dark .tool-btn.danger {
  border-color: rgba(239, 68, 68, 0.3) !important;
  color: #fca5a5 !important;
}

body.dark .tool-btn.danger:hover {
  background: var(--danger-soft) !important;
  border-color: var(--danger) !important;
  color: #ffffff !important;
}

/* Editor toolbar */
body.dark .editor-header {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

body.dark .editor-toolbar {
  background: #0f172a !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

body.dark .toolbar-label {
  color: var(--muted) !important;
}

body.dark .toolbar-divider {
  background: rgba(148, 163, 184, 0.12) !important;
}

body.dark .color-btn {
  background: #111827 !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  color: #e2e8f0 !important;
}

body.dark .color-btn:hover {
  border-color: var(--primary) !important;
  background: #1f2937 !important;
}

body.dark .color-btn.active {
  border-color: var(--primary) !important;
  background: var(--primary-soft) !important;
  color: #ffffff !important;
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.25);
}

body.dark .swatch-white {
  border-color: rgba(148, 163, 184, 0.4);
}

body.dark .redaction-badge {
  background: var(--primary-soft) !important;
  color: var(--danger) !important;
}

/* Canvas container */
body.dark .page-containers {
  background: #0b1220 !important;
}

body.dark .page-wrapper {
  background: #0f172a !important;
  border: 1px solid rgba(148, 163, 184, 0.12) !important;
  box-shadow: none !important;
}

/* Navigation */
body.dark .page-nav {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.12) !important;
}

body.dark .nav-btn {
  background: #0f172a !important;
  color: #e2e8f0 !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
}

body.dark .nav-btn:hover:not(:disabled) {
  background: #1f2937 !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

/* Settings */
body.dark .setting-card {
  background: var(--card) !important;
  border-color: var(--border) !important;
}

body.dark .format-group {
  background: transparent !important;
  border: none !important;
}

body.dark select {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
}

body.dark select:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* File list */
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-name {
  color: #f8fafc !important;
}
body.dark .size {
  color: #94a3b8 !important;
}

body.dark .pdf-mini {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
}

body.dark .trash {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

body.dark .trash:hover {
  background: #dc2626 !important;
  color: white !important;
}

/* Progress */
body.dark .progress-wrap {
  background: #1e293b !important;
}

body.dark .progress-bar {
  background: linear-gradient(90deg, #ef4444, #b91c1c) !important;
}

/* Reorder notice */
body.dark .reorder {
  background: rgba(148, 163, 184, 0.06) !important;
  border: 1px solid rgba(148, 163, 184, 0.1) !important;
  color: #94a3b8 !important;
}

body.dark .reorder svg {
  color: #ef4444 !important;
}

/* Inputs/selects */
body.dark input,
body.dark textarea {
  background: #0f172a !important;
  color: #f8fafc !important;
  border: 1px solid rgba(148, 163, 184, 0.18) !important;
}

body.dark input:focus,
body.dark textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
  outline: none;
}

/* Scrollbar */
body.dark ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body.dark ::-webkit-scrollbar-track {
  background: #0f162a;
}
body.dark ::-webkit-scrollbar-thumb {
  background: #283552;
  border-radius: 999px;
}
body.dark ::-webkit-scrollbar-thumb:hover {
  background: #34456a;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  body.dark .main-card,
  body.dark .tool-box,
  body.dark .setting-card,
  body.dark .drop,
  body.dark .editor-section {
    border-radius: 22px;
  }

  body.dark .editor-toolbar {
    flex-direction: column;
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .page-container {
    padding-left: 0px !important;
    padding-right: 0px !important;
    padding-top: 0px !important;
  }
}
