/* ===== Base Theme (white/red/black) ===== */
:root {
  --bg: #0a0a0a;
  --bg-2: #0f0f12;
  --panel: #121217;
  --card: #121218cc;
  --text: #eaeaea;
  --muted: #9aa0a6;
  --red: #ff1744;
  --red-2: #ff0033;
  --white: #ffffff;
  --stroke: #1f1f28;
  --ring: #ff274b;
  --shadow: 0 20px 60px rgba(0,0,0,.45);

  --fade: 220ms;
  --bezier: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, #150009 0%, rgba(10,10,10,0) 60%),
    linear-gradient(#0a0a0a, #0b0b0f);
}

/* ==== Inline links (текстовые ссылки по сайту) ==== */
/* Делает ссылки красными, убирает синий/фиолетовый дефолт.
   Навигация и карточки переопределяют это ниже своими правилами. */
a { color: var(--red); text-decoration: none; transition: color var(--fade) var(--bezier); }
a:visited { color: var(--red); }
a:hover { color: var(--red-2); }
a:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(255,39,75,.15), inset 0 0 0 1px var(--ring); border-radius: 6px; }

/* Containers */
.container { width: min(1200px, 100% - 32px); margin: 0 auto; }
.section { padding: 32px 0 64px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(10px); background: rgba(10,10,12,.7); border-bottom: 1px solid var(--stroke); }
.header-grid { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 16px; padding: 14px 0; }
.brand, .brand-sm { font-weight: 800; letter-spacing: .5px; text-decoration: none; display: inline-flex; align-items: baseline; gap: 0; }
.brand .brand-y, .brand-sm .brand-y { color: var(--white); font-size: 26px; }
.brand .brand-2, .brand-sm .brand-2 {
  font-size: 28px; margin: 0 .5px; color: var(--red); position: relative; display: inline-block;
  animation: pulse2 2.2s infinite ease-in-out;
  text-shadow: 0 0 0 rgba(255,0,51,0.0);
}
.brand .brand-mate, .brand-sm .brand-mate { color: var(--white); font-size: 26px; }
.brand .brand-dot, .brand-sm .brand-dot { color: var(--red-2); font-size: 22px; margin-left: 2px; }

@keyframes pulse2 {
  0%, 100% { transform: translateY(0); text-shadow: 0 0 0 rgba(255,0,51,0.0); }
  50% { transform: translateY(-1px); text-shadow: 0 6px 12px rgba(255,0,51,0.35); }
}

.main-nav { display: flex; gap: 18px; align-items: center; }
.main-nav a {
  color: var(--text);               /* <- навигация остаётся белой */
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: border-color var(--fade) var(--bezier), background var(--fade) var(--bezier);
}
.main-nav a:hover { border-color: var(--stroke); background: rgba(255,255,255,0.03); }
.main-nav a.is-active { border-color: var(--ring); background: rgba(255,23,68,.08); color: #fff; }

.nav-burger { display: none; background: none; border: 0; cursor: pointer; width: 42px; height: 42px; border-radius: 10px; position: relative; }
.nav-burger span { position: absolute; left: 10px; right: 10px; height: 2px; background: #fff; transition: .25s var(--bezier); }
.nav-burger span:nth-child(1){ top: 13px; } .nav-burger span:nth-child(2){ top: 20px; } .nav-burger span:nth-child(3){ top: 27px; }
.nav-open .nav-burger span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-open .nav-burger span:nth-child(2){ opacity: 0; }
.nav-open .nav-burger span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

/* Hero */
.hero-section { position: relative; padding: 48px 0 28px; overflow: clip; }
.hero-title { font-size: clamp(26px, 3.6vw, 44px); line-height: 1.1; margin: 0 0 10px; }
.hero-sub { color: var(--muted); font-size: clamp(14px, 2.2vw, 18px); }
.hide-when-wide { display: inline; }
@media (min-width: 840px){ .hide-when-wide { display: none; } }

/* Blobs background */
.bg-blobs { position: absolute; inset: -30% -10% auto -10%; pointer-events: none; }
.bg-blobs span {
  position: absolute; width: 45vmax; height: 45vmax; filter: blur(60px);
  background: radial-gradient(circle at 30% 30%, rgba(255,23,68,.35), rgba(255,23,68,0) 60%);
  animation: blob 16s infinite ease-in-out;
}
.bg-blobs span:nth-child(2){ left: 40%; top: -10%; animation-duration: 20s; }
.bg-blobs span:nth-child(3){ left: 70%; top: -20%; animation-duration: 24s; }
@keyframes blob { 0%,100%{ transform: translate(0,0) scale(1);} 50%{ transform: translate(-6%,3%) scale(1.08);} }

/* Cards & Glass */
.glass {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  position: relative;
  overflow: hidden;
}
.glass::after{
  content:""; position:absolute; inset:-2px;
  background: conic-gradient(from 180deg at 50% 50%, rgba(255,23,68,.25), rgba(255,23,68,0), rgba(255,23,68,.25));
  filter: blur(16px); opacity: 0; transition: opacity var(--fade) var(--bezier);
  pointer-events: none;
}
.glass:hover::after{ opacity: .35; }

/* Converter */
.converter-section { padding: 12px 0 28px; }
.converter-card { padding: 18px; }
.converter-head h2 { margin: 0 0 6px; }
.converter-head .muted { margin: 0 0 10px; }
.converter-form .input-row { display: grid; gap: 12px; grid-template-columns: 1fr auto auto; align-items: end; }
.field { display: grid; gap: 8px; }
.field-label { color: var(--muted); font-size: 13px; }
input[type="text"], textarea {
  width: 100%; padding: 12px 14px; border: 1px solid var(--stroke); border-radius: 12px;
  background: #0f0f14; color: var(--text); outline: none; transition: .2s var(--bezier);
}
input[type="text"]:focus, textarea:focus { border-color: var(--ring); box-shadow: 0 0 0 4px rgba(255,39,75,.12); }

.formats { display: inline-flex; gap: 8px; align-items: center; }
.radio-pill { display: inline-flex; }
.radio-pill input { position: absolute; opacity: 0; }
.radio-pill span {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 42px; padding: 0 16px; border: 1px solid var(--stroke); border-radius: 12px; background: #0f0f14; cursor: pointer; transition: .2s var(--bezier); font-weight: 700;
  will-change: transform;
}
.radio-pill input:checked + span { border-color: var(--ring); color: #fff; background: linear-gradient(180deg, rgba(255,23,68,.18), rgba(255,23,68,.08)); }
.radio-pill span:hover{ transform: translateY(-1px); }

.btn {
  height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--stroke);
  background: #14141b; color: var(--text); font-weight: 800; letter-spacing: .3px; cursor: pointer; transition: transform var(--fade) var(--bezier), border-color var(--fade) var(--bezier), filter var(--fade) var(--bezier);
  will-change: transform;
}
.btn:hover { transform: translateY(-1px); border-color: var(--ring); }
.btn.primary { background: linear-gradient(180deg, #ff274b, #ff0031); color: #fff; border: none; }
.btn.primary:hover { filter: saturate(1.1) brightness(1.05); }

.result-wrap { margin-top: 16px; }
.result-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 6px; border-bottom: 1px dashed var(--stroke); }
.loader { display: inline-flex; gap: 10px; align-items: center; color: #fff; }
.spinner {
  width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); border-top-color: #fff; animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.frame-placeholder{
  display:grid; place-items:center; height:260px; border:1px dashed var(--stroke); border-radius:12px; margin-top:12px; background:#0f0f14;
}
.ph-inner{ display:grid; place-items:center; gap:10px; }
.ph-icon{ font-size:36px; line-height:1; opacity:.75 }
.ph-text{ color:var(--muted) }

.iframe-wrap { margin-top: 12px; border-radius: 12px; overflow: hidden; border: 1px solid var(--stroke); }

/* Thanks banner */
.thanks-banner {
  position: sticky; top: 64px; z-index: 40; margin: 12px auto; width: min(1200px, 100% - 32px);
  padding: 14px 16px; border: 1px solid var(--ring); border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,23,68,.18), rgba(255,23,68,.06));
  box-shadow: var(--shadow);
  font-size: clamp(18px, 3.2vw, 26px);
  font-weight: 900;
  text-transform: uppercase;
}

/* Catalogs */
.catalogs-section { padding: 8px 0 64px; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 980px){ .grid-2 { grid-template-columns: 1fr 1fr; } }

.catalog { padding: 18px; }
.catalog-head h2 { margin: 0 0 6px; }
.catalog .muted { margin: 0 0 8px; }

/* ===== Список ссылок: строго по одной карточке в строке ===== */
.link-cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr; /* только 1 колонка всегда */
  gap: 10px;
}

/* (УБРАНЫ медиа-квери, которые делали 2 колонки) */

.link-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: #0f0f14;
  transition: transform var(--fade) var(--bezier), box-shadow var(--fade) var(--bezier), border-color var(--fade) var(--bezier);
  will-change: transform;
  color: var(--text);              /* <- карточки остаются белыми, не красными */
}
.link-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(255,23,68,.12);
  border-color: rgba(255,23,68,.35);
}
.link-card .favicon { width: 24px; height: 24px; border-radius: 6px; overflow: hidden; background: #1a1a20; display: grid; place-items: center; }
.link-card .title { margin: 0; font-weight: 800; }
.link-card .url { color: var(--muted); font-size: 12px; word-break: break-all; }
.link-card .badges { display: inline-flex; gap: 8px; }
.badge { font-size: 11px; border: 1px solid var(--stroke); padding: 4px 8px; border-radius: 999px; }
.badge.red { border-color: var(--ring); color: #fff; background: rgba(255,23,68,.12); }

.card-actions { display: inline-flex; gap: 8px; }
.card-actions .btn { height: 36px; padding: 0 12px; }

/* Add block */
.add-block { margin-top: 12px; }
.add-form { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.hint { color: var(--muted); font-size: 12px; margin-top: 6px; }

/* Info blocks, steps */
.info-block { padding: 18px; }
.dash { margin: 10px 0; padding-left: 18px; }
.dash li { margin: 6px 0; }
.steps { padding: 18px; }
.steps ol { margin: 10px 0 0 18px; }
.tiny { font-size: 12px; }

/* Page hero (inner pages) */
.page-hero { padding: 28px 0; border-bottom: 1px solid var(--stroke); background: linear-gradient(180deg, rgba(255,23,68,.08), rgba(255,23,68,0)); }
.page-hero h1 { margin: 0 0 6px; }

/* Footer */
.site-footer { border-top: 1px solid var(--stroke); padding: 22px 0; background: rgba(10,10,12,.6); margin-top: 28px; }
.footer-grid { display: grid; gap: 14px; grid-template-columns: 1fr; align-items: start; }
.footer-nav { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-nav a { color: var(--text); text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color var(--fade) var(--bezier); }
.footer-nav a:hover { border-bottom-color: var(--ring); }
.legal { color: var(--muted); }
.brand-sm .brand-y{ font-size:20px } .brand-sm .brand-2{ font-size:22px } .brand-sm .brand-mate{ font-size:20px } .brand-sm .brand-dot{ font-size:18px }

/* Contact form */
.contact-form .field + .field { margin-top: 10px; }
.contact-form textarea { resize: vertical; min-height: 140px; }

/* Responsive */
@media (max-width: 880px){
  .main-nav { display: none; }
  .nav-burger { display: inline-block; }
  .nav-open .main-nav {
    display: grid; position: absolute; top: 60px; left: 0; right: 0; background: rgba(12,12,14,.98); padding: 10px 16px; border-bottom: 1px solid var(--stroke);
  }
  .converter-form .input-row { grid-template-columns: 1fr; }
}
