/* ================================================
   PIXELTOOLS — style.css  (unified, single file)
   ================================================ */

/* ---- LIGHT THEME (default) ---- */
:root {
  --bg:      #f0f4f8;
  --surface: #ffffff;
  --border:  #dde3ed;
  --card:    #ffffff;
  --accent:  #7c3aed;
  --accent2: #0891b2;
  --text:    #1a1a2e;
  --muted:   #6b7280;
  --success: #059669;
  --danger:  #dc2626;
  --shadow:  rgba(0,0,0,0.08);
  --tap:     44px;
  --max-w:   1280px;
}

/* ================================================
   RESET
   ================================================ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; scroll-behavior:smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background .25s, color .25s;
}

body::before {
  content:''; position:fixed; top:-150px; left:-150px;
  width:400px; height:400px;
  background: radial-gradient(circle, rgba(124,58,237,.07) 0%, transparent 70%);
  pointer-events:none; z-index:0;
}
body::after {
  content:''; position:fixed; bottom:-150px; right:-150px;
  width:400px; height:400px;
  background: radial-gradient(circle, rgba(6,182,212,.05) 0%, transparent 70%);
  pointer-events:none; z-index:0;
}

/* ================================================
   HEADER
   ================================================ */
header {
  position: sticky; top:0; z-index:200;
  padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  backdrop-filter: blur(12px);
  flex-wrap: wrap;
  transition: background .25s, border-color .25s;
}

.header-left { display:flex; align-items:center; gap:10px; text-decoration:none; flex-shrink:0; }
.logo-mark {
  width:32px; height:32px; border-radius:8px; flex-shrink:0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display:flex; align-items:center; justify-content:center; font-size:16px;
}
.logo-text { font-family:'Syne',sans-serif; font-size:18px; font-weight:800; letter-spacing:-.5px; color:var(--text); }
.logo-text span { color:var(--accent2); }

/* hamburger */
.menu-toggle {
  display:flex; flex-direction:column; gap:5px;
  background:none; border:1px solid var(--border); border-radius:8px;
  padding:8px 10px; cursor:pointer;
  min-width:var(--tap); min-height:var(--tap);
  justify-content:center; align-items:center;
  -webkit-tap-highlight-color:transparent;
}
.menu-toggle span { display:block; width:18px; height:2px; background:var(--text); border-radius:2px; transition:all .3s; }
.menu-toggle.open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity:0; }
.menu-toggle.open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* nav — collapsed on mobile */
.header-nav {
  display:none; width:100%; flex-direction:column; gap:2px;
  padding:10px 0 6px; border-top:1px solid var(--border); margin-top:10px;
}
.header-nav.open { display:flex; }

.nav-link {
  display:flex; align-items:center;
  padding:11px 14px; border-radius:10px;
  color:var(--muted); font-size:15px; font-weight:500;
  text-decoration:none; transition:all .2s;
  border:1px solid transparent; min-height:var(--tap);
  -webkit-tap-highlight-color:transparent;
}
.nav-link:hover, .nav-link:active { color:var(--text); background:var(--surface); }
.nav-link.active { color:var(--text); background:var(--surface); border-color:var(--border); }

/* lang toggle */
.lang-toggle {
  display:flex; align-items:center; gap:4px;
  background:var(--surface); border:1px solid var(--border);
  border-radius:100px; padding:4px;
  margin-top:6px; align-self:flex-start;
  transition: background .25s, border-color .25s;
}
.lang-btn {
  display:flex; align-items:center; justify-content:center;
  padding:7px 14px; border-radius:100px;
  border:none; background:transparent; color:var(--muted);
  font-family:'DM Sans',sans-serif; font-size:13px; font-weight:600;
  cursor:pointer; transition:all .2s;
  min-height:34px; min-width:40px;
  -webkit-tap-highlight-color:transparent;
}
.lang-btn.active { background:var(--accent); color:#fff; }


/* tablet+ */
@media(min-width:768px){
  header { padding:14px 32px; }
  .menu-toggle { display:none; }
  .header-nav {
    display:flex !important; flex-direction:row; align-items:center;
    gap:4px; width:auto; padding:0; border-top:none; margin-top:0;
  }
  .nav-link { padding:8px 12px; font-size:13px; min-height:auto; }
  .lang-toggle { margin-top:0; margin-left:6px; }
}
@media(min-width:1024px){
  header { padding:16px 48px; }
  .logo-mark { width:36px; height:36px; font-size:18px; border-radius:10px; }
  .logo-text { font-size:22px; }
  .nav-link { padding:8px 14px; font-size:14px; }
}
@media(min-width:1440px){ header { padding:18px 64px; } }
@media(min-width:1920px){ header { padding:20px 80px; } .nav-link { font-size:15px; } }

/* ================================================
   AD
   ================================================ */
.ad-slot {
  position:relative; z-index:10; text-align:center;
  background:var(--surface); padding:10px 16px;
  border-top:1px solid var(--border); border-bottom:1px solid var(--border);
  transition: background .25s;
  min-height:90px; /* reserve space to prevent CLS */
  contain: layout size;
}
.ad-label { font-size:10px; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:3px; }
.ad-sidebar { display:none; }
.ad-sidebar-ins { width:160px; min-height:300px; contain:layout; }
@media(min-width:1200px){ .ad-sidebar { display:block; width:180px; flex-shrink:0; text-align:center; } }

/* ================================================
   HERO
   ================================================ */
.hero { position:relative; z-index:10; text-align:center; padding:40px 16px 28px; }
.hero-badge {
  display:inline-block; padding:5px 14px;
  background:rgba(124,58,237,.12); border:1px solid rgba(124,58,237,.25);
  border-radius:100px; font-size:11px; font-weight:500;
  color:var(--accent); letter-spacing:1px; text-transform:uppercase; margin-bottom:16px;
}
.hero h1 {
  font-family:'Syne',sans-serif; font-size:clamp(26px,7vw,64px);
  font-weight:800; line-height:1.05; letter-spacing:-1.5px; margin-bottom:14px;
}
.hero h1 .grad {
  background:linear-gradient(90deg,var(--accent2),var(--accent));
  -webkit-background-clip:text; -webkit-text-fill-color:transparent;
}
.hero p { color:var(--muted); font-size:15px; max-width:520px; margin:0 auto; line-height:1.65; }

@media(min-width:640px)  { .hero { padding:50px 24px 36px; } .hero p { font-size:16px; } }
@media(min-width:768px)  { .hero { padding:60px 32px 44px; } .hero p { font-size:17px; } }
@media(min-width:1024px) { .hero { padding:72px 48px 52px; } .hero p { font-size:18px; } .hero h1 { letter-spacing:-2px; } }
@media(min-width:1920px) { .hero h1 { font-size:clamp(48px,4vw,80px); } .hero p { font-size:20px; max-width:640px; } }

/* ================================================
   TABS
   ================================================ */
.tabs {
  position:relative; z-index:10;
  display:flex; gap:8px; padding:0 16px 24px;
  overflow-x:auto; -webkit-overflow-scrolling:touch; scrollbar-width:none;
}
.tabs::-webkit-scrollbar { display:none; }
.tab-btn {
  flex-shrink:0; padding:9px 16px;
  background:var(--surface); border:1px solid var(--border); border-radius:100px;
  color:var(--muted); font-family:'DM Sans',sans-serif; font-size:13px; font-weight:500;
  cursor:pointer; transition:all .2s; display:flex; align-items:center; gap:6px;
  white-space:nowrap; min-height:var(--tap);
  box-shadow:0 1px 4px var(--shadow);
  -webkit-tap-highlight-color:transparent;
}
.tab-btn:hover { border-color:var(--accent); color:var(--text); }
.tab-btn.active { background:var(--accent); border-color:var(--accent); color:#fff; box-shadow:0 4px 14px rgba(124,58,237,.35); }
@media(min-width:640px)  { .tabs { justify-content:center; overflow-x:visible; padding:0 24px 32px; } .tab-btn { padding:10px 20px; font-size:14px; } }
@media(min-width:1920px) { .tab-btn { padding:12px 28px; font-size:16px; } }

/* ================================================
   LAYOUT
   ================================================ */
.main-layout {
  display:flex; align-items:flex-start; gap:24px;
  max-width:var(--max-w); margin:0 auto;
  padding:0 16px; position:relative; z-index:10;
}
.container { flex:1; min-width:0; padding-bottom:60px; }
@media(min-width:768px)  { .main-layout { padding:0 24px; gap:28px; } }
@media(min-width:1024px) { .main-layout { padding:0 48px; } }
@media(min-width:1440px) { .main-layout { padding:0 64px; } }
@media(min-width:1920px) { .main-layout { padding:0 80px; } }

.tool-panel { 
  display:block;
  visibility:hidden; 
  height:0; 
  overflow:hidden; 
  pointer-events:none;
  position:absolute;
  width:100%;
}
.tool-panel.active { 
  visibility:visible; 
  height:auto; 
  overflow:visible; 
  pointer-events:auto;
  position:relative;
}

/* ================================================
   UPLOAD ZONE
   ================================================ */
.upload-zone {
  border:2px dashed var(--border); border-radius:16px;
  padding:32px 20px; text-align:center; cursor:pointer;
  transition:all .3s; background:var(--card);
  position:relative; overflow:hidden;
  box-shadow:0 2px 12px var(--shadow);
  -webkit-tap-highlight-color:transparent;
}
.upload-zone::before {
  content:''; position:absolute; inset:0;
  background:linear-gradient(135deg,rgba(124,58,237,.05),rgba(6,182,212,.05));
  opacity:0; transition:opacity .3s;
}
.upload-zone:hover::before,.upload-zone:active::before,.upload-zone.dragover::before { opacity:1; }
.upload-zone:hover,.upload-zone:active,.upload-zone.dragover { border-color:var(--accent); }
.upload-icon { font-size:40px; margin-bottom:12px; display:block; }
.upload-zone h3 { font-family:'Syne',sans-serif; font-size:17px; font-weight:700; margin-bottom:6px; color:var(--text); }
.upload-zone p { color:var(--muted); font-size:13px; }
.upload-zone input { display:none; }
.btn-upload {
  display:inline-flex; align-items:center; justify-content:center;
  margin-top:18px; padding:12px 24px;
  background:linear-gradient(135deg,var(--accent),#5b21b6);
  border:none; border-radius:12px; color:#fff;
  font-family:'DM Sans',sans-serif; font-size:14px; font-weight:500;
  cursor:pointer; box-shadow:0 4px 20px rgba(124,58,237,.35);
  min-height:var(--tap); transition:transform .15s,box-shadow .15s;
  -webkit-tap-highlight-color:transparent;
}
.btn-upload:hover  { transform:translateY(-2px); box-shadow:0 6px 24px rgba(124,58,237,.5); }
.btn-upload:active { transform:scale(.97); }
@media(min-width:768px)  { .upload-zone { padding:48px 40px; border-radius:20px; } .upload-zone h3 { font-size:20px; } .upload-icon { font-size:48px; } }
@media(min-width:1920px) { .upload-zone { padding:60px 48px; } .upload-icon { font-size:56px; } }

/* ================================================
   CONTROLS
   ================================================ */
.controls {
  background:var(--card); border:1px solid var(--border);
  border-radius:16px; padding:18px; margin-top:14px;
  box-shadow:0 2px 8px var(--shadow); transition:background .25s, border-color .25s;
}
.controls h3 {
  font-family:'Syne',sans-serif; font-size:12px; font-weight:700;
  margin-bottom:16px; color:var(--muted); text-transform:uppercase; letter-spacing:1px;
}
.control-row { display:flex; flex-direction:column; gap:8px; margin-bottom:16px; }
.control-label { font-size:14px; font-weight:500; color:var(--text); }
input[type="range"] { width:100%; height:5px; border-radius:4px; accent-color:var(--accent); background:var(--border); cursor:pointer; }
.control-value { font-size:14px; font-weight:600; color:var(--accent2); }
select {
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  color:var(--text); font-family:'DM Sans',sans-serif; font-size:16px;
  padding:12px 14px; cursor:pointer; outline:none; width:100%;
  min-height:var(--tap); -webkit-appearance:none; appearance:none;
  transition:border-color .2s, background .25s;
}
select:focus { border-color:var(--accent); }
.num-input {
  background:var(--surface); border:1px solid var(--border); border-radius:10px;
  color:var(--text); font-size:16px; padding:12px 14px; width:100%;
  outline:none; font-family:'DM Sans',sans-serif; min-height:var(--tap);
  transition:border-color .2s, background .25s;
}
.num-input:focus { border-color:var(--accent); }
.checkbox-label {
  display:flex; align-items:center; gap:10px; cursor:pointer;
  font-size:14px; color:var(--text); min-height:var(--tap);
  -webkit-tap-highlight-color:transparent;
}
.checkbox-label input { accent-color:var(--accent); width:18px; height:18px; flex-shrink:0; }
.color-input { width:52px; height:var(--tap); border:1px solid var(--border); border-radius:8px; background:var(--surface); cursor:pointer; padding:4px; }
.color-hint { font-size:13px; color:var(--muted); }
.highlight { color:var(--accent2); }
@media(min-width:640px) {
  .controls { padding:24px; border-radius:18px; }
  .control-row { flex-direction:row; align-items:center; gap:14px; margin-bottom:18px; }
  .control-label { min-width:120px; flex-shrink:0; }
  input[type="range"] { flex:1; width:auto; min-width:100px; }
  select { width:auto; min-width:160px; }
  .num-input { width:130px; }
}
@media(min-width:1024px) { .controls { padding:28px; border-radius:20px; } }
@media(min-width:1920px) { .controls { padding:36px; } }

/* ================================================
   PREVIEW
   ================================================ */
.preview-area { display:grid; grid-template-columns:1fr; gap:12px; margin-top:14px; }
.preview-box {
  aspect-ratio: 4/3;
  background:var(--card); border:1px solid var(--border);
  border-radius:14px; padding:14px; text-align:center;
  transition:background .25s, border-color .25s; box-shadow:0 2px 8px var(--shadow);
}
.preview-box h4 { font-size:11px; text-transform:uppercase; letter-spacing:1px; color:var(--muted); margin-bottom:10px; font-weight:600; }
.preview-box img { max-width:100%; max-height:160px; border-radius:8px; object-fit:contain; }
.preview-info { margin-top:10px; font-size:13px; color:var(--muted); }
.preview-info span { color:var(--accent2); font-weight:600; }
@media(min-width:480px) { .preview-area { grid-template-columns:1fr 1fr; gap:14px; } }
@media(min-width:768px) { .preview-area { gap:18px; margin-top:18px; } .preview-box {
  aspect-ratio: 4/3; padding:18px; border-radius:18px; } .preview-box img { max-height:200px; } }
@media(min-width:1920px) { .preview-box img { max-height:260px; } .preview-box {
  aspect-ratio: 4/3; padding:24px; } }

.removal-preview {
  background: repeating-conic-gradient(#d0d5de 0% 25%,#e8ecf2 0% 50%) 0 0/20px 20px;
  border-radius:10px; padding:14px;
  display:flex; justify-content:center; align-items:center; min-height:110px;
}
.removal-preview img { max-width:100%; max-height:220px; border-radius:6px; }
#fundo-placeholder { color:var(--muted); font-size:12px; text-align:center; padding:16px; }

/* ================================================
   BUTTONS
   ================================================ */
.btn-action {
  width:100%; padding:16px;
  background:linear-gradient(135deg,var(--accent2),#0891b2);
  border:none; border-radius:14px; color:#fff;
  font-family:'Syne',sans-serif; font-size:15px; font-weight:700;
  cursor:pointer; margin-top:14px; letter-spacing:.5px;
  box-shadow:0 4px 20px rgba(6,182,212,.3); min-height:var(--tap);
  transition:transform .15s,box-shadow .15s;
  -webkit-tap-highlight-color:transparent;
}
.btn-action:hover  { transform:translateY(-2px); box-shadow:0 6px 26px rgba(6,182,212,.45); }
.btn-action:active { transform:scale(.98); }
.btn-action:disabled { opacity:.4; cursor:not-allowed; transform:none; }

.result-area {
  background:var(--card); border:1px solid rgba(16,185,129,.3);
  border-radius:16px; padding:22px 16px; margin-top:14px;
  text-align:center; display:none; box-shadow:0 2px 12px var(--shadow);
  transition:background .25s;
}
.result-area.show { display:block; animation:fadeUp .4s ease; will-change:transform,opacity; }
@keyframes fadeUp { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:translateY(0); } }
.result-icon { font-size:36px; margin-bottom:10px; }
.result-area h3 { font-family:'Syne',sans-serif; font-size:19px; margin-bottom:7px; color:var(--text); }
.result-area p { color:var(--muted); font-size:13px; margin-bottom:16px; line-height:1.5; }
.btn-download {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:14px 24px; width:100%;
  background:linear-gradient(135deg,var(--success),#059669);
  border:none; border-radius:12px; color:#fff;
  font-family:'Syne',sans-serif; font-size:15px; font-weight:700;
  cursor:pointer; text-decoration:none;
  box-shadow:0 4px 20px rgba(16,185,129,.3); min-height:var(--tap);
  transition:transform .15s,box-shadow .15s;
  -webkit-tap-highlight-color:transparent;
}
.btn-download:hover  { transform:translateY(-2px); box-shadow:0 6px 24px rgba(16,185,129,.4); }
.btn-download:active { transform:scale(.98); }
@media(min-width:480px)  { .btn-download { width:auto; } }
@media(min-width:768px)  { .result-area { padding:28px; border-radius:20px; } .btn-action { font-size:16px; margin-top:20px; } }
@media(min-width:1920px) { .btn-action { font-size:17px; padding:18px; } }

canvas { display:none; }

/* ================================================
   PROGRESS
   ================================================ */
.progress-wrap { margin-top:14px; display:none; }
.progress-wrap.show { display:block; }
.progress-bar-bg { background:var(--border); border-radius:100px; height:8px; overflow:hidden; }
.progress-bar-fill {
  height:100%; border-radius:100px;
  background:linear-gradient(90deg,var(--accent),var(--accent2));
  width:0%; transition:width .3s;
}
.progress-label { font-size:13px; color:var(--muted); margin-top:8px; text-align:center; }

/* ================================================
   VIDEO TOOLS
   ================================================ */
.video-info-box {
  background:var(--card); border:1px solid var(--border);
  border-radius:14px; padding:16px; margin-top:14px; display:none;
  transition:background .25s, border-color .25s;
}
.video-info-box.show { display:block; }
.video-info-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(100px,1fr)); gap:10px; margin-top:12px; }
.video-info-item { background:var(--surface); border-radius:10px; padding:10px 12px; transition:background .25s; }
.video-info-item .label { font-size:11px; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; }
.video-info-item .value { font-size:14px; font-weight:600; color:var(--accent2); margin-top:4px; }

.notice-box {
  background:rgba(245,158,11,.1); border:1px solid rgba(245,158,11,.3);
  border-radius:12px; padding:14px 16px;
  font-size:13px; line-height:1.6;
  color:#d97706;
}
.notice-box strong { color:#d97706; }
#vtrim-preview { width:100%; border-radius:12px; background:#000; max-height:220px; object-fit:contain; display:block; }

/* ================================================
   TEXT TOOLS GRID
   ================================================ */
.tool-grid-wrapper {
  max-width:var(--max-w); margin:0 auto;
  padding:0 16px 60px;
  display:grid; grid-template-columns:1fr; gap:20px;
  position:relative; z-index:10;
}
@media(min-width:768px)  { .tool-grid-wrapper { padding:0 24px 80px; gap:24px; } }
@media(min-width:1024px) { .tool-grid-wrapper { grid-template-columns:1fr 1fr; } }
.tool-card-wide { grid-column:1/-1; }

.tool-card {
  background:var(--card); border:1px solid var(--border); border-radius:20px;
  padding:22px 18px; display:flex; flex-direction:column; gap:16px;
  transition:border-color .2s, background .25s;
  box-shadow:0 2px 12px var(--shadow);
}
.tool-card:hover { border-color:rgba(124,58,237,.3); }
@media(min-width:768px) { .tool-card { padding:28px 24px; } }

.tool-card-header { display:flex; align-items:flex-start; gap:14px; }
.tool-card-icon { width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:22px; flex-shrink:0; }
.tool-card-title { font-family:'Syne',sans-serif; font-size:18px; font-weight:800; letter-spacing:-.5px; margin-bottom:4px; color:var(--text); }
.tool-card-desc { color:var(--muted); font-size:13px; line-height:1.5; margin:0; }
@media(min-width:768px) { .tool-card-icon { width:48px; height:48px; font-size:24px; } .tool-card-title { font-size:20px; } }

/* text controls row */
.text-controls {
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; padding:16px;
  display:flex; flex-direction:column; gap:14px;
  transition:background .25s, border-color .25s;
}
.tc-row { display:flex; flex-direction:column; gap:6px; }
.tc-label { font-size:13px; font-weight:500; color:var(--muted); }
.tc-text-input {
  background:var(--card); border:1px solid var(--border); border-radius:8px;
  color:var(--text); font-family:'DM Sans',sans-serif; font-size:15px;
  padding:10px 12px; outline:none; width:100%; min-height:44px;
  transition:border-color .2s, background .25s;
}
.tc-text-input:focus { border-color:var(--accent); }
.tc-text-input::placeholder { color:var(--muted); }
@media(min-width:640px) {
  .text-controls { flex-direction:row; align-items:center; flex-wrap:wrap; gap:16px; padding:18px 20px; }
  .tc-row { flex-direction:row; align-items:center; gap:10px; }
  .tc-label { white-space:nowrap; }
  .tc-text-input { width:180px; }
}

/* text preview */
.text-preview-box, .md-preview-box {
  background:var(--surface); border:1px solid var(--border);
  border-radius:14px; overflow:hidden;
  transition:background .25s, border-color .25s;
}
.text-preview-label {
  font-size:11px; text-transform:uppercase; letter-spacing:1px;
  color:var(--muted); padding:10px 14px;
  border-bottom:1px solid var(--border); font-weight:600;
}
.text-preview-content {
  font-family:'DM Mono',monospace; font-size:12px; color:#374151;
  padding:14px; max-height:180px; overflow-y:auto;
  white-space:pre-wrap; word-break:break-word; line-height:1.6;
}
.text-preview-content::-webkit-scrollbar { width:4px; }
.text-preview-content::-webkit-scrollbar-thumb { background:var(--accent); border-radius:4px; }
.pdf2txt-stats { font-size:12px; color:var(--muted); padding:0 2px; }
.pdf2txt-stats span { color:var(--accent2); font-weight:600; }

/* markdown rendered preview */
.md-rendered {
  padding:16px 18px; max-height:260px; overflow-y:auto;
  line-height:1.7; font-size:14px; color:#374151;
}
.md-rendered h1,.md-rendered h2,.md-rendered h3 { font-family:'Syne',sans-serif; color:var(--text); margin:14px 0 8px; }
.md-rendered h1 { font-size:20px; } .md-rendered h2 { font-size:17px; } .md-rendered h3 { font-size:15px; }
.md-rendered p { margin-bottom:10px; }
.md-rendered ul,.md-rendered ol { padding-left:18px; margin-bottom:10px; }
.md-rendered li { margin-bottom:4px; }
.md-rendered code { font-family:'DM Mono',monospace; background:var(--border); border-radius:4px; padding:2px 6px; font-size:12px; color:var(--accent2); }
.md-rendered pre { background:var(--card); border:1px solid var(--border); border-radius:8px; padding:12px; overflow-x:auto; margin-bottom:10px; }
.md-rendered pre code { background:none; padding:0; }
.md-rendered blockquote { border-left:3px solid var(--accent); padding-left:12px; color:var(--muted); margin:10px 0; }
.md-rendered a { color:var(--accent2); }
.md-rendered hr { border:none; border-top:1px solid var(--border); margin:16px 0; }
.md-rendered table { width:100%; border-collapse:collapse; font-size:13px; }
.md-rendered th,.md-rendered td { border:1px solid var(--border); padding:6px 10px; }
.md-rendered th { background:var(--card); color:var(--text); }
.md-rendered::-webkit-scrollbar { width:4px; }
.md-rendered::-webkit-scrollbar-thumb { background:var(--accent); border-radius:4px; }

/* rich editor */
.editor-toolbar {
  display:flex; align-items:center; gap:4px; flex-wrap:wrap;
  background:var(--surface); border:1px solid var(--border);
  border-radius:12px 12px 0 0; padding:8px 10px; border-bottom:none;
  transition:background .25s, border-color .25s;
}
.toolbar-btn {
  min-width:36px; min-height:36px; display:flex; align-items:center; justify-content:center;
  background:none; border:1px solid transparent; border-radius:7px; color:var(--text);
  font-family:'DM Sans',sans-serif; font-size:14px; cursor:pointer; padding:4px 8px;
  transition:all .15s; -webkit-tap-highlight-color:transparent;
}
.toolbar-btn:hover,.toolbar-btn:active { background:var(--border); border-color:var(--border); }
.toolbar-sep { width:1px; height:24px; background:var(--border); margin:0 4px; flex-shrink:0; }
.toolbar-select {
  background:var(--card); border:1px solid var(--border); border-radius:7px;
  color:var(--text); font-family:'DM Sans',sans-serif; font-size:13px;
  padding:6px 8px; cursor:pointer; outline:none; min-height:36px;
  transition:background .25s;
}
.rich-editor {
  background:var(--surface); border:1px solid var(--border);
  border-radius:0 0 12px 12px; min-height:180px; max-height:360px;
  padding:14px 16px; overflow-y:auto;
  font-family:'DM Sans',sans-serif; font-size:15px; line-height:1.7; color:var(--text);
  outline:none; transition:background .25s, border-color .25s;
}
.rich-editor[data-placeholder]:empty:before { content:attr(data-placeholder); color:var(--muted); pointer-events:none; }
.rich-editor:focus { border-color:rgba(124,58,237,.4); }
.rich-editor::-webkit-scrollbar { width:4px; }
.rich-editor::-webkit-scrollbar-thumb { background:var(--accent); border-radius:4px; }
@media(min-width:768px) { .rich-editor { min-height:220px; } }

/* dual panel */
.dual-panel { display:flex; flex-direction:column; gap:12px; }
.dual-side { display:flex; flex-direction:column; gap:8px; flex:1; }
.dual-label { display:flex; align-items:center; justify-content:space-between; font-size:13px; color:var(--muted); font-weight:500; }
.dual-middle { display:flex; align-items:center; justify-content:center; gap:10px; }
.code-area {
  background:var(--surface); border:1px solid var(--border); border-radius:12px;
  color:var(--text); font-family:'DM Mono',monospace; font-size:13px;
  padding:12px 14px; resize:vertical; outline:none;
  min-height:160px; width:100%; line-height:1.6;
  transition:border-color .2s, background .25s;
}
.code-area:focus { border-color:var(--accent); }
.code-area::placeholder { color:var(--muted); }
.code-area[readonly] { color:var(--accent2); cursor:default; }
.small-select {
  background:var(--surface); border:1px solid var(--border); border-radius:8px;
  color:var(--text); font-family:'DM Sans',sans-serif; font-size:13px;
  padding:7px 10px; cursor:pointer; outline:none;
  min-height:36px; -webkit-appearance:none; appearance:none;
  transition:background .25s;
}
.small-select:focus { border-color:var(--accent); }
.convert-arrow-btn {
  width:48px; height:48px; border-radius:50%;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  border:none; color:#fff; font-size:18px; cursor:pointer;
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
  box-shadow:0 4px 16px rgba(124,58,237,.4);
  transition:transform .15s,box-shadow .15s;
}
.convert-arrow-btn:active { transform:scale(.93); }
.copy-btn {
  padding:5px 12px; background:var(--surface); border:1px solid var(--border);
  border-radius:7px; color:var(--muted); font-family:'DM Sans',sans-serif;
  font-size:12px; cursor:pointer; transition:all .15s;
}
.copy-btn:active,.copy-btn.copied { background:var(--success); border-color:var(--success); color:#fff; }
@media(min-width:768px) {
  .dual-panel { flex-direction:row; align-items:flex-start; }
  .dual-middle { flex-direction:column; justify-content:center; padding-top:32px; flex-shrink:0; }
  .code-area { min-height:200px; }
}

/* ================================================
   STATIC PAGES
   ================================================ */
.page-content {
  position:relative; z-index:10; max-width:860px; margin:0 auto; padding:32px 16px 80px;
}
.page-content h1 {
  font-family:'Syne',sans-serif; font-size:clamp(26px,7vw,52px);
  font-weight:800; letter-spacing:-1.5px; margin-bottom:10px; line-height:1.1; color:var(--text);
}
.page-content .page-subtitle { color:var(--muted); font-size:15px; margin-bottom:32px; }
.page-content h2 { font-family:'Syne',sans-serif; font-size:18px; font-weight:700; margin:32px 0 12px; color:var(--accent2); }
.page-content p { color:var(--muted); line-height:1.8; font-size:15px; margin-bottom:14px; }
.page-content ul { padding-left:18px; margin-bottom:16px; }
.page-content ul li { color:var(--muted); line-height:1.8; font-size:15px; margin-bottom:6px; }
.page-content a { color:var(--accent2); text-decoration:none; }
.page-content a:hover { text-decoration:underline; }
.page-divider { border:none; border-top:1px solid var(--border); margin:32px 0; }
@media(min-width:768px)  { .page-content { padding:56px 32px 100px; } .page-content h2 { font-size:22px; } }
@media(min-width:1920px) { .page-content { max-width:1000px; padding:80px 48px 120px; } .page-content p { font-size:16px; } }

.about-cards { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:22px 0; }
.about-card {
  background:var(--card); border:1px solid var(--border); border-radius:16px;
  padding:18px 14px; text-align:center;
  transition:border-color .2s, background .25s; box-shadow:0 2px 8px var(--shadow);
}
.about-card:hover { border-color:var(--accent); }
.about-card .icon { font-size:28px; margin-bottom:10px; display:block; }
.about-card h3 { font-family:'Syne',sans-serif; font-size:14px; font-weight:700; margin-bottom:6px; color:var(--text); }
.about-card p { color:var(--muted); font-size:12px; line-height:1.5; margin:0; }
@media(min-width:640px) { .about-cards { grid-template-columns:repeat(4,1fr); gap:16px; } .about-card { padding:22px 18px; border-radius:20px; } .about-card .icon { font-size:32px; } .about-card h3 { font-size:15px; } .about-card p { font-size:13px; } }

.team-note {
  background:linear-gradient(135deg,rgba(124,58,237,.08),rgba(6,182,212,.08));
  border:1px solid rgba(124,58,237,.2); border-radius:16px;
  padding:22px 18px; margin:22px 0; text-align:center;
}
.team-note p { color:var(--text); font-size:15px; line-height:1.7; margin:0; }
@media(min-width:768px) { .team-note { padding:32px; border-radius:20px; } .team-note p { font-size:16px; } }

/* ================================================
   FOOTER
   ================================================ */
footer {
  position:relative; z-index:10; text-align:center;
  padding:24px 16px; border-top:1px solid var(--border);
  color:var(--muted); font-size:13px; transition:border-color .25s;
}
footer a { color:var(--muted); text-decoration:none; margin:0 8px; display:inline-flex; align-items:center; min-height:var(--tap); transition:color .2s; }
footer a:hover { color:var(--accent2); }
@media(min-width:1920px) { footer { font-size:14px; padding:32px; } }

/* ================================================
   INFO SECTIONS — scroll content below tools
   ================================================ */
.info-sections {
  position: relative; z-index: 10;
  max-width: var(--max-w); margin: 0 auto;
  padding: 60px 16px 80px;
}
@media(min-width:768px)  { .info-sections { padding: 80px 32px 100px; } }
@media(min-width:1024px) { .info-sections { padding: 80px 48px 100px; } }
@media(min-width:1440px) { .info-sections { padding: 80px 64px 100px; } }

/* section divider */
.info-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0 0 60px;
}

/* section title */
.info-section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(22px, 4vw, 36px);
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--text);
  margin-bottom: 10px;
}
.info-section-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 40px;
  max-width: 560px;
  line-height: 1.6;
}

/* ---- FEATURE CARDS ---- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 64px;
}
@media(min-width:640px)  { .feature-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width:1024px) { .feature-grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media(min-width:1920px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  box-shadow: 0 2px 8px var(--shadow);
}
.feature-card:hover {
  border-color: rgba(124,58,237,.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--shadow);
}
.feature-card-icon {
  font-size: 28px;
  margin-bottom: 12px;
  display: block;
}
.feature-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-card-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ---- HOW-TO STEPS ---- */
.steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 64px;
}
@media(min-width:640px)  { .steps-grid { grid-template-columns: 1fr 1fr; } }
@media(min-width:1024px) { .steps-grid { grid-template-columns: repeat(4, 1fr); } }

.step-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px 20px;
  position: relative;
  box-shadow: 0 2px 8px var(--shadow);
}
.step-number {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 50%;
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 800;
  color: #fff;
  margin-bottom: 14px;
  flex-shrink: 0;
}
.step-title {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.step-desc {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}

/* ---- FAQ ---- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 64px;
  max-width: 800px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 6px var(--shadow);
  transition: border-color .2s;
}
.faq-item:hover { border-color: rgba(124,58,237,.2); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  cursor: pointer;
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  gap: 12px;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.faq-arrow {
  font-size: 18px;
  color: var(--accent);
  transition: transform .25s;
  flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer {
  display: none;
  padding: 0 20px 18px;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.faq-item.open .faq-answer { display: block; }

/* ---- TRUST STRIP ---- */
.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 2px 8px var(--shadow);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.trust-item span.icon { font-size: 18px; }
.trust-sep {
  width: 1px; height: 20px;
  background: var(--border);
}
@media(max-width:639px) { .trust-sep { display: none; } }

/* ── Crop aspect ratio buttons ── */
.crop-asp-btn {
  padding: 5px 12px;
  border-radius: 8px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .15s;
}
.crop-asp-btn.active,
.crop-asp-btn:hover {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

/* Performance: lazy render off-screen sections */
.info-section, .faq-section {
  content-visibility: auto;
  contain-intrinsic-size: 0 400px;
}
