/* =============================================================
   DocConvertio — shared.css
   Global styles, dark mode, components, responsive
   ============================================================= */


/* ─────────────────────────────────────────────
   RESET
   ───────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { font-size: 16px; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background 0.2s ease, color 0.2s ease;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }
img { display: block; }


/* ─────────────────────────────────────────────
   COLOR TOKENS  (Light + Dark)
   ───────────────────────────────────────────── */

:root {
  --pink:         #E61C79;
  --pink-bg:      #FEE8F2;
  --pink-dark:    #B8135E;

  --ink:          #111111;
  --ink2:         #555555;
  --ink3:         #999999;

  --line:         #E8E8E8;
  --bg:           #F7F7F7;
  --surface:      #FFFFFF;

  --green:        #16A34A;
  --green-bg:     #F0FDF4;
  --red:          #DC2626;

  --r:            8px;
  --t:            0.15s ease;

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.08);
}

[data-theme="dark"] {
  --ink:          #F0F0F0;
  --ink2:         #A0A0A0;
  --ink3:         #606060;

  --line:         #2C2C2C;
  --bg:           #141414;
  --surface:      #1E1E1E;

  --pink-bg:      rgba(230, 28, 121, 0.15);
  --green-bg:     rgba(22, 163, 74, 0.15);

  --shadow-sm:    0 1px 4px rgba(0,0,0,0.3);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.35);
}


/* ─────────────────────────────────────────────
   NAV
   ───────────────────────────────────────────── */

nav {
  border-bottom: 1px solid var(--line);
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 100;
  flex-shrink: 0;
  gap: 12px;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
  text-decoration: none;
}
.site-logo {
  display: block;
  width: 190px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
}
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

.drawer-header .site-logo {
  width: 190px;
  max-height: 48px;
}

/* Dark mode toggle */
.btn-dark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink2);
  transition: background var(--t), color var(--t), border-color var(--t);
  flex-shrink: 0;
}
.btn-dark:hover {
  background: var(--bg);
  color: var(--ink);
}

/* Privacy Policy link */
.nav-link-pill {
  font-size: .75rem;
  font-weight: 500;
  color: var(--ink2);
  padding: 5px 10px;
  border-radius: 6px;
  transition: color var(--t), background var(--t);
  white-space: nowrap;
}
.nav-link-pill:hover {
  background: var(--bg);
  color: var(--ink);
}

/* Download App button */
.btn-app {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity var(--t);
}
.btn-app:hover { opacity: .88; }

/* Clock */
.nav-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink2);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 10px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.nav-clock svg { color: var(--ink3); flex-shrink: 0; }

/* Hamburger */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink2);
  flex-shrink: 0;
  transition: background var(--t), color var(--t);
}
.hamburger:hover {
  background: var(--bg);
  color: var(--ink);
}


/* ─────────────────────────────────────────────
   BODY LAYOUT  (3-column grid)
   ───────────────────────────────────────────── */

.body-wrap {
  display: grid;
  grid-template-columns: 210px 1fr 230px;
  gap: 20px;
  max-width: 1160px;
  width: 100%;
  margin: 0 auto;
  padding: 24px 20px;
  flex: 1;
  align-items: start;
}


/* ─────────────────────────────────────────────
   LEFT SIDEBAR
   ───────────────────────────────────────────── */

.sidebar-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 76px;
}

.sidebar-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 8px 14px;
}

.sidebar-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 4px 10px 10px;
}

.tool-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: none;
  background: transparent;
  color: var(--ink2);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  transition: background var(--t), color var(--t);
  margin-bottom: 2px;
  text-decoration: none;
}
.tool-btn:last-child { margin-bottom: 0; }
.tool-btn:hover { background: var(--bg); color: var(--ink); }
.tool-btn.active {
  background: var(--pink-bg);
  color: var(--pink);
  font-weight: 700;
}
.tool-btn svg { flex-shrink: 0; color: var(--ink3); }
.tool-btn.active svg { color: var(--pink); }
.tool-btn:hover svg { color: var(--ink2); }

.tool-new {
  margin-left: auto;
  font-size: .65rem;
  font-weight: 700;
  background: var(--pink);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .02em;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────
   MAIN CONTENT COLUMN
   ───────────────────────────────────────────── */

.main-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}


/* ─────────────────────────────────────────────
   PAGE HEADING
   ───────────────────────────────────────────── */

.heading h1 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--ink);
  margin-bottom: 5px;
}
.heading p {
  font-size: .87rem;
  color: var(--ink2);
  line-height: 1.6;
}


/* ─────────────────────────────────────────────
   DROP ZONE
   ───────────────────────────────────────────── */

.drop {
  border: 1.5px dashed var(--line);
  border-radius: var(--r);
  padding: 42px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color var(--t), background var(--t);
  background: var(--surface);
}

.drop input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop:hover,
.drop.over {
  border-color: var(--pink);
  background: var(--pink-bg);
}

.drop-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--ink2);
  transition: background var(--t), color var(--t);
}
.drop:hover .drop-icon,
.drop.over .drop-icon {
  background: var(--pink-bg);
  color: var(--pink);
}

.drop h3 {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 3px;
}
.drop p { font-size: .8rem; color: var(--ink3); }

.chips {
  display: flex;
  gap: 5px;
  justify-content: center;
  margin-top: 10px;
  flex-wrap: wrap;
}
.chip {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--bg);
  color: var(--ink2);
  border: 1px solid var(--line);
}


/* ─────────────────────────────────────────────
   FILE COUNT BADGE
   ───────────────────────────────────────────── */

.file-count-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 600;
  color: var(--pink);
  background: var(--pink-bg);
  border: 1px solid rgba(230,28,121,0.2);
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 6px;
}


/* ─────────────────────────────────────────────
   FILE LIST
   ───────────────────────────────────────────── */

.file-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  transition: border-color var(--t);
}

.file-row-thumb {
  width: 38px;
  height: 38px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.file-row-thumb-pdf {
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: var(--pink-bg);
  border: 1px solid rgba(230,28,121,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--pink);
}

.file-row-info {
  flex: 1;
  min-width: 0;
}
.file-row-name {
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
}
.file-row-size {
  font-size: .72rem;
  color: var(--ink3);
  margin-top: 1px;
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink3);
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  transition: color var(--t), background var(--t);
}
.file-remove:hover {
  color: var(--red);
  background: #FEF2F2;
}

/* Drag-to-reorder */
.drag-handle {
  cursor: grab;
  color: var(--ink3);
  padding: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.dragging {
  opacity: .5;
  border: 1.5px dashed var(--pink) !important;
}
.drag-over {
  border-color: var(--pink) !important;
  background: var(--pink-bg) !important;
}


/* ─────────────────────────────────────────────
   SETTINGS PANEL
   ───────────────────────────────────────────── */

.settings {
  background: var(--bg);
  border-radius: var(--r);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  border: 1px solid var(--line);
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.setting-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink2);
  letter-spacing: .02em;
}

.setting-ctrl {
  display: flex;
  align-items: center;
  gap: 8px;
}

input[type="range"] {
  -webkit-appearance: none;
  width: 148px;
  height: 3px;
  border-radius: 2px;
  background: var(--line);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--pink);
  cursor: pointer;
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.range-val {
  font-size: .8rem;
  font-weight: 700;
  color: var(--pink);
  min-width: 34px;
  text-align: right;
}

select {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 500;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t);
}
select:focus { border-color: var(--pink); }

input[type="text"] {
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: .8rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--t);
}
input[type="text"]:focus { border-color: var(--pink); }


/* ─────────────────────────────────────────────
   PROGRESS BAR  (with percentage number)
   ───────────────────────────────────────────── */

.progress {
  display: none;
  flex-direction: column;
  gap: 6px;
}
.progress.show { display: flex; }

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-text {
  font-size: .78rem;
  color: var(--ink2);
  font-weight: 500;
}

.progress-pct {
  font-size: .78rem;
  font-weight: 700;
  color: var(--pink);
  font-variant-numeric: tabular-nums;
}

.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--pink);
  border-radius: 2px;
  transition: width .3s ease;
  width: 0;
}


/* ─────────────────────────────────────────────
   ACTION BUTTONS
   ───────────────────────────────────────────── */

.actions {
  display: flex;
  gap: 8px;
}

.btn-main {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: var(--r);
  padding: 10px 18px;
  font-size: .86rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity var(--t), transform var(--t);
}
.btn-main:hover:not(:disabled) {
  opacity: .88;
  transform: translateY(-1px);
}
.btn-main:active:not(:disabled) { transform: none; }
.btn-main:disabled {
  opacity: .35;
  cursor: not-allowed;
  transform: none;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid var(--line);
  color: var(--ink2);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: .84rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--t), color var(--t), background var(--t);
}
.btn-ghost:hover {
  border-color: var(--ink2);
  color: var(--ink);
}

@keyframes spin { to { transform: rotate(360deg); } }
.spinning { animation: spin .7s linear infinite; }


/* ─────────────────────────────────────────────
   RESULTS
   ───────────────────────────────────────────── */

.results {
  display: none;
  flex-direction: column;
  gap: 8px;
}
.results.show { display: flex; }

.results-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.results-top h3 {
  font-size: .85rem;
  font-weight: 700;
  color: var(--ink);
}

.btn-dl-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .76rem;
  font-weight: 600;
  color: var(--pink);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 5px;
  transition: background var(--t);
}
.btn-dl-all:hover { background: var(--pink-bg); }

.result-card {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  animation: fadeUp .2s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.result-thumb {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.result-icon {
  width: 42px;
  height: 42px;
  border-radius: 6px;
  background: var(--green-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  flex-shrink: 0;
  border: 1px solid rgba(22,163,74,0.3);
}

.result-info { flex: 1; min-width: 0; }
.result-name {
  font-size: .82rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink);
  margin-bottom: 2px;
}
.result-meta {
  font-size: .73rem;
  color: var(--ink3);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.badge-saved {
  background: var(--green-bg);
  color: var(--green);
  font-size: .66rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(22,163,74,0.3);
}

.btn-dl {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--green-bg);
  color: var(--green);
  border: 1px solid rgba(22,163,74,0.3);
  border-radius: 6px;
  padding: 6px 11px;
  font-size: .76rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--t);
}
.btn-dl:hover { background: #DCFCE7; }


/* ─────────────────────────────────────────────
   RIGHT SIDEBAR
   ───────────────────────────────────────────── */

.sidebar-right {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 76px;
}

/* Counter box */
.counter-box {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.counter-box-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.counter-box-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--pink-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink);
  flex-shrink: 0;
}
.counter-box-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}
.counter-box-sub {
  font-size: .68rem;
  color: var(--ink3);
  margin-top: 1px;
}
.counter-num-big {
  font-size: 2rem;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.counter-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  color: var(--ink3);
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--pink);
  flex-shrink: 0;
  animation: pulseDot 1.8s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .35; transform: scale(.65); }
}

/* Promo box */
.promo-box {
  border-radius: var(--r);
  padding: 18px;
  background: linear-gradient(135deg, var(--pink) 0%, #C0166A 100%);
  color: #fff;
}
.promo-box h3 {
  font-size: .95rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.promo-box p {
  font-size: .8rem;
  opacity: .85;
  line-height: 1.55;
}


/* ─────────────────────────────────────────────
   MOBILE DRAWER
   ───────────────────────────────────────────── */

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
  opacity: 0;
  transition: opacity .25s ease;
}
.drawer-overlay.open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 270px;
  background: var(--surface);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform .28s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  box-shadow: 4px 0 24px rgba(0,0,0,0.12);
}
.drawer.open { transform: translateX(0); }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.drawer-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink3);
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  transition: color var(--t), background var(--t);
}
.drawer-close:hover { color: var(--ink); background: var(--bg); }

.drawer-body { padding: 10px 8px 20px; flex: 1; }

.drawer-section-label {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 8px 10px 6px;
}

.drawer-tool-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 11px 12px;
  border: none;
  background: transparent;
  color: var(--ink2);
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  border-radius: 10px;
  transition: background var(--t), color var(--t);
  margin-bottom: 2px;
  text-decoration: none;
}
.drawer-tool-btn:hover { background: var(--bg); color: var(--ink); }
.drawer-tool-btn.active {
  background: var(--pink-bg);
  color: var(--pink);
  font-weight: 700;
}
.drawer-tool-btn svg { flex-shrink: 0; color: var(--ink3); }
.drawer-tool-btn.active svg { color: var(--pink); }

.drawer-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 10px;
}

.drawer-new {
  margin-left: auto;
  font-size: .65rem;
  font-weight: 700;
  background: var(--pink);
  color: #fff;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: .02em;
  flex-shrink: 0;
}


/* ─────────────────────────────────────────────
   APP MODAL
   ───────────────────────────────────────────── */

.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal-box {
  background: var(--surface);
  border-radius: 16px;
  padding: 36px 32px;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: modalIn .25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  background: var(--pink-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--pink);
}
.modal-box h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -.3px;
}
.modal-box p {
  font-size: .88rem;
  color: var(--ink2);
  line-height: 1.6;
  margin-bottom: 22px;
}

.modal-badges {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--ink);
  color: #fff;
  padding: 9px 16px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  opacity: .35;
  cursor: not-allowed;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: var(--bg);
  color: var(--ink3);
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t);
}
.modal-close:hover { color: var(--ink); background: var(--line); border-color: var(--ink3); }
.modal-box { position: relative; }


/* ─────────────────────────────────────────────
   TOAST
   ───────────────────────────────────────────── */

#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--r);
  font-size: .82rem;
  font-weight: 500;
  opacity: 0;
  transition: all .2s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 999;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok   { background: var(--green); }
#toast.err  { background: var(--red); }


/* ─────────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 16px 24px;
  text-align: center;
  font-size: .78rem;
  color: var(--ink3);
  flex-shrink: 0;
  margin-top: auto;
}
footer strong { color: var(--pink); font-weight: 600; }


/* ─────────────────────────────────────────────
   HOMEPAGE — HERO
   ───────────────────────────────────────────── */

.hero {
  text-align: center;
  padding: 56px 24px 40px;
  max-width: 640px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--pink-bg);
  color: var(--pink);
  font-size: .75rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(230,28,121,0.2);
  margin-bottom: 18px;
  letter-spacing: .02em;
}

.hero h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.6px;
  color: var(--ink);
  margin-bottom: 12px;
  line-height: 1.2;
}
.hero h1 span { color: var(--pink); }

.hero p {
  font-size: .95rem;
  color: var(--ink2);
  line-height: 1.7;
}


/* ─────────────────────────────────────────────
   HOMEPAGE — TOOL GRID
   ───────────────────────────────────────────── */

.tools-wrap { display: flex; flex-direction: column; }

.section-label {
  text-align: center;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink3);
  padding: 8px 24px 16px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

.tool-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-decoration: none;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.tool-card:hover {
  border-color: var(--pink);
  box-shadow: 0 4px 16px rgba(230,28,121,0.1);
  transform: translateY(-2px);
}

.tool-card-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--pink-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--pink);
}

.tool-card h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
}
.tool-card p {
  font-size: .78rem;
  color: var(--ink2);
  line-height: 1.5;
}

.tool-card-arrow {
  margin-top: auto;
  font-size: .75rem;
  font-weight: 600;
  color: var(--pink);
  display: flex;
  align-items: center;
  gap: 4px;
}


/* ─────────────────────────────────────────────
   HOMEPAGE — FEATURES SECTION
   ───────────────────────────────────────────── */

.features-section {
  background: var(--surface);
  padding: 64px 24px;
  border-top: 1px solid var(--line);
}

.features-inner { max-width: 940px; margin: 0 auto; }

.feat-heading {
  text-align: center;
  margin-bottom: 44px;
}
.feat-heading h2 {
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: -.6px;
  color: var(--ink);
  line-height: 1.2;
  margin-bottom: 12px;
}
.feat-heading h2 span { color: var(--pink); }
.feat-heading p {
  font-size: .9rem;
  color: var(--ink2);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* 4th and 5th cards sit in a 2-col row */
.feat-card:nth-child(4) { grid-column: 1; }
.feat-card:nth-child(5) { grid-column: 2 / span 2; }

.feat-card {
  background: var(--pink-bg);
  border: 1px solid rgba(230,28,121,0.12);
  border-radius: 16px;
  padding: 28px 22px;
  transition: transform var(--t), box-shadow var(--t);
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(230,28,121,0.12);
}

.feat-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--pink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(230,28,121,0.35);
}

.feat-card h3 {
  font-size: .95rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}
.feat-card p {
  font-size: .82rem;
  color: var(--ink2);
  line-height: 1.6;
}


/* ─────────────────────────────────────────────
   HOMEPAGE — HOW IT WORKS
   ───────────────────────────────────────────── */

.hiw-section {
  padding: 64px 24px;
  background: linear-gradient(135deg, var(--pink) 0%, #C0166A 55%, #8B0D4E 100%);
}

.hiw-inner { max-width: 800px; margin: 0 auto; }

.hiw-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  margin-bottom: 40px;
  letter-spacing: -.5px;
}

.hiw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.hiw-card {
  background: rgba(255,255,255,0.95);
  border-radius: 100px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.hiw-num {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.hiw-num svg { color: #fff; }

.hiw-info h4 {
  font-size: .88rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 2px;
}
.hiw-info p {
  font-size: .75rem;
  color: #555;
  line-height: 1.4;
}


/* ─────────────────────────────────────────────
   HOMEPAGE — FAQ SECTION
   ───────────────────────────────────────────── */

.faq-section {
  background: var(--bg);
  padding: 64px 24px;
  border-top: 1px solid var(--line);
}

.faq-inner { max-width: 720px; margin: 0 auto; }

.faq-heading {
  text-align: center;
  margin-bottom: 40px;
}
.faq-heading h2 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--ink);
  margin-bottom: 10px;
}
.faq-heading p {
  font-size: .88rem;
  color: var(--ink2);
  line-height: 1.6;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color var(--t);
}
.faq-item.open { border-color: var(--pink); }

.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink);
  transition: color var(--t);
}
.faq-q:hover { color: var(--pink); }
.faq-item.open .faq-q { color: var(--pink); }

.faq-chevron {
  flex-shrink: 0;
  color: var(--ink3);
  transition: transform .2s ease, color .2s ease;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--pink);
}

.faq-a {
  display: none;
  padding: 0 20px 16px;
  font-size: .85rem;
  color: var(--ink2);
  line-height: 1.7;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.faq-item.open .faq-a { display: block; }


/* ─────────────────────────────────────────────
   PRIVACY POLICY PAGE
   ───────────────────────────────────────────── */

.pp-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}
.pp-wrap h1 {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--ink);
  margin-bottom: 8px;
}
.pp-date {
  font-size: .8rem;
  color: var(--ink3);
  margin-bottom: 32px;
}
.pp-section { margin-bottom: 32px; }
.pp-section h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.pp-section p {
  font-size: .875rem;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 10px;
}
.pp-section ul {
  padding-left: 20px;
  margin-top: 6px;
}
.pp-section ul li {
  font-size: .875rem;
  color: var(--ink2);
  line-height: 1.75;
  margin-bottom: 4px;
}
.pp-highlight {
  background: var(--pink-bg);
  border-left: 3px solid var(--pink);
  border-radius: 0 8px 8px 0;
  padding: 14px 18px;
  margin-bottom: 24px;
}
.pp-highlight p {
  color: var(--ink);
  font-weight: 500;
  margin-bottom: 0;
}


/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */

@media (max-width: 900px) {
  .body-wrap {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }
  .sidebar-left  { display: none; }
  .sidebar-right {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .hamburger { display: flex; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .feat-card:nth-child(5) { grid-column: auto; }
  .nav-link-pill { display: none; }
}

@media (max-width: 600px) {
  .site-logo { width: 170px; max-height: 42px; }
  nav { padding: 0 14px; }
  .nav-clock span { display: none; }
  .sidebar-right { grid-template-columns: 1fr; }
  .actions { flex-direction: column; }
  .btn-main, .btn-ghost { justify-content: center; }
  input[type="range"] { width: 110px; }
  .features-grid { grid-template-columns: 1fr; }
  .feat-card:nth-child(4),
  .feat-card:nth-child(5) { grid-column: auto; }
  .hiw-grid { grid-template-columns: 1fr; }
  .hiw-card { border-radius: 14px; }
  .feat-heading h2,
  .hiw-section h2,
  .faq-heading h2 { font-size: 1.4rem; }
  .hero h1 { font-size: 1.5rem; }
  .btn-app .app-label { display: none; }
}


/* ─────────────────────────────────────────────
   RESULT CARD — RENAME FEATURE
   ───────────────────────────────────────────── */

/* Name row (static view) */
.result-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 2px;
}

.result-name {
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

/* Rename trigger button (pencil icon) */
.btn-rename-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .7rem;
  font-weight: 600;
  color: var(--ink3);
  background: none;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 7px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-rename-trigger:hover {
  color: var(--pink);
  border-color: var(--pink);
  background: var(--pink-bg);
}

/* Inline rename row */
.rename-row {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 2px;
  flex-wrap: nowrap;
}

.rename-input {
  flex: 1;
  min-width: 0;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--pink);
  border-radius: 6px;
  padding: 4px 8px;
  outline: none;
  font-family: inherit;
  transition: box-shadow var(--t);
}
.rename-input:focus {
  box-shadow: 0 0 0 3px rgba(230,28,121,0.15);
}

.rename-ext {
  font-size: .78rem;
  font-weight: 600;
  color: var(--ink3);
  white-space: nowrap;
  flex-shrink: 0;
}

/* Confirm (tick) button */
.btn-rename-ok {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--pink);
  border: none;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: opacity var(--t);
}
.btn-rename-ok:hover { opacity: .85; }

/* Cancel (×) button */
.btn-rename-cancel {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink3);
  flex-shrink: 0;
  transition: color var(--t), border-color var(--t), background var(--t);
}
.btn-rename-cancel:hover {
  color: var(--red);
  border-color: var(--red);
  background: #FEF2F2;
}


/* ─────────────────────────────────────────────
   DARK MODE FIXES — Tool page elements
   ───────────────────────────────────────────── */

[data-theme="dark"] .drop         { background: var(--surface); }
[data-theme="dark"] .settings     { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .file-row     { background: var(--surface); }
[data-theme="dark"] .result-card  { background: var(--surface); }
[data-theme="dark"] .sidebar-section { background: var(--surface); }
[data-theme="dark"] .counter-box  { background: var(--surface); }
[data-theme="dark"] .faq-item     { background: var(--surface); }
[data-theme="dark"] .modal-box    { background: var(--surface); }

/* SEO block */
.seo-block {
  margin: 48px auto 0;
  max-width: 820px;
  padding: 0 20px 48px;
}
.seo-block-inner {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 48px;
  text-align: center;
}
.seo-block h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -.4px;
}
.seo-block h3 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink);
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .75rem;
  color: var(--pink);
}
.seo-block p {
  font-size: .875rem;
  color: var(--ink2);
  line-height: 1.85;
  margin-bottom: 8px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}
.seo-block ol {
  display: inline-block;
  text-align: left;
  padding-left: 22px;
  margin: 8px auto 0;
  max-width: 480px;
  width: 100%;
}
.seo-block ol li {
  font-size: .875rem;
  color: var(--ink2);
  line-height: 1.85;
  margin-bottom: 7px;
}
.seo-block-divider {
  width: 40px;
  height: 3px;
  background: var(--pink);
  border-radius: 2px;
  margin: 14px auto 20px;
  opacity: .5;
}
[data-theme="dark"] .seo-block-inner {
  background: var(--surface);
  border-color: var(--line);
}
@media (max-width: 600px) {
  .seo-block-inner { padding: 28px 20px; }
}


/* ─────────────────────────────────────────────
   FOOTER — Full redesign with social + language
   ───────────────────────────────────────────── */

footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 0;
  flex-shrink: 0;
  margin-top: auto;
}

.footer-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 32px 24px 24px;
  text-align: center;
}

/* Brand */
.footer-brand { text-align: center; }

.footer-logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--ink);
  margin-bottom: 8px;
}
.footer-logo span { color: var(--pink); }

.footer-tagline {
  font-size: .8rem;
  color: var(--ink3);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
  text-align: center;
}

/* Social icons */
.footer-social {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 4px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink3);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
}

.social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: inherit;
}

/* Gmail — red */
.social-btn.social-gmail:hover {
  color: #fff;
  border-color: #EA4335;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(234,67,53,0.35);
}
.social-btn.social-gmail::before { background: #EA4335; }
.social-btn.social-gmail:hover::before { opacity: 1; }
.social-btn.social-gmail:hover svg { position: relative; z-index: 1; }

/* LinkedIn — blue */
.social-btn.social-linkedin:hover {
  color: #fff;
  border-color: #0A66C2;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(10,102,194,0.35);
}
.social-btn.social-linkedin::before { background: #0A66C2; }
.social-btn.social-linkedin:hover::before { opacity: 1; }
.social-btn.social-linkedin:hover svg { position: relative; z-index: 1; }

/* Instagram — gradient */
.social-btn.social-instagram:hover {
  color: #fff;
  border-color: #E1306C;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(225,48,108,0.35);
}
.social-btn.social-instagram::before {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}
.social-btn.social-instagram:hover::before { opacity: 1; }
.social-btn.social-instagram:hover svg { position: relative; z-index: 1; }

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 1160px;
  margin: 0 auto;
  padding: 14px 24px;
  font-size: .76rem;
  color: var(--ink3);
  flex-wrap: wrap;
}
.footer-bottom strong { color: var(--pink); }
.footer-bottom a {
  color: var(--ink3);
  text-decoration: none;
  transition: color var(--t);
}
.footer-managed {
  font-size: .75rem;
  color: var(--ink3);
}
.footer-managed a {
  color: var(--pink);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-bottom a:hover { color: var(--pink); }

/* Dark mode */
[data-theme="dark"] .social-btn { background: var(--surface); }

/* Mobile footer */
@media (max-width: 768px) {
  .footer-top {
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px 16px;
  }
  .footer-social { order: 2; }
  .footer-lang   { order: 3; }
  .footer-bottom { padding: 12px 16px; }
}

/* PDF / Word converter helpers */
.info-note { padding:12px 14px; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--ink2); font-size:.78rem; line-height:1.55; }
.docx-pdf-render h1,.docx-pdf-render h2,.docx-pdf-render h3 { color:#111; }
.docx-pdf-render img { max-width:100%; height:auto; }
