* {
  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;
}

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: 1180px;
  margin: 0 auto; /* Centered horizontally */
}

.top {
  margin-bottom: 30px;
}

.title {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.icon-box {
  width: 100px;
  height: 100px;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff, #f5f3ff);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 18px 40px rgba(99, 91, 255, 0.14);
  color: var(--primary);
  flex-shrink: 0;
  margin-bottom: 20px;
}

.icon-box i {
  font-size: 56px;
}

h1 {
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -2px;
  margin-bottom: 0px !important;
}

.desc {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.8;
  font-size: 15px;
  margin-top: 0px;
}

.features {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  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;
}

.feature:nth-child(1) i {
  color: var(--primary);
}

.feature:nth-child(2) i {
  color: var(--success);
}

.feature:nth-child(3) i {
  color: #4d8dff;
}

.feature:nth-child(4) i {
  color: var(--warning);
}

.tool-box {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 14px 35px rgba(99, 91, 255, 0.06);
}

.section-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.sub {
  font-size: 14px;
  color: var(--muted-2);
  margin-bottom: 22px;
  line-height: 1.7;
}

.drop {
  min-height: 260px;
  border-radius: 24px;
  border: 2px dashed #d7d2ff;
  background: linear-gradient(180deg, #ffffff, #faf9ff);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  transition: 0.25s ease;
}

.drop.dragover {
  border-color: var(--primary);
  background: #f8f6ff;
  transform: translateY(-1px);
}

.upload-circle {
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: linear-gradient(to bottom, var(--primary-2), var(--primary));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  color: white;
  font-size: 30px;
  box-shadow: 0 18px 35px rgba(99, 91, 255, 0.3);
}

.drop h2 {
  font-size: 28px;
  margin-bottom: 12px;
  letter-spacing: -1px;
}

.drop p {
  color: var(--muted-2);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.7;
}

.browse-btn,
.convert-btn,
.secondary-btn {
  border: none;
  outline: none;
  cursor: pointer;
  font-family: inherit;
}

.browse-btn {
  height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  background: linear-gradient(to right, var(--primary), var(--primary-2));
  color: white;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 14px 30px rgba(99, 91, 255, 0.22);
  transition: 0.2s ease;
}

.browse-btn:hover {
  transform: translateY(-2px);
}

.browse-btn i {
  margin-right: 8px;
}

.files {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: white;
  border: 1px solid #ececff;
  border-radius: 18px;
  padding: 16px;
  transition: 0.2s ease;
}

.file:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 25px rgba(99, 91, 255, 0.06);
}

.left-file {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.img-mini {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef3ff;
  color: #4d8dff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.file-meta {
  min-width: 0;
}

.file-name {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 500px;
}

.size {
  color: var(--muted-2);
  font-size: 12px;
}

.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: var(--danger);
}

.reorder {
  margin-top: 14px;
  width: max-content;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(154, 161, 184, 0.14);
  color: #8b93a8;
  font-size: 12px;
  font-weight: 600;
}

.settings {
  margin-top: 24px;
}

.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.05);
}

.format-row,
.custom-size-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.custom-size-row {
  margin-top: 18px;
  grid-template-columns: repeat(2, 1fr);
}

.format-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #4f566b;
}

.format-group select,
.format-group input,
.format-group textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid #dde1ef;
  background: white;
  padding: 0 15px;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #2f3547;
  transition: 0.22s ease;
}

.format-group select,
.format-group input {
  height: 54px;
}

.code-box {
  text-align: left;
}

.code-box label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #4f566b;
}

.code-box textarea {
  width: 100%;
  min-height: 170px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid #dde1ef;
  background: white;
  padding: 14px 15px;
  outline: none;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #2f3547;
  line-height: 1.7;
  transition: 0.22s ease;
}

.code-box textarea:focus,
.format-group select:focus,
.format-group input:focus {
  border-color: #6958ff;
  box-shadow: 0 0 0 4px rgba(105, 88, 255, 0.12);
}

.extra-options {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.option-box {
  background: white;
  border: 1px solid #ececff;
  border-radius: 18px;
  padding: 18px;
}

.option-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.option-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: #f3f1ff;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.option-box h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.option-box p {
  font-size: 13px;
  color: #7f8799;
  line-height: 1.6;
  margin: 5px 0 0 0;
}

.switch {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.switch label {
  font-size: 13px;
  font-weight: 600;
  color: #555d74;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: #6958ff;
}

.progress-wrap {
  width: 100%;
  height: 10px;
  background: #ececff;
  border-radius: 999px;
  overflow: hidden;
  margin-top: 22px;
  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;
  color: #7f8799;
  font-size: 13px;
  font-weight: 600;
  min-height: 20px;
}

.convert-btn {
  width: 100%;
  height: 58px;
  border-radius: 16px;
  margin-top: 22px;
  background: linear-gradient(to right, var(--primary), var(--primary-2));
  color: white;
  font-size: 15px;
  font-weight: 800;
  box-shadow: 0 18px 35px rgba(99, 91, 255, 0.24);
  transition: 0.22s ease;
}

.convert-btn:hover {
  transform: translateY(-2px);
}

.convert-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.convert-btn i {
  margin-right: 8px;
}

/* Split Layout & Preview */
.split-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.preview-box {
  margin-top: 24px;
  width: 100%;
  height: clamp(500px, 85vh, 1500px);
  background: #ffffff;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid #ecebff;
  box-shadow:
    0 12px 35px rgba(99, 91, 255, 0.08),
    0 2px 10px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
}

.preview-box[hidden] {
  display: none !important;
}

.preview-topbar {
  height: 64px;
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, #ffffff, #faf9ff);
  border-bottom: 1px solid #ecebff;
  flex-shrink: 0;
}

.preview-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: #161b33;
}

.preview-heading i {
  color: #6958ff;
}

.preview-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.preview-action-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 14px;
  background: #f4f3ff;
  color: #6958ff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.preview-action-btn:hover {
  background: #6958ff;
  color: #fff;
  transform: translateY(-1px);
}

.preview-action-btn.close:hover {
  background: #ff4d67;
}

.preview-body {
  flex: 1;
  overflow: hidden;
  background: #f8f7ff;
}

.preview-frame {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: white;
}

.small-note {
  margin-top: 14px;
  font-size: 12px;
  color: #8a91a5;
  line-height: 1.6;
}

.input-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.url-box {
  display: flex;
  gap: 10px;
}

.url-box input {
  flex: 1;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid #ddd;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}

.url-box button {
  padding: 14px 18px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  background: #1a2140;
  color: white;
  font-weight: 700;
  font-family: inherit;
}

/* ==============================================
   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;
  }

  h1 {
    font-size: 52px;
  }

  .desc {
    font-size: 16px;
    max-width: 60vw;
  }

  .icon-box {
    width: 112px;
    height: 112px;
    border-radius: 26px;
  }

  .icon-box i {
    font-size: 62px;
  }

  .feature {
    font-size: 14px;
    padding: 13px 18px;
  }

  .tool-box {
    padding: 34px;
    border-radius: 32px;
  }

  .section-title {
    font-size: 22px;
  }

  .drop {
    min-height: 300px;
    border-radius: 28px;
  }

  .upload-circle {
    width: 90px;
    height: 90px;
    font-size: 34px;
  }

  .drop h2 {
    font-size: 32px;
  }

  .drop p {
    font-size: 15px;
  }

  .browse-btn {
    height: 56px;
    font-size: 15px;
  }

  .img-mini {
    width: 54px;
    height: 54px;
    font-size: 22px;
  }

  .file-name {
    font-size: 15px;
    max-width: 650px;
  }

  .format-group select,
  .format-group input {
    height: 58px;
    font-size: 15px;
  }

  .code-box textarea {
    min-height: 200px;
    font-size: 15px;
  }

  .convert-btn {
    height: 62px;
    font-size: 16px;
  }

  .preview-topbar {
    height: 70px;
  }

  .preview-heading {
    font-size: 19px;
  }
}

/* ——— 1600 px ——— */
@media (min-width: 1600px) {
  body {
    padding: 38px 3vw;
  }

  h1 {
    font-size: 58px;
  }

  .desc {
    font-size: 17px;
  }

  .icon-box {
    width: 120px;
    height: 120px;
  }

  .icon-box i {
    font-size: 68px;
  }

  .tool-box {
    padding: 40px;
  }

  .drop {
    min-height: 340px;
  }

  .upload-circle {
    width: 96px;
    height: 96px;
    font-size: 36px;
  }

  .drop h2 {
    font-size: 36px;
  }

  .browse-btn {
    height: 60px;
    font-size: 16px;
  }

  .format-group select,
  .format-group input {
    height: 62px;
  }

  .convert-btn {
    height: 66px;
    font-size: 17px;
  }
}

/* ——— 1920 px ——— */
@media (min-width: 1920px) {
  body {
    padding: 42px 3vw;
  }

  h1 {
    font-size: 68px;
    letter-spacing: -2.5px;
  }

  .desc {
    max-width: 54vw;
    font-size: 18px;
    line-height: 1.8;
  }

  .top {
    margin-bottom: 40px;
  }

  .title {
    gap: 24px;
  }

  .icon-box {
    width: 132px;
    height: 132px;
    border-radius: 30px;
  }

  .icon-box i {
    font-size: 78px;
  }

  .features {
    gap: 20px;
    margin-top: 24px;
  }

  .feature {
    font-size: 16px;
    padding: 15px 22px;
    gap: 10px;
  }

  .feature i {
    font-size: 16px;
  }

  .tool-box {
    padding: 48px;
    border-radius: 36px;
  }

  .section-title {
    font-size: 26px;
  }

  .drop {
    min-height: 400px;
    border-width: 3px;
    border-radius: 32px;
  }

  .upload-circle {
    width: 106px;
    height: 106px;
    font-size: 40px;
    margin-bottom: 28px;
  }

  .drop h2 {
    font-size: 42px;
  }

  .drop p {
    font-size: 18px;
    margin-bottom: 30px;
  }

  .browse-btn {
    height: 66px;
    padding: 0 28px;
    font-size: 17px;
    border-radius: 16px;
  }

  .file {
    padding: 22px 24px;
    border-radius: 22px;
  }

  .img-mini {
    width: 62px;
    height: 62px;
    font-size: 26px;
    border-radius: 16px;
  }

  .file-name {
    font-size: 18px;
    max-width: 900px;
  }

  .trash {
    width: 50px;
    height: 50px;
    font-size: 20px;
    border-radius: 16px;
  }

  .setting-card {
    padding: 32px;
    border-radius: 28px;
  }

  .format-group select,
  .format-group input {
    height: 66px;
    font-size: 16px;
    border-radius: 18px;
    padding: 0 18px;
  }

  .code-box textarea {
    min-height: 240px;
    font-size: 16px;
    border-radius: 22px;
    padding: 18px;
  }

  .convert-btn {
    height: 72px;
    font-size: 19px;
    border-radius: 20px;
  }

  .preview-topbar {
    height: 78px;
    padding: 0 28px;
  }

  .preview-heading {
    font-size: 22px;
    gap: 14px;
  }

  .preview-action-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
  }
}

/* ——— 2560 px ——— */
@media (min-width: 2560px) {
  body {
    padding: 52px 3vw;
  }

  h1 {
    font-size: 88px;
    letter-spacing: -3.5px;
  }

  .desc {
    max-width: 50vw;
    font-size: 22px;
    line-height: 1.9;
  }

  .top {
    margin-bottom: 56px;
  }

  .title {
    gap: 30px;
  }

  .icon-box {
    width: 170px;
    height: 170px;
    border-radius: 38px;
  }

  .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: 9px;
  }

  .tool-box {
    padding: 64px;
    border-radius: 48px;
  }

  .section-title {
    font-size: 34px;
  }

  .drop {
    min-height: 520px;
    border-width: 4px;
    border-radius: 40px;
  }

  .upload-circle {
    width: 132px;
    height: 132px;
    font-size: 52px;
    margin-bottom: 36px;
  }

  .drop h2 {
    font-size: 54px;
  }

  .drop p {
    font-size: 22px;
    margin-bottom: 40px;
  }

  .browse-btn {
    height: 84px;
    padding: 0 36px;
    font-size: 21px;
    border-radius: 20px;
  }

  .file {
    padding: 30px 36px;
    border-radius: 28px;
  }

  .img-mini {
    width: 82px;
    height: 82px;
    font-size: 34px;
    border-radius: 22px;
  }

  .file-name {
    font-size: 23px;
    max-width: 1400px;
  }

  .trash {
    width: 68px;
    height: 68px;
    font-size: 28px;
    border-radius: 20px;
  }

  .setting-card {
    padding: 48px;
    border-radius: 36px;
  }

  .format-group select,
  .format-group input {
    height: 82px;
    font-size: 20px;
    border-radius: 22px;
    padding: 0 24px;
  }

  .code-box textarea {
    min-height: 340px;
    font-size: 20px;
    border-radius: 28px;
    padding: 24px;
  }

  .convert-btn {
    height: 92px;
    font-size: 24px;
    border-radius: 24px;
  }

  .preview-topbar {
    height: 96px;
    padding: 0 36px;
  }

  .preview-heading {
    font-size: 28px;
    gap: 18px;
  }

  .preview-action-btn {
    width: 60px;
    height: 60px;
    border-radius: 20px;
  }
}

/* =========================
   EXISTING RESPONSIVE (small/medium screens)
========================= */

@media (max-width: 950px) {
  .format-row,
  .custom-size-row,
  .extra-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .icon-box {
    display: none;
  }

  .feature {
    padding: 11px 16px 11px 0px;
  }
}

@media (max-width: 650px) {
  body {
    padding: 14px;
  }

  .tool-box,
  .preview-box,
  .setting-card {
    padding: 18px;
    border-radius: 22px;
  }

  .title {
    flex-direction: column;
    align-items: flex-start;
  }

  h1 {
    font-size: 34px;
  }

  .drop {
    min-height: 240px;
  }

  .drop h2 {
    font-size: 22px;
  }

  .file-name {
    max-width: 180px;
  }

  .browse-btn,
  .convert-btn {
    width: 100%;
  }

  .url-box {
    flex-direction: column;
  }

  .preview-frame {
    height: 320px;
  }
}

/* =========================
   MOBILE BREAKPOINTS
========================= */

@media (max-width: 425px) {
  body {
    padding: 10px;
    font-size: 13px;
  }

  h1 {
    font-size: 26px;
    letter-spacing: -1px;
  }

  .desc {
    font-size: 13px;
    line-height: 1.6;
  }

  .section-title {
    font-size: 17px;
  }

  .feature {
    font-size: 11px;
    padding: 7px 8px;
    gap: 5px;
  }

  .feature i {
    font-size: 11px;
    border-width: 5px;
  }

  .tool-box {
    padding: 14px;
    border-radius: 18px;
  }

  .drop {
    min-height: 200px;
    padding: 18px;
    border-radius: 18px;
  }

  .upload-circle {
    width: 60px;
    height: 60px;
    font-size: 24px;
    margin-bottom: 14px;
  }

  .drop h2 {
    font-size: 22px;
  }

  .drop p {
    font-size: 12px;
  }

  .browse-btn {
    height: 44px;
    font-size: 13px;
  }

  .file {
    padding: 12px;
    border-radius: 14px;
  }

  .img-mini {
    width: 36px;
    height: 36px;
    font-size: 15px;
    border-radius: 10px;
  }

  .file-name {
    font-size: 13px;
    max-width: 130px;
  }

  .trash {
    width: 36px;
    height: 36px;
    font-size: 14px;
  }

  .setting-card {
    padding: 14px;
    border-radius: 18px;
  }

  .format-group select,
  .format-group input {
    height: 44px;
    font-size: 13px;
  }

  .code-box textarea {
    min-height: 140px;
    font-size: 13px;
    padding: 12px;
  }

  .convert-btn {
    height: 48px;
    font-size: 14px;
  }

  .preview-topbar {
    height: 54px;
    padding: 0 14px;
  }

  .preview-heading {
    font-size: 15px;
  }

  .preview-action-btn {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 375px) {
  body {
    padding: 8px;
    font-size: 12.5px;
  }

  h1 {
    font-size: 23px;
  }

  .desc {
    font-size: 12px;
  }

  .feature {
    font-size: 10.5px;
    padding: 6px 7px;
  }

  .drop {
    min-height: 180px;
    padding: 16px;
    border-radius: 16px;
  }

  .upload-circle {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  .drop h2 {
    font-size: 20px;
  }

  .browse-btn {
    height: 42px;
    font-size: 12.5px;
  }

  .format-group select,
  .format-group input {
    height: 42px;
    font-size: 12.5px;
  }

  .convert-btn {
    height: 46px;
    font-size: 13px;
  }
}

@media (max-width: 325px) {
  body {
    padding: 6px;
    font-size: 12px;
  }

  h1 {
    font-size: 21px;
  }

  .desc {
    font-size: 11.5px;
  }

  .feature {
    font-size: 10px;
    padding: 5px 6px;
    gap: 4px;
  }

  .tool-box {
    padding: 10px;
    border-radius: 14px;
  }

  .drop {
    min-height: 160px;
    padding: 14px;
    border-radius: 14px;
  }

  .upload-circle {
    width: 46px;
    height: 46px;
    font-size: 20px;
  }

  .drop h2 {
    font-size: 18px;
  }

  .browse-btn {
    height: 40px;
    font-size: 12px;
  }

  .file {
    padding: 10px;
    border-radius: 12px;
  }

  .img-mini {
    width: 30px;
    height: 30px;
    font-size: 13px;
    border-radius: 8px;
  }

  .file-name {
    font-size: 12px;
    max-width: 90px;
  }

  .trash {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .setting-card {
    padding: 10px;
    border-radius: 14px;
  }

  .format-group select,
  .format-group input {
    height: 40px;
    font-size: 12px;
    border-radius: 10px;
  }

  .code-box textarea {
    min-height: 120px;
    font-size: 12px;
    padding: 10px;
    border-radius: 12px;
  }

  .convert-btn {
    height: 42px;
    font-size: 12px;
    border-radius: 10px;
  }

  .preview-topbar {
    height: 48px;
    padding: 0 10px;
  }

  .preview-heading {
    font-size: 13px;
  }

  .preview-action-btn {
    width: 32px;
    height: 32px;
    border-radius: 10px;
  }
}

/* =========================
   DARK MODE (Consolidated)
========================= */

body.dark {
  color-scheme: dark;
  --bg: #0b1020;
  --card: #11172a;
  --card-2: #0f1628;
  --text: #edf2ff;
  --muted: #a7b0ca;
  --muted-2: #8d97b4;
  --border: #24304a;
  --primary: #8b7bff;
  --primary-2: #a18fff;
  --primary-soft: #1a2140;
  --success: #32d583;
  --warning: #ff8b2d;
  --danger: #ff6b6b;
}

body.dark {
  background:
    radial-gradient(circle at top, rgba(139, 123, 255, 0.12), transparent 35%),
    var(--bg);
  color: var(--text);
}

/* Main Containers */
body.dark .tool-box,
body.dark .setting-card,
body.dark .drop,
body.dark .files,
body.dark .progress-wrap,
body.dark .progress-container,
body.dark .option-box,
body.dark .split-layout,
body.dark .preview-box,
body.dark .preview-topbar,
body.dark .preview-body,
body.dark .code-box,
body.dark .custom-size-row,
body.dark .extra-options {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.14) !important;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.28);
}

/* Text */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark .section-title,
body.dark .preview-heading {
  color: #f8fafc !important;
}

body.dark .desc,
body.dark .sub,
body.dark .progress-text,
body.dark .reorder span,
body.dark .drop p,
body.dark label,
body.dark p,
body.dark .small-note {
  color: var(--muted) !important;
}

/* Icons */
body.dark .icon-box,
body.dark .upload-circle {
  background: #17213a;
  border: 1px solid var(--border);
  color: #ffffff;
}

/* Features */
body.dark .features {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

body.dark .feature {
  background: transparent !important;
  border: 1px solid var(--border);
  color: var(--muted) !important;
  box-shadow: none !important;
  border-radius: 999px;
}

body.dark .feature i {
  color: var(--primary-2) !important;
  border-color: transparent !important;
  background: transparent !important;
}

/* Dropzone */
body.dark .drop {
  background: linear-gradient(180deg, #11172a, #0e1526);
  border: 2px dashed #2a3550;
}

body.dark .drop:hover,
body.dark .drop.dragover {
  background: #121b33;
  border-color: var(--primary);
}

body.dark .drop h2 {
  color: var(--text);
}

/* Buttons */
body.dark .browse-btn,
body.dark .convert-btn {
  background: linear-gradient(to right, var(--primary), var(--primary-2));
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

body.dark .browse-btn:hover,
body.dark .convert-btn:hover {
  filter: brightness(1.08);
}

body.dark .convert-btn:disabled {
  background: #1a2338;
  border-color: var(--border);
  box-shadow: none;
  opacity: 0.75;
}

/* Info Bar */
body.dark .reorder {
  background: rgba(139, 123, 255, 0.12);
  color: #c8cfff;
}

/* File Items */
body.dark .file {
  background: #0f172a !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28) !important;
}

body.dark .file:hover {
  border-color: rgba(139, 123, 255, 0.4) !important;
  background: #131d33 !important;
}

body.dark .file-name {
  color: #f8fafc !important;
}

body.dark .size {
  color: var(--muted) !important;
}

body.dark .img-mini {
  background: rgba(59, 130, 246, 0.12) !important;
  color: #60a5fa !important;
}

body.dark .trash {
  color: #64748b;
  background: transparent;
}

body.dark .trash:hover {
  background: rgba(255, 93, 93, 0.1) !important;
  color: var(--danger) !important;
}

/* Inputs, Textareas, Selects */
body.dark input,
body.dark select,
body.dark textarea {
  background: #0f172a !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
  color: var(--muted-2) !important;
}

body.dark input:focus,
body.dark select:focus,
body.dark textarea:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(139, 123, 255, 0.16) !important;
  outline: none;
}

body.dark select option {
  background: #0f172a;
  color: var(--text);
}

body.dark .url-box button {
  background: var(--primary);
}

/* Settings & Options */
body.dark .option-icon {
  background: rgba(139, 123, 255, 0.12) !important;
  color: var(--primary) !important;
}

/* Progress */
body.dark .progress-bar {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--primary-2)
  ) !important;
}

body.dark .progress-text {
  color: var(--muted);
}

/* Preview */
body.dark .preview-action-btn {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-color: var(--border) !important;
}

body.dark .preview-action-btn:hover {
  background: var(--primary) !important;
  color: #ffffff !important;
}

body.dark .preview-action-btn.close:hover {
  background: var(--danger) !important;
}

body.dark .preview-frame {
  background: #ffffff !important;
}

/* 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;
}

/* Selection */
body.dark ::selection {
  background: rgba(139, 123, 255, 0.35);
  color: #ffffff;
}
