/* ============================================================
   Compress JPG — screenshot-style tool (no sidebar)
   ============================================================ */
:root {
  --bg: #f4f6fb;
  --paper: #ffffff;
  --ink: #1a1a2e;
  --muted: #6b7280;
  --line: #d7dce3;
  --blue: #7c3aed;
  --blue-dark: #6d28d9;
  --blue-light: #f3e8ff;
  --brand: #7c3aed;
  --accent: #a855f7;
  --radius: 6px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06);
  --font: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); min-height: 100vh; }
.ut-hidden { display: none !important; }

.cj-shell { max-width: 1100px; margin: 0 auto; padding: 22px 16px 60px; }

/* TOP BAR — blur-image tool jaisa (center title) */
.ut-topbar {
  position: relative; display: flex; align-items: center; gap: 16px;
  padding: 14px 18px; min-height: 66px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius-lg); margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.ut-brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 32px;
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%,-50%); white-space: nowrap;
}
.ut-brand-icon {
  width: 36px; height: 36px; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  color: #fff; border-radius: var(--radius-sm); font-size: 16px; flex-shrink: 0;
}
.ut-topbar-spacer { flex: 1; }

/* Tabs like screenshot */
.cj-tabs { display: flex; gap: 6px; margin-bottom: -1px; }
.cj-tab {
  border: 1px solid var(--line); border-bottom: none; background: #fff;
  padding: 10px 42px; font-size: 15px; font-weight: 500; color: #333;
  border-radius: 6px 6px 0 0; cursor: pointer; font-family: inherit;
}
.cj-tab.active { color: var(--blue); font-weight: 600; border-top: 3px solid var(--blue); padding-top: 8px; }

/* Toolbar */
.cj-toolbar {
  background: #fff; border: 1px solid var(--line); border-radius: 0 6px 6px 6px;
  padding: 18px 20px; margin-bottom: 16px;
}
.cj-toolbar-row { display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; position: relative; }
.cj-label { font-size: 16px; font-weight: 500; }
.cj-info { color: #333; font-size: 15px; cursor: help; }
.cj-range { width: 220px; accent-color: var(--blue); }
.cj-num {
  width: 64px; padding: 8px; text-align: center; font-size: 15px; font-weight: 600;
  border: 1px solid var(--line); border-radius: 4px; outline: none; font-family: inherit;
}
.cj-pct { font-size: 15px; }

/* Buttons */
.cj-btn {
  border: none; cursor: pointer; font-family: inherit; font-weight: 600;
  border-radius: 5px; transition: .15s; font-size: 14px;
}
.cj-btn-blue { background: var(--blue); color: #fff; padding: 10px 22px; }
.cj-btn-blue:hover { background: var(--blue-dark); }
.cj-btn-blue:disabled { opacity: .5; cursor: not-allowed; }
.cj-btn-outline {
  background: #fff; border: 1.5px solid var(--blue); color: #111;
  padding: 10px 30px; font-weight: 500;
}
.cj-btn-outline:hover { background: var(--blue-light); }
.cj-btn-big { padding: 12px 28px; font-size: 15px; }

/* Dropdowns */
.cj-dd-wrap { position: relative; }
.cj-dd-btn {
  background: #fff; border: 1.5px solid var(--blue); border-radius: 5px;
  padding: 9px 18px; font-size: 15px; font-weight: 600; cursor: pointer;
  display: flex; align-items: center; gap: 10px; font-family: inherit; min-width: 120px;
  justify-content: space-between;
}
.cj-dd-btn i { font-size: 12px; }
.cj-popup {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  width: 340px; max-height: 380px; overflow-y: auto; background: #fff;
  border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.22);
  padding: 16px; z-index: 100; border: 1px solid #eee;
}
.cj-popup-small { width: 200px; padding: 8px; }
.cj-search { display: flex; align-items: center; gap: 10px; border-bottom: 1px solid #e5e7eb; padding-bottom: 10px; margin-bottom: 12px; }
.cj-search i { color: #6b7280; }
.cj-search input { border: none; outline: none; font-size: 15px; width: 100%; font-family: inherit; }
.cj-format-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cj-format-btn {
  background: var(--blue); color: #fff; border: none; border-radius: 6px;
  padding: 10px 4px; font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.cj-format-btn:hover { background: var(--blue-dark); }
.cj-format-btn.selected { outline: 3px solid #f59e0b; }
.cj-size-opt {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 12px; font-size: 14px; font-weight: 600; cursor: pointer;
  border-radius: 6px; font-family: inherit;
}
.cj-size-opt:hover { background: var(--blue-light); }
.cj-size-opt.selected { background: var(--blue); color: #fff; }

/* Canvas */
.cj-canvas {
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  min-height: 340px; padding: 24px 20px; display: flex; flex-wrap: wrap;
  gap: 22px; align-items: flex-start; justify-content: center; position: relative;
}
.cj-grid { display: flex; flex-wrap: wrap; gap: 22px; justify-content: center; }
.cj-drop-hint { width: 100%; text-align: center; color: var(--muted); font-size: 14px; margin-top: 6px; }

/* Image card (screenshot style) */
.cj-card {
  width: 185px; background: #fff; border-radius: 6px;
  box-shadow: 0 2px 14px rgba(0,0,0,.12); padding: 10px 10px 12px;
  position: relative; text-align: center;
}
.cj-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 8px; }
.cj-card-name { font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
.cj-card-size { font-size: 13px; color: #333; }
.cj-card-x {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid #e5e7eb;
  background: #fff; cursor: pointer; font-size: 16px; line-height: 1;
  display: grid; place-items: center; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.cj-card-x:hover { background: #fee2e2; color: #dc2626; }
.cj-card img { width: 100%; height: 120px; object-fit: cover; border-radius: 2px; background: #f3f4f6; }
.cj-newsize { font-size: 13px; font-weight: 600; margin: 10px 0 8px; }
.cj-download {
  width: 100%; background: var(--blue); color: #fff; border: none; border-radius: 5px;
  padding: 9px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.cj-download:hover { background: var(--blue-dark); }
.cj-download:disabled { opacity: .5; cursor: not-allowed; }

/* Add images circle */
.cj-add {
  width: 155px; height: 155px; border-radius: 50%; background: #fff;
  border: 1px solid var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer; font-size: 15px; color: #333; font-family: inherit;
  align-self: center;
}
.cj-add:hover { border-color: var(--blue); color: var(--blue); }
.cj-add-plus { font-size: 22px; border: 2px solid #333; border-radius: 50%; width: 30px; height: 30px; display: grid; place-items: center; }
.cj-add:hover .cj-add-plus { border-color: var(--blue); }

/* Bottom bar */
.cj-bottombar {
  background: #fff; border: 1px solid var(--line); border-top: none;
  border-radius: 0 0 6px 6px; padding: 14px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 14px;
}
.cj-bottom-right { display: flex; align-items: center; gap: 12px; }
.cj-trash {
  width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff;
  border: none; font-size: 18px; cursor: pointer; display: grid; place-items: center;
}
.cj-trash:hover { background: #dc2626; }
.cj-secure { text-align: center; font-size: 12.5px; color: var(--muted); margin-bottom: 30px; }
.cj-secure i { color: #16a34a; }

/* Features + FAQ (kept) */
.ut-section { margin-top: 34px; }
.ut-section-head { text-align: center; margin-bottom: 20px; }
.ut-section-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase; color: #6d28d9;
  background: #f3e8ff; border: 1px solid #d8b4fe; padding: 6px 14px; border-radius: 999px; margin-bottom: 12px;
}
.ut-section-title { font-size: 26px; font-weight: 800; }
.ut-section-title em { font-style: normal; color: var(--blue); }
.ut-section-sub { color: var(--muted); font-size: 14px; margin-top: 8px; }
.ut-feature-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
@media (max-width: 760px) { .ut-feature-grid { grid-template-columns: 1fr; } }
.ut-feature-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 18px; }
.ut-feature-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ut-feature-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: #f3e8ff; color: var(--blue); }
.ut-feature-tag { font-size: 10px; font-weight: 800; background: #111; color: #fff; padding: 4px 9px; border-radius: 999px; }
.ut-feature-card h3 { font-size: 15px; margin-bottom: 6px; }
.ut-feature-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
.ut-faq { margin-top: 30px; }
.ut-faq-list { display: flex; flex-direction: column; gap: 10px; }
.ut-faq-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.ut-faq-q { width: 100%; background: none; border: none; font-family: inherit; padding: 15px 16px; display: flex; justify-content: space-between; align-items: center; gap: 10px; cursor: pointer; font-weight: 700; font-size: 14px; text-align: left; }
.ut-faq-a { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.ut-faq-item.open .ut-faq-a { max-height: 300px; }
.ut-faq-a p { padding: 0 16px 16px; font-size: 13px; color: var(--muted); line-height: 1.6; }

.ut-toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: #111; color: #fff; padding: 12px 20px; border-radius: 999px;
  display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 9999;
}
.ut-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.ut-toast i { color: #4ade80; }

@media (max-width: 640px) {
  .ut-brand { font-size: 22px; }
  .cj-tab { padding: 10px 26px; }
  .cj-range { width: 140px; }
  .cj-popup { width: 300px; left: 0; transform: none; }
  .cj-bottombar { flex-wrap: wrap; }
}
