@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --bg:       #080808;
  --surface:  #101010;
  --card:     #131313;
  --border:   #1e1e1e;
  --border2:  #2a2a2a;
  --accent:   #c8f135;
  --accent2:  #ff6b35;
  --text:     #f0f0f0;
  --text2:    #a0a0a0;
  --muted:    #555;
  --radius:   14px;
  --radius-sm:8px;
  --mono:     'Inter', sans-serif;
  --sans:     'Inter', sans-serif;
  --shadow:   0 4px 24px rgba(0,0,0,0.4);
  --header-h: 64px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background: var(--bg); color: var(--text);
  font-family: var(--sans); min-height: 100vh;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

/* ── Header ── */
#site-header {
  position: sticky; top: 0; z-index: 300;
  display: flex; align-items: center; gap: 16px;
  padding: 0 32px; height: var(--header-h);
  background: linear-gradient(180deg, rgba(16,16,16,0.97), rgba(8,8,8,0.95));
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(200,241,53,0.12);
  box-shadow: 0 10px 28px rgba(0,0,0,0.28);
}
.logo {
  font-size: 20px; font-weight: 800;
  letter-spacing: -0.5px; text-decoration: none;
  color: var(--text); flex-shrink: 0;
}
.logo span { color: var(--accent); }
#main-nav {
  display: flex; gap: 8px; flex: 1;
  align-items: center;
}
.nav-link {
  font-family: var(--mono); font-size: 11px;
  color: #c8c8c8; text-decoration: none;
  padding: 10px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  transition: all 0.18s ease; white-space: nowrap;
  font-weight: 700;
  letter-spacing: .02em;
}
.nav-link:hover {
  color: var(--text);
  border-color: rgba(200,241,53,0.28);
  background: rgba(200,241,53,0.08);
  transform: translateY(-1px);
}
.nav-link.active {
  color: #101010;
  border-color: rgba(200,241,53,0.95);
  background: linear-gradient(180deg, #d7fb58, #c8f135);
  box-shadow: 0 10px 20px rgba(200,241,53,0.18);
}

/* ── Dropdown nav (hover-based) ── */
.nav-dropdown {
  position: relative;
}
.nav-dropdown__toggle {
  cursor: pointer;
  display: flex; align-items: center; gap: 5px;
}
.nav-dropdown__toggle::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.6;
  transition: transform 0.18s ease;
  flex-shrink: 0;
}
.nav-dropdown.active > .nav-dropdown__toggle {
  color: #101010;
  border-color: rgba(200,241,53,0.95);
  background: linear-gradient(180deg, #d7fb58, #c8f135);
  box-shadow: 0 10px 20px rgba(200,241,53,0.18);
}
.nav-dropdown:hover > .nav-dropdown__toggle {
  color: var(--text);
  border-color: rgba(200,241,53,0.28);
  background: rgba(200,241,53,0.08);
}
.nav-dropdown:hover > .nav-dropdown__toggle::after {
  transform: rotate(180deg);
}
.nav-dropdown__menu {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 200px;
  background: rgba(14,14,14,0.99);
  border: 1px solid rgba(200,241,53,0.18);
  border-radius: 12px;
  padding: 6px;
  backdrop-filter: blur(20px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5);
  z-index: 400;
  flex-direction: column; gap: 2px;
  /* bridge gap so hover doesn't break */
  margin-top: 0;
  padding-top: 10px;
}
/* invisible bridge between toggle and menu */
.nav-dropdown__menu::before {
  content: '';
  position: absolute;
  top: -10px; left: 0; right: 0;
  height: 10px;
}
.nav-dropdown:hover > .nav-dropdown__menu {
  display: flex;
}
.nav-dropdown__item {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .02em;
  color: #c8c8c8; text-decoration: none;
  padding: 9px 14px;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.nav-dropdown__item:hover {
  color: var(--text);
  background: rgba(200,241,53,0.08);
  border-color: rgba(200,241,53,0.2);
}
.nav-dropdown__item.active {
  color: #101010;
  background: linear-gradient(180deg, #d7fb58, #c8f135);
  border-color: rgba(200,241,53,0.9);
}
.header-right { display: flex; align-items: center; gap: 10px; }
.lang-switcher { display: flex; gap: 3px; }
.lang-btn {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08);
  color: #c8c8c8; padding: 6px 10px;
  border-radius: 999px; cursor: pointer;
  font-family: var(--mono); font-size: 10px;
  transition: all 0.15s; font-weight: 700;
}
.lang-btn.active, .lang-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(200,241,53,0.07); }
.burger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 6px; width: 36px;
}
.burger span {
  display: block; height: 2px;
  background: var(--text2); border-radius: 2px;
  transition: all 0.2s;
}

/* ── Hero ── */
.hero {
  text-align: center;
  padding: 72px 40px 56px;
  position: relative;
}
.hero-tag {
  display: inline-block; margin-bottom: 22px;
  font-family: var(--mono); font-size: 11px;
  color: var(--accent); border: 1px solid rgba(200,241,53,0.3);
  padding: 5px 16px; border-radius: 20px;
  animation: fadeUp .5s ease both;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 800; line-height: 1.0;
  letter-spacing: -3px; margin-bottom: 22px;
  animation: fadeUp .5s ease .08s both;
}
.hero h1 em { font-style: normal; color: var(--accent); }
.hero p {
  font-family: var(--mono); font-size: 14px;
  color: var(--text2); max-width: 500px;
  margin: 0 auto 40px; line-height: 1.7;
  animation: fadeUp .5s ease .16s both;
}

/* ── Tool cards grid (homepage) ── */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px; max-width: 1120px;
  margin: 0 auto; padding: 0 32px 80px;
}
.tool-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px 26px;
  text-decoration: none; color: var(--text);
  transition: all 0.22s; display: flex; flex-direction: column;
  animation: fadeUp .5s ease both;
}
.tool-card:hover {
  border-color: rgba(200,241,53,0.5);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.tool-card .tc-icon { font-size: 34px; margin-bottom: 16px; }
.tool-card h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.tool-card p {
  font-family: var(--mono); font-size: 12px;
  color: var(--text2); line-height: 1.65;
}
.tool-card .tc-arrow {
  display: inline-block; margin-top: auto; padding-top: 18px;
  font-family: var(--mono); font-size: 11px;
  color: var(--accent);
}
.tool-card.coming {
  border-style: dashed; cursor: default;
  opacity: .7;
}
.tool-card.coming:hover { transform: none; box-shadow: none; }

/* ── Tool page layout ── */
.tool-page {
  max-width: 880px; margin: 0 auto;
  padding: 48px 32px 96px;
}
.page-breadcrumb {
  font-family: var(--mono); font-size: 11px;
  color: var(--muted); margin-bottom: 20px;
  display: flex; align-items: center; gap: 6px;
}
.page-breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.page-breadcrumb a:hover { color: var(--accent); }
.page-breadcrumb .sep { color: var(--border2); }
.page-title {
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 800; letter-spacing: -2px;
  line-height: 1.1; margin-bottom: 10px;
  animation: fadeUp .4s ease both;
}
.page-subtitle {
  font-family: var(--mono); font-size: 13px;
  color: var(--text2); line-height: 1.6;
  margin-bottom: 32px;
  animation: fadeUp .4s ease .08s both;
}

/* ── Dropzone ── */
.dropzone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius); padding: 56px 24px;
  text-align: center; cursor: pointer;
  transition: all 0.2s; position: relative;
  animation: fadeUp .4s ease .1s both;
  background: var(--card);
}
.dropzone:hover, .dropzone.drag-over {
  border-color: var(--accent);
  background: rgba(200,241,53,0.03);
}
.dropzone input[type="file"] {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; width: 100%; height: 100%;
}
.dz-icon { font-size: 42px; margin-bottom: 14px; }
.dz-title { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.dz-sub {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); line-height: 1.7;
}
.dz-sub strong { color: var(--text2); }

.dropzone.has-preview {
  padding: 16px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dz-preview-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dz-preview-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 12px;
  border: 1px solid var(--border2);
  object-fit: contain;
  box-shadow: var(--shadow);
}
.dz-preview-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text2);
  word-break: break-word;
}

/* ── Controls ── */
.controls-row {
  display: flex; gap: 14px; flex-wrap: wrap;
  align-items: flex-end; margin-top: 20px;
  animation: fadeUp .4s ease .14s both;
}
.ctrl-group { display: flex; flex-direction: column; gap: 7px; }
.ctrl-label {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 1px;
}
select, input[type="number"], input[type="text"] {
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text); padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 12px;
  outline: none; transition: border-color .18s;
  -webkit-appearance: none;
}
select:focus, select:hover,
input[type="number"]:focus, input[type="number"]:hover,
input[type="text"]:focus, input[type="text"]:hover {
  border-color: var(--accent);
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center;
  justify-content: center; gap: 7px;
  background: var(--accent); color: #000;
  border: none; padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--sans); font-weight: 700;
  font-size: 14px; cursor: pointer;
  transition: all .18s; white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: #d5ff45; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none !important; }
.btn-ghost {
  background: transparent; border: 1px solid var(--border2);
  color: var(--text2); padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: var(--mono); font-size: 11px;
  cursor: pointer; transition: all .18s;
  white-space: nowrap;
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(200,241,53,0.05); }
.btn-ghost.active { border-color: var(--accent); color: var(--accent); background: rgba(200,241,53,0.08); }
.btn-sm { padding: 8px 16px; font-size: 12px; }

/* ── Range slider ── */
.range-row { display: flex; align-items: center; gap: 14px; }
input[type="range"] {
  -webkit-appearance: none; width: 200px; height: 4px;
  border-radius: 2px; background: var(--border2);
  border: none; padding: 0; cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 18px; height: 18px;
  border-radius: 50%; background: var(--accent); cursor: pointer;
  box-shadow: 0 0 0 3px rgba(200,241,53,0.2);
}
.range-val {
  font-family: var(--mono); font-size: 20px;
  font-weight: 700; color: var(--accent); min-width: 52px;
}

/* ── Status ── */
.status {
  font-family: var(--mono); font-size: 12px;
  padding: 12px 16px; border-radius: var(--radius-sm);
  margin-top: 14px; display: none; line-height: 1.5;
}
.status.show   { display: block; }
.status.info   { background: rgba(255,255,255,.04); color: var(--text2); border: 1px solid var(--border2); }
.status.success{ background: rgba(200,241,53,.07); color: var(--accent); border: 1px solid rgba(200,241,53,.2); }
.status.error  { background: rgba(255,107,53,.07); color: var(--accent2); border: 1px solid rgba(255,107,53,.2); }
.status.loading{
  background: rgba(255,255,255,.04); color: var(--text2);
  border: 1px solid var(--border2);
}
.status.loading::before {
  content: ''; display: inline-block;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid var(--border2); border-top-color: var(--accent);
  animation: spin .6s linear infinite; margin-right: 8px;
  vertical-align: middle;
}

/* ── Progress bar ── */
.progress-wrap {
  height: 4px; background: var(--border);
  border-radius: 2px; overflow: hidden;
  margin-top: 12px; display: none;
}
.progress-wrap.show { display: block; }
.progress-fill {
  height: 100%; background: var(--accent);
  border-radius: 2px; width: 0%;
  transition: width .3s;
}

/* ── Stats row ── */
.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.stat-box {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: var(--radius-sm); padding: 14px 20px;
  font-family: var(--mono); min-width: 100px;
}
.stat-box .sv { font-size: 22px; font-weight: 700; color: var(--accent); }
.stat-box .sl { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 3px; }

/* ── Before/After slider ── */
.ba-wrap {
  position: relative; overflow: hidden;
  border-radius: var(--radius); border: 1px solid var(--border2);
  margin-top: 24px; cursor: col-resize;
  user-select: none; touch-action: pan-y;
  display: none; background: #000;
}
.ba-wrap.show { display: block; }
.ba-after, .ba-before {
  width: 100%; display: block;
}
.ba-before-wrap {
  position: absolute; top: 0; left: 0; bottom: 0;
  overflow: hidden;
  border-right: 2px solid var(--accent);
}
/* width/height/position задаются через JS в initBASlider */
.ba-before-wrap img { display: block; }
.ba-handle {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--accent); border: 3px solid #000;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: #000; font-weight: 900;
  box-shadow: var(--shadow); pointer-events: none;
  z-index: 2;
}
.ba-labels {
  position: absolute; top: 12px;
  width: 100%; display: flex; justify-content: space-between;
  padding: 0 14px; pointer-events: none;
}
.ba-label {
  font-family: var(--mono); font-size: 10px; font-weight: 700;
  background: rgba(0,0,0,0.6); color: #fff;
  padding: 4px 10px; border-radius: 4px;
  text-transform: uppercase; letter-spacing: 1px;
}
.ba-after-img { width: 100%; display: block; max-height: 460px; object-fit: contain; }

/* ── Presets group ── */
.presets-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* ── Resize mode buttons ── */
.mode-btns { display: flex; gap: 8px; }

/* ── Crop grid ── */
.crop-grid {
  display: grid; grid-template-columns: repeat(3,36px);
  grid-template-rows: repeat(3,36px); gap: 3px;
  margin-top: 8px;
}
.crop-cell {
  background: var(--surface); border: 1px solid var(--border2);
  border-radius: 4px; cursor: pointer;
  transition: all .15s; display: flex;
  align-items: center; justify-content: center;
  font-size: 10px;
}
.crop-cell:hover { border-color: var(--accent); background: rgba(200,241,53,0.1); }
.crop-cell.active { background: var(--accent); border-color: var(--accent); }

/* ── YT thumb grid ── */
.thumb-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px; margin-top: 24px;
}
.thumb-card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--radius); overflow: hidden;
  transition: border-color .2s;
}
.thumb-card:hover { border-color: var(--accent); }
.thumb-card img { width: 100%; display: block; cursor: zoom-in; }
.thumb-footer {
  display: flex; justify-content: space-between;
  align-items: center; padding: 10px 14px;
}
.thumb-qlabel { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.thumb-dl {
  font-family: var(--mono); font-size: 11px; color: var(--accent);
  border: 1px solid rgba(200,241,53,.3); padding: 4px 12px;
  border-radius: 4px; cursor: pointer; background: none;
  transition: all .15s;
}
.thumb-dl:hover { background: rgba(200,241,53,.1); }

/* ── Video page ── */
.fmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(90px,1fr));
  gap: 8px; margin-top: 8px;
}
.fmt-btn {
  background: var(--surface); border: 1px solid var(--border2);
  color: var(--text2); padding: 12px 8px;
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  text-align: center; transition: all .18s;
}
.fmt-btn:hover, .fmt-btn.active {
  border-color: var(--accent); color: var(--accent);
  background: rgba(200,241,53,.06);
}
.ffmpeg-badge {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
  border: 1px solid var(--border); padding: 6px 14px;
  border-radius: 20px; margin-bottom: 20px;
}
.ffmpeg-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--border2); transition: background .3s;
}
.ffmpeg-badge.ready { border-color: rgba(200,241,53,.3); color: var(--accent); }
.ffmpeg-badge.ready .ffmpeg-dot { background: var(--accent); }
.video-result { margin-top: 20px; display: none; }
.video-result.show { display: block; }
.video-result video {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border2); background: #000;
}

/* ── Ad slots ── */
.ad-slot { margin: 24px 0; }
.ad-placeholder {
  background: var(--surface); border: 1px dashed var(--border2);
  border-radius: var(--radius-sm); padding: 20px;
  text-align: center; min-height: 90px;
  display: flex; align-items: center; justify-content: center;
}
.ad-placeholder span {
  font-family: var(--mono); font-size: 11px;
  color: var(--border2); text-transform: uppercase; letter-spacing: 2px;
}

/* ── Cookie banner ── */
#cookie-banner {
  position: fixed; bottom: 0; left: 0; right: 0;
  z-index: 1000; padding: 16px 24px;
  background: rgba(19,19,19,0.97);
  border-top: 1px solid var(--border2);
  backdrop-filter: blur(10px);
}
.cookie-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; align-items: center;
  justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.cookie-text { font-family: var(--mono); font-size: 12px; color: var(--text2); line-height: 1.6; }
.cookie-text a { color: var(--accent); }
.cookie-btns { display: flex; gap: 8px; flex-shrink: 0; }
.btn-cookie-accept {
  background: var(--accent); color: #000; border: none;
  padding: 9px 20px; border-radius: 6px;
  font-family: var(--sans); font-weight: 700; font-size: 13px;
  cursor: pointer; transition: background .15s;
}
.btn-cookie-accept:hover { background: #d5ff45; }
.btn-cookie-decline {
  background: transparent; border: 1px solid var(--border2);
  color: var(--muted); padding: 9px 16px; border-radius: 6px;
  font-family: var(--mono); font-size: 12px;
  cursor: pointer; transition: all .15s;
}
.btn-cookie-decline:hover { border-color: var(--text2); color: var(--text2); }

/* ── Footer ── */
#site-footer {
  border-top: 1px solid var(--border);
  padding: 52px 32px 28px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1120px; margin: 0 auto;
  display: flex; gap: 48px; flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.footer-brand { flex: 1; min-width: 200px; }
.footer-brand p {
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); line-height: 1.7; margin-top: 14px;
  max-width: 280px;
}
.footer-links-group { display: flex; gap: 36px; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; gap: 8px; min-width: 120px; }
.footer-col-title {
  font-family: var(--mono); font-size: 10px;
  color: var(--muted); text-transform: uppercase;
  letter-spacing: 2px; margin-bottom: 4px;
}
.footer-col a {
  font-family: var(--mono); font-size: 12px;
  color: var(--text2); text-decoration: none; transition: color .15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1120px; margin: 20px auto 0;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--muted);
}

/* ── Admin ── */
.admin-layout {
  display: flex; min-height: 100vh;
}
.admin-sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 24px 16px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .logo { margin-bottom: 32px; display: block; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 12px;
  color: var(--muted); text-decoration: none;
  padding: 9px 12px; border-radius: 7px;
  transition: all .15s; border: 1px solid transparent;
}
.admin-nav a:hover { color: var(--text2); background: var(--card); }
.admin-nav a.active { color: var(--accent); background: rgba(200,241,53,.07); border-color: rgba(200,241,53,.2); }
.admin-main { flex: 1; padding: 40px 36px; overflow-x: auto; }
.admin-title { font-size: 28px; font-weight: 800; letter-spacing: -1px; margin-bottom: 28px; }
.kpi-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 32px; }
.kpi-card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--radius); padding: 22px 26px;
  flex: 1; min-width: 160px;
}
.kpi-val { font-size: 32px; font-weight: 800; color: var(--accent); letter-spacing: -1px; }
.kpi-lbl { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 1px; }
.admin-table {
  width: 100%; border-collapse: collapse;
  font-family: var(--mono); font-size: 12px;
}
.admin-table th {
  text-align: left; padding: 10px 14px;
  border-bottom: 1px solid var(--border2);
  color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.admin-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  color: var(--text2);
}
.admin-table tr:hover td { background: var(--surface); }
.badge {
  display: inline-block; padding: 2px 8px;
  border-radius: 4px; font-size: 10px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-convert { background: rgba(200,241,53,.15); color: var(--accent); }
.badge-compress { background: rgba(100,200,255,.15); color: #64c8ff; }
.badge-resize   { background: rgba(255,180,50,.15);  color: #ffb432; }
.badge-youtube  { background: rgba(255,70,70,.15);   color: #ff4646; }
.badge-video    { background: rgba(180,100,255,.15); color: #b464ff; }

/* ── Info pages ── */
.content-page {
  max-width: 780px; margin: 0 auto;
  padding: 56px 32px 96px;
}
.content-page h1 { font-size: clamp(28px,4vw,48px); font-weight: 800; letter-spacing: -2px; margin-bottom: 8px; }
.content-page .subtitle { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 40px; }
.content-page h2 { font-size: 20px; font-weight: 700; margin: 36px 0 12px; color: var(--text); }
.content-page p  { font-family: var(--mono); font-size: 13px; color: var(--text2); line-height: 1.8; margin-bottom: 14px; }
.content-page ul { margin: 0 0 14px 20px; }
.content-page li { font-family: var(--mono); font-size: 13px; color: var(--text2); line-height: 1.8; }
.content-page a  { color: var(--accent); text-decoration: underline; }

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 768px) {
  #site-header { padding: 0 16px; }
  #main-nav { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: rgba(8,8,8,0.97); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 12px 16px 20px; gap: 4px;
    backdrop-filter: blur(16px); z-index: 200;
  }
  #main-nav.open { display: flex; }
  .nav-link { padding: 10px 14px; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown__toggle { width: 100%; justify-content: space-between; }
  .nav-dropdown__menu {
    display: none; position: static; width: 100%;
    background: rgba(255,255,255,0.03); border-radius: 8px;
    border-color: rgba(255,255,255,0.07);
    box-shadow: none; backdrop-filter: none;
    margin-top: 4px; padding: 4px;
  }
  .nav-dropdown__menu::before { display: none; }
  .nav-dropdown__menu.open { display: flex; }
  .nav-dropdown__item { padding: 9px 12px; }
  .burger { display: flex; }
  .hero { padding: 44px 20px 36px; }
  .hero h1 { letter-spacing: -2px; }
  .tools-grid { padding: 0 16px 60px; grid-template-columns: 1fr; }
  .tool-page { padding: 32px 16px 72px; }
  .thumb-grid { grid-template-columns: 1fr; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: static; }
  .admin-main { padding: 20px 16px; }
  #site-footer { padding: 40px 20px 24px; }
  .footer-inner { gap: 32px; }
  .content-page { padding: 36px 20px 72px; }
}

/* ── Tool page with sidebar ad ── */
.tool-page-wrap {
  display: flex;
  gap: 24px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
  align-items: flex-start;
}
.tool-page-wrap .tool-page {
  flex: 1;
  min-width: 0;
  padding: 48px 0 96px;
  max-width: 880px;
}
.ad-side {
  width: 300px;
  flex-shrink: 0;
  padding-top: 48px;
  position: sticky;
  top: 80px;
}
.ad-top    { margin: 0 0 20px; }
.ad-bottom { margin: 32px 0 0; }

@media(max-width: 1024px) {
  .ad-side { display: none; }
  .tool-page-wrap { padding: 0 16px; }
}
@media(max-width: 768px) {
  .tool-page-wrap { flex-direction: column; padding: 0 12px; }
  .tool-page-wrap .tool-page { padding: 24px 0 60px; }
}

/* ── SEO text block ── */
.seo-text {
  max-width: 880px; margin: 40px auto 0;
  padding: 0 32px 60px;
}
.seo-text-inner {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
  column-count: 2;
  column-gap: 32px;
}
@media(max-width:768px) {
  .seo-text-inner { column-count: 1; }
  .seo-text { padding: 0 16px 40px; }
}

/* ── Content pages (terms, privacy, about) ── */
.content-page {
  max-width: 780px; margin: 0 auto;
  padding: 56px 32px 80px;
  font-family: 'Syne', sans-serif;
}
.content-page h1 {
  font-size: clamp(32px,5vw,52px); font-weight:800;
  letter-spacing:-2px; margin-bottom:8px;
}
.content-page .subtitle {
  font-family: var(--mono); font-size:12px;
  color:var(--muted); margin-bottom:40px;
}
.content-page h2 {
  font-size:20px; font-weight:700;
  margin:36px 0 12px; color:var(--text);
  font-family:'Syne',sans-serif;
}
.content-page p {
  font-size:15px; color:var(--text2);
  line-height:1.8; margin-bottom:14px;
  font-family:'Syne',sans-serif;
}
.content-page ul { margin:0 0 14px 20px; }
.content-page li {
  font-size:15px; color:var(--text2);
  line-height:1.8; font-family:'Syne',sans-serif;
}
.content-page a { color:var(--accent); text-decoration:underline; }
@media(max-width:768px) {
  .content-page { padding:32px 20px 60px; }
}

.page-wrap--wide{max-width:min(1880px,calc(100vw - 24px));}
.thumbnail-tester-shell{margin:8px 0 0;border:1px solid var(--border2);border-radius:22px;overflow:hidden;background:#0f0f0f;box-shadow:var(--shadow);}
.ad-slot:empty{display:none;}
.ad-slot.ad-inline{margin:14px 0 18px;}
.ad-slot.ad-inline .ad-placeholder,.ad-slot.ad-side-inline .ad-placeholder{min-height:120px;}
.ad-slot.ad-side-inline{margin:14px 0 6px;}
.toggle-tooltip{position:relative;}
.toggle-tooltip .toggle-hint{position:absolute;left:48px;top:50%;transform:translateY(-50%);background:rgba(0,0,0,.88);color:#fff;border:1px solid rgba(255,255,255,.14);border-radius:10px;padding:7px 10px;font-size:12px;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s ease,transform .15s ease;z-index:10;}
.toggle-tooltip:hover .toggle-hint,.toggle-tooltip:focus-within .toggle-hint{opacity:1;transform:translateY(-50%) translateX(2px);}
@media (max-width:1000px){.page-wrap--wide{max-width:100%;padding-left:0;padding-right:0}.thumbnail-tester-shell{border-radius:0;border-left:none;border-right:none;}}


/* ── Download interstitial ── */
body.download-interstitial-open { overflow: hidden; }
.download-interstitial {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
}
.download-interstitial[hidden] { display: none; }
.download-interstitial__backdrop {
  position: absolute; inset: 0;
  background: rgba(5,8,12,.82);
  backdrop-filter: blur(4px);
}
.download-interstitial__dialog {
  position: relative; z-index: 1; width: min(680px, calc(100vw - 32px));
  background: var(--card); border: 1px solid var(--border2); border-radius: 22px;
  box-shadow: 0 28px 80px rgba(0,0,0,.45); padding: 28px;
}
.download-interstitial__eyebrow {
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.download-interstitial__title {
  font-size: clamp(26px, 4vw, 36px); line-height: 1.05; margin: 0 0 10px;
}
.download-interstitial__text {
  color: var(--text2); line-height: 1.6; margin: 0 0 18px;
}
.download-interstitial__timer {
  display: inline-flex; align-items: baseline; gap: 8px; margin-bottom: 20px;
  padding: 10px 14px; border-radius: 999px; background: rgba(200,241,53,.08);
  border: 1px solid rgba(200,241,53,.18); font-family: var(--mono); font-size: 12px;
}
.download-interstitial__timer strong { font-size: 22px; color: var(--accent); }
.download-interstitial__ad .ad-slot { margin: 0; }
.download-interstitial-page {
  max-width: 880px; margin: 0 auto; padding: 56px 24px 96px;
}
.download-gate-card {
  background: var(--card); border: 1px solid var(--border2); border-radius: 22px;
  padding: 28px; box-shadow: var(--shadow);
}
.download-gate-meta {
  font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 10px;
}
.download-gate-timer {
  display: flex; align-items: center; gap: 10px; margin: 14px 0 22px;
  font-family: var(--mono); color: var(--text2);
}
.download-gate-timer strong { font-size: 34px; color: var(--accent); }
.download-gate-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
@media (max-width: 640px) {
  .download-interstitial__dialog, .download-gate-card { padding: 20px; }
}

/* ── Home SEO intro block ── */
.home-seo-intro {
  max-width: 1120px;
  margin: 0 auto 32px;
  padding: 0 32px;
  text-align: center;
}
.home-seo-h1 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
  line-height: 1.3;
  letter-spacing: -0.5px;
}
.home-seo-text {
  font-family: var(--mono);
  font-size: clamp(11px, 1.5vw, 13px);
  color: var(--text2);
  line-height: 1.7;
  max-width: 820px;
  margin: 0 auto;
}
@media (max-width: 768px) {
  .home-seo-intro { padding: 0 16px; margin-bottom: 20px; }
  .home-seo-h1 { font-size: 18px; }
  .home-seo-text { font-size: 12px; }
}

/* ── Tool card arrow — short on mobile ── */
@media (max-width: 480px) {
  .tool-card { padding: 20px 18px; }
  .tool-card .tc-icon { font-size: 28px; margin-bottom: 10px; }
  .tool-card h3 { font-size: 15px; margin-bottom: 6px; }
  .tool-card p { font-size: 11px; }
  .tool-card .tc-arrow { font-size: 10px; margin-top: 12px; }
  .tools-grid { gap: 12px; }
}


/* ── Related tools / internal linking ── */
.related-tools {
  max-width: 1120px; margin: 24px auto 0; padding: 0 32px 8px;
}
.related-tools__head { margin-bottom: 14px; }
.related-tools__head h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 30px); }
.related-tools__head p { margin: 0; color: var(--text2); max-width: 760px; }
.related-tools__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 14px;
}
.related-tool-card {
  display: block; background: var(--card); border: 1px solid var(--border2); border-radius: 16px;
  padding: 18px; text-decoration: none; color: inherit; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.related-tool-card:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow); }
.related-tool-card__title { font-weight: 800; margin-bottom: 8px; }
.related-tool-card__desc { color: var(--text2); font-size: 13px; line-height: 1.55; }
.related-tool-card__cta { margin-top: 12px; font-family: var(--mono); font-size: 11px; color: var(--accent); }
@media (max-width: 768px) {
  .related-tools { padding: 0 16px 6px; }
  .related-tools__grid { grid-template-columns: 1fr; }
}


.related-tools { padding: 8px 0 10px; }
.related-tools__head { margin-bottom: 16px; }
.related-tools__head h2 { margin: 0 0 10px; font-size: clamp(22px, 3vw, 30px); }
.related-tools__head p { margin: 0; color: var(--text2); max-width: 760px; }
.related-tools__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.related-tool-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 180px;
  padding: 18px;
  border-radius: 16px;
  text-decoration: none;
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid var(--border2);
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.related-tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(200,241,53,.45);
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
}
.related-tool-card__top { display:flex; justify-content:flex-start; }
.related-tool-card__badge {
  display:inline-flex;
  align-items:center;
  height:26px;
  padding:0 10px;
  border-radius:999px;
  font: 700 11px/1 var(--mono);
  letter-spacing:.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(200,241,53,.08);
  border: 1px solid rgba(200,241,53,.18);
}
.related-tool-card__title { color: var(--text); font: 800 20px/1.2 var(--sans); }
.related-tool-card__desc {
  color: var(--text2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-tool-card__cta {
  margin-top: auto;
  color: var(--text);
  font-weight: 700;
}
@media (max-width: 900px) {
  .related-tools__grid { grid-template-columns: 1fr; }
}


/* AI tools shared framework */
.ai-tool-box{background:var(--card);border:1px solid var(--border2);border-radius:var(--radius);padding:28px;margin-bottom:24px}
.ai-label{display:block;font-weight:600;margin-bottom:10px;font-size:15px}
/* Кнопка перезагрузки после действия — показывается везде */
.ck-reload-btn{display:none;width:100%;margin-top:16px;font-size:15px;padding:14px 20px;font-weight:700;}
.ai-input-row{display:flex;gap:10px;margin-bottom:12px}
.ai-input-row input{flex:1;min-width:0}
.ai-input-col{display:flex;flex-direction:column;gap:10px;margin-bottom:12px}
.ai-textarea{width:100%;resize:vertical;font-family:inherit;font-size:14px;line-height:1.6;background:var(--bg2);border:1px solid var(--border2);color:var(--fg);padding:12px 14px;border-radius:8px;box-sizing:border-box;transition:border-color .15s}
.ai-textarea:focus{outline:none;border-color:var(--accent)}
.ai-limit-bar{font-family:var(--mono);font-size:11px;color:var(--muted);margin-bottom:8px;min-height:16px}
.ai-result-header{display:flex;justify-content:space-between;align-items:center;margin:18px 0 12px;gap:10px}
.btn-copy{font-size:12px;padding:5px 14px;border:1px solid var(--border2);background:transparent;color:var(--fg);cursor:pointer;border-radius:4px;font-family:var(--mono);transition:all .15s}
.btn-copy:hover{border-color:var(--accent);color:var(--accent)}
.ai-how-it-works{margin-top:32px;padding:24px;background:var(--card);border:1px solid var(--border2);border-radius:var(--radius)}
.ai-how-it-works h2{font-size:17px;margin:0 0 14px}
.ai-how-it-works ol{padding-left:18px;color:var(--muted);font-size:14px;line-height:1.8}
@media(max-width:600px){.ai-input-row{flex-direction:column}.ai-result-header{flex-direction:column;align-items:flex-start}}


/* ══════════════════════════════════════════════════
   Articles — List page
══════════════════════════════════════════════════ */
.articles-list-wrap {
  max-width: 860px; margin: 0 auto; padding: 48px 24px 80px;
}
.articles-list-inner {}
.articles-list-head {
  margin-bottom: 40px;
}
.articles-list-head h1 {
  font-size: clamp(28px, 4vw, 42px); font-weight: 800; margin-bottom: 10px;
}
.articles-list-head p {
  color: var(--text2); font-size: 16px; line-height: 1.6;
}
.articles-empty {
  color: var(--text2); font-size: 16px; padding: 48px 0; text-align: center;
}

/* Cards */
.articles-grid {
  display: flex; flex-direction: column; gap: 28px;
}
.article-card {
  display: flex; gap: 0; border-radius: 16px; overflow: hidden;
  background: var(--card); border: 1px solid var(--border2);
  text-decoration: none; color: inherit;
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.article-card:hover {
  border-color: rgba(200,241,53,.45); transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.article-card__img {
  flex-shrink: 0; width: 220px; min-height: 148px; overflow: hidden;
}
.article-card__img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.article-card:hover .article-card__img img { transform: scale(1.04); }
.article-card__img--placeholder {
  background: linear-gradient(135deg, #1a1a1a, #222);
}
.article-card__body {
  display: flex; flex-direction: column; gap: 8px; padding: 20px 22px;
}
.article-card__date {
  font-size: 11px; font-family: var(--mono); color: var(--muted); letter-spacing: .06em;
}
.article-card__title {
  font-size: 19px; font-weight: 800; line-height: 1.3; color: var(--text);
}
.article-card__excerpt {
  font-size: 14px; color: var(--text2); line-height: 1.6;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.article-card__cta {
  margin-top: auto; font-size: 12px; font-weight: 700; color: var(--accent);
  font-family: var(--mono);
}

/* Pagination */
.articles-pagination {
  display: flex; align-items: center; gap: 12px; margin-top: 40px; justify-content: center;
}
.articles-pg-btn {
  padding: 8px 22px; border-radius: 999px;
  border: 1px solid var(--border2); background: transparent;
  color: var(--text); font-size: 13px; font-weight: 700; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.articles-pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.articles-pg-info { font-size: 13px; color: var(--muted); font-family: var(--mono); }

@media (max-width: 640px) {
  .article-card { flex-direction: column; }
  .article-card__img { width: 100%; min-height: 180px; }
  .article-card__body { padding: 16px; }
}


/* ══════════════════════════════════════════════════
   Articles — Single page
══════════════════════════════════════════════════ */
.article-single-wrap {
  max-width: 760px; margin: 0 auto; padding: 40px 24px 80px;
}
.article-single {}
.article-back-link {
  display: inline-block; margin-bottom: 28px;
  font-size: 13px; font-weight: 700; font-family: var(--mono);
  color: var(--text2); text-decoration: none;
  transition: color .15s;
}
.article-back-link:hover { color: var(--accent); }
.article-hero-img {
  border-radius: 16px; overflow: hidden; margin-bottom: 28px;
}
.article-hero-img img { width: 100%; max-height: 420px; object-fit: cover; display: block; }
.article-meta-row {
  display: flex; gap: 16px; margin-bottom: 14px;
}
.article-date {
  font-size: 11px; font-family: var(--mono); color: var(--muted); letter-spacing: .06em;
}
.article-single-title {
  font-size: clamp(24px, 4vw, 40px); font-weight: 800; line-height: 1.2; margin-bottom: 28px;
}

/* TinyMCE content reset */
.tinymce-content { line-height: 1.75; color: var(--text); }
.tinymce-content h1,.tinymce-content h2,.tinymce-content h3,
.tinymce-content h4,.tinymce-content h5 {
  font-weight: 800; margin: 28px 0 12px; line-height: 1.25;
}
.tinymce-content h2 { font-size: clamp(20px, 3vw, 28px); }
.tinymce-content h3 { font-size: clamp(17px, 2.5vw, 22px); }
.tinymce-content p { margin-bottom: 16px; }
.tinymce-content a { color: var(--accent); text-decoration: underline; }
.tinymce-content a:hover { color: #fff; }
.tinymce-content ul,.tinymce-content ol { padding-left: 22px; margin-bottom: 16px; }
.tinymce-content li { margin-bottom: 6px; }
.tinymce-content img { max-width: 100%; border-radius: 10px; margin: 16px 0; }
.tinymce-content blockquote {
  border-left: 3px solid var(--accent); padding: 12px 20px; margin: 20px 0;
  background: rgba(200,241,53,.04); border-radius: 0 8px 8px 0;
  color: var(--text2); font-style: italic;
}
.tinymce-content pre,.tinymce-content code {
  background: #1a1a1a; border: 1px solid var(--border2); border-radius: 6px;
  font-family: monospace; font-size: 13px;
}
.tinymce-content pre { padding: 14px 16px; overflow-x: auto; margin-bottom: 16px; }
.tinymce-content code { padding: 2px 6px; }
.tinymce-content table { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.tinymce-content th,.tinymce-content td {
  border: 1px solid var(--border2); padding: 8px 12px; text-align: left;
}
.tinymce-content th { background: var(--card); font-weight: 700; }


/* ══════════════════════════════════════════════════
   Mobile fixes — header lang switcher + hero text
══════════════════════════════════════════════════ */

/* Desktop: lang-mobile hidden, lang-desktop shown */
.nav-lang-mobile { display: none; }
.lang-switcher--desktop { display: flex; }

/* ── Mobile ≤768px ─────────────────────────────── */
@media (max-width: 768px) {

  /* Header: logo stays, header-right only has burger */
  .lang-switcher--desktop { display: none; }

  /* Lang row — скрыта по умолчанию, показывается только в открытом меню */
  .nav-lang-mobile {
    display: none;
  }
  #main-nav.open .nav-lang-mobile {
    display: flex;
    gap: 6px;
    padding: 10px 14px 4px;
    border-top: 1px solid var(--border);
    margin-top: 4px;
  }
  #main-nav.open .nav-lang-mobile .lang-btn {
    flex: 1;
    text-align: center;
    padding: 8px 0;
    border-radius: 8px;
    font-size: 11px;
  }

  /* Hero h1: prevent overflow on narrow screens */
  .hero h1 {
    letter-spacing: -1px;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    font-size: clamp(32px, 10vw, 72px);
  }

  /* Hero subtitle: slightly larger for readability */
  .hero p {
    font-size: 13px;
    padding: 0 4px;
  }

  /* Tool page title on mobile */
  .page-title {
    font-size: clamp(24px, 7vw, 40px);
    letter-spacing: -0.5px;
    word-break: break-word;
  }

  /* Prevent horizontal overflow — на body, не на header (header overflow обрезает меню) */
  body {
    overflow-x: hidden;
  }
}

/* ── Very small screens ≤400px ─────────────────── */
@media (max-width: 400px) {
  .hero h1 {
    font-size: clamp(28px, 9vw, 48px);
    letter-spacing: -0.5px;
  }
  .logo {
    font-size: 17px;
  }
}
