:root {
  --bg: #070a12;
  --bg-soft: #0d1220;
  --text: #f8fafc;
  --muted: #94a3b8;
  --card: rgba(15, 23, 42, 0.72);
  --card-strong: rgba(15, 23, 42, 0.92);
  --line: rgba(148, 163, 184, 0.18);
  --accent: #7c3aed;
  --accent-2: #06b6d4;
  --success: #22c55e;
  --shadow: 0 24px 80px rgba(0, 0, 0, .42);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: #070a12;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}



.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 18, .72);
  backdrop-filter: blur(18px);
}

nav {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.logo, nav a:first-child {
  font-weight: 800;
  letter-spacing: -.04em;
  color: #fff;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 650;
  padding: 10px 12px;
  border-radius: 999px;
  transition: .2s ease;
}

nav a:hover {
  color: #fff;
  background: rgba(255,255,255,.07);
}

.nav-cta {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(124, 58, 237, .28);
}

main {
  flex: 1;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 28px;
  align-items: center;
  padding: 42px 0 58px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c4b5fd;
  background: rgba(124, 58, 237, .12);
  font-size: 13px;
  font-weight: 700;
}

h1, h2, h3 { margin: 0; letter-spacing: -.045em; }
h1 { margin-top: 18px; font-size: clamp(44px, 8vw, 82px); line-height: .94; }
h2 { font-size: clamp(30px, 5vw, 48px); line-height: 1; margin-bottom: 14px; }
h3 { font-size: 20px; }

.lead {
  max-width: 640px;
  color: #cbd5e1;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.65;
  margin: 22px 0 30px;
}

.actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn, .tool a, footer a, .ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 18px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  font-weight: 800;
  border: 1px solid rgba(255,255,255,.1);
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn, .tool a {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 38px rgba(6, 182, 212, .18);
}

.ghost-btn { background: rgba(255,255,255,.06); }
.btn:hover, .tool a:hover, .ghost-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.card, .tool, .policy-card, .glass {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card::before, .tool::before, .policy-card::before, .glass::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent);
}

.hero-card { padding: 26px; }
.preview-window { min-height: 430px; padding: 18px; }
.window-bar { display: flex; gap: 8px; margin-bottom: 20px; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,.24); }
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.stat { padding: 18px; border-radius: 22px; background: rgba(255,255,255,.055); border: 1px solid var(--line); }
.stat strong { display: block; font-size: 30px; letter-spacing: -.05em; }
.stat span { color: var(--muted); font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 24px; }
.card { padding: 24px; }
.card p, .tool p, .policy-card p, li { color: #cbd5e1; line-height: 1.7; }

.tool { padding: 22px; }
#tools { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 24px; }
.tool p { min-height: 54px; }

.policy-card { max-width: 860px; margin: 0 auto; padding: 34px; }
.policy-card h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1; }
.policy-card h2 { margin-top: 32px; font-size: 26px; }

footer {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
}
footer a { min-height: auto; padding: 8px 12px; background: rgba(255,255,255,.07); }

@media (max-width: 820px) {
  nav { min-height: auto; padding: 14px 0; align-items: flex-start; }
  .hero { grid-template-columns: 1fr; padding-top: 28px; }
  .grid, #tools { grid-template-columns: 1fr; }
  .preview-window { min-height: 300px; }
}


/* --- Видео-фон --- */
.fon-video {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2;
  opacity: 1;
  filter: brightness(0.55) saturate(1.2);
  pointer-events: none;
}

.video-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at top left, rgba(124, 58, 237, .28), transparent 34rem),
    radial-gradient(circle at top right, rgba(6, 182, 212, .18), transparent 30rem),
    rgba(7, 10, 18, .55);
}

li a {
  color: #93c5fd;
  font-weight: 700;
  text-decoration: none;
}

li a:hover {
  color: #bfdbfe;
}

.tools-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.tools-header h1 {
  margin: 0;
  font-size: 34px;
}

.tools-header p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.section-icon {
  color: #60a5fa;
  font-size: 22px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.category-card {
  position: relative;
  min-height: 150px;
  padding: 24px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #fff;
  text-decoration: none;
  transition: 0.2s ease;
}

.category-card:hover {
  transform: translateY(-4px);
  border-color: rgba(96, 165, 250, 0.55);
  background: rgba(37, 99, 235, 0.15);
}

.category-card h3 {
  margin-top: 22px;
  margin-bottom: 8px;
  font-size: 17px;
}

.category-card p {
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
}

.cat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
}

.arrow {
  position: absolute;
  right: 22px;
  top: 22px;
  color: #94a3b8;
}

.blue { background: rgba(37, 99, 235, .25); color: #3b82f6; }
.purple { background: rgba(126, 34, 206, .25); color: #a855f7; }
.violet { background: rgba(79, 70, 229, .25); color: #818cf8; }
.yellow { background: rgba(202, 138, 4, .25); color: #facc15; }
.green { background: rgba(22, 163, 74, .25); color: #22c55e; }
.orange { background: rgba(234, 88, 12, .25); color: #fb923c; }
.pink { background: rgba(219, 39, 119, .25); color: #f472b6; }
.cyan { background: rgba(8, 145, 178, .25); color: #22d3ee; }

@media (max-width: 1000px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .category-grid {
    grid-template-columns: 1fr;
  }
}

.teal { background: rgba(8, 145, 178, .25); color: #22d3ee; }
.red { background: rgba(220, 38, 38, .25); color: #f87171; }
.gray { background: rgba(71, 85, 105, .25); color: #94a3b8; }

/* ===== Category pages ===== */
.breadcrumbs {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #94a3b8;
  font-size: 13px;
  margin-bottom: 26px;
}

.breadcrumbs a {
  color: #cbd5e1;
  text-decoration: none;
  font-weight: 700;
}

.category-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 42px;
}

.category-title h1 {
  font-size: clamp(38px, 6vw, 56px);
  margin: 0;
}

.category-title p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

.tools-row-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.tools-row-title h2 {
  font-size: 24px;
  margin: 0;
}

.tools-row-title span {
  color: #60a5fa;
  font-weight: 800;
  font-size: 13px;
}

.utility-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-bottom: 52px;
}

.utility-card {
  position: relative;
  display: block;
  padding: 24px;
  border-radius: 14px;
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  transition: 0.2s ease;
}

.utility-card span {
  position: absolute;
  right: 22px;
  top: 22px;
  color: #94a3b8;
}

.utility-card p {
  margin: 14px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  font-weight: 500;
}

.utility-card:hover {
  transform: translateY(-3px);
  border-color: #60a5fa;
  color: #60a5fa;
  background: rgba(37, 99, 235, 0.15);
}

.soft-line {
  border: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.22);
  margin: 0 0 42px;
}

.other-header {
  margin-bottom: 20px;
}

.small-category-grid {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1000px) {
  .utility-grid,
  .small-category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .utility-grid,
  .small-category-grid {
    grid-template-columns: 1fr;
  }
}

/* ===== FORCE FIX ALL FORMATTERS ===== */

.glass.tool-workspace {
  display: block !important;
  padding: 32px !important;
}

.formatter-layout {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 24px !important;
}

.formatter-layout textarea {
  display: block !important;
  width: 100% !important;
  min-height: 260px !important;
}

.formatter-layout label {
  display: flex !important;
  flex-direction: column !important;
}

@media (max-width: 900px) {
  .formatter-layout {
    grid-template-columns: 1fr !important;
  }
}

/* ===== FINAL FIX TEXTAREA ===== */

.formatter-layout textarea {
  display: block !important;
  width: 100% !important;
  min-height: 260px !important;

  padding: 16px !important;
  border-radius: 12px !important;

  background: rgba(15, 23, 42, 0.9) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;

  color: #e5e7eb !important;
  font-family: monospace !important;
  font-size: 14px !important;

  outline: none !important;
}

.formatter-layout textarea::placeholder {
  color: #64748b;
}

.formatter-layout textarea:focus {
  border-color: #60a5fa !important;
}

.tool-button {
  background: rgba(148, 163, 184, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #fff;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
}

/* ===== FORMATTER SPACING + FIXED TEXTAREAS ===== */

.formatter-layout label {
  gap: 12px !important;
}

.formatter-layout label b {
  display: block !important;
  margin-bottom: 4px !important;
}

.formatter-layout textarea {
  height: 260px !important;
  min-height: 260px !important;
  max-height: 260px !important;
  resize: none !important;
}

.tool-workspace .actions {
  margin-top: 24px !important;
}