/* DUCK × MY × DUCK — фан-справочник v2. Тёмная тема, жёлтый акцент, игровые ассеты. */
:root {
  --bg: #14181f;
  --bg-soft: #1b212b;
  --bg-card: #202836;
  --bg-code: #161c26;
  --line: #2c3646;
  --text: #e8ecf2;
  --muted: #9aa7b8;
  --accent: #ffd23f;
  --accent-dark: #f2b705;
  --accent-ink: #1d1a05;
  --good: #4caf7d;
  --warn: #f5a623;
  --bad: #ef5b6e;
  --r-common: #9aa5b1;
  --r-uncommon: #4caf7d;
  --r-rare: #4f9cf9;
  --r-epic: #a56bf5;
  --r-legendary: #f5a623;
  --r-unique: #f5568c;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
main { max-width: 1080px; margin: 0 auto; padding: 24px 20px 64px; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Шапка ===== */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(20, 24, 31, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  max-width: 1080px; margin: 0 auto; padding: 10px 20px;
  display: flex; align-items: center; gap: 18px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 17px; color: var(--text); white-space: nowrap;
}
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: grid; place-items: center; font-size: 20px;
}
nav.main { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
nav.main a {
  color: var(--muted); padding: 8px 12px; border-radius: 9px; font-size: 15px;
}
nav.main a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
nav.main a.active { color: var(--accent-ink); background: var(--accent); font-weight: 700; }
.nav-cta { margin-left: 6px; }
.burger { display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  color: var(--text); border-radius: 9px; padding: 6px 12px; font-size: 20px; cursor: pointer; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: var(--accent-ink) !important; font-weight: 800; font-size: 16px;
  padding: 12px 22px; border-radius: 12px; border: 0; cursor: pointer;
  box-shadow: 0 4px 18px rgba(255, 210, 63, .22);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(255, 210, 63, .32); }
.btn.ghost {
  background: transparent; color: var(--accent) !important;
  border: 1px solid var(--line); box-shadow: none; font-weight: 700;
}
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { padding: 8px 16px; font-size: 14px; }

/* ===== Герой ===== */
.hero { text-align: center; padding: 58px 0 34px; }
.hero h1 {
  font-size: clamp(30px, 5vw, 48px); line-height: 1.15; margin: 14px 0 12px;
  font-weight: 900; letter-spacing: -.5px;
}
.hero h1 .yellow { color: var(--accent); }
.hero .kicker {
  display: inline-block; background: var(--bg-soft); border: 1px solid var(--line);
  color: var(--muted); font-size: 13.5px; padding: 5px 14px; border-radius: 999px;
}
.hero p.sub { color: var(--muted); max-width: 660px; margin: 0 auto 26px; font-size: 17.5px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin: 38px 0 8px;
}
.stat {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 14px; text-align: center;
}
.stat b { display: block; font-size: 24px; color: var(--accent); }
.stat span { color: var(--muted); font-size: 13.5px; }

/* ===== Лестница яиц (визуал) ===== */
.egg-ladder {
  display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  flex-wrap: wrap; margin: 26px auto; max-width: 720px;
}
.egg-ladder .step { text-align: center; width: 54px; }
.egg-ladder .step img { width: 100%; image-rendering: auto; filter: drop-shadow(0 4px 10px rgba(0,0,0,.45)); }
.egg-ladder .step span { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }
.egg-ladder .arrow { color: var(--accent); font-size: 17px; font-weight: 700; padding: 0 2px 18px; }

/* ===== Секции и карточки ===== */
section.block { margin: 40px 0; }
h2.title { font-size: 26px; margin: 0 0 6px; display: flex; align-items: center; gap: 10px; }
h2.title img.ic { width: 26px; height: 26px; }
p.lead { color: var(--muted); margin-top: 0; }
.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.c3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; display: flex; gap: 9px; align-items: baseline; }
.card h3 img { width: 22px; height: 22px; align-self: center; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.card .more { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; }
.card .big-ic { width: 46px; height: 46px; margin-bottom: 10px; }

/* ===== Таблицы ===== */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; min-width: 480px; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: var(--bg-soft); color: var(--muted); font-size: 13px;
  text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td img.cur { width: 18px; height: 18px; vertical-align: -4px; margin-right: 7px; }
td img.eggic { width: 34px; height: 34px; vertical-align: middle; display: block; }

/* ===== Бейджи редкости ===== */
.r { display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.r-common    { background: rgba(154,165,177,.16); color: var(--r-common); }
.r-uncommon  { background: rgba(76,175,125,.16);  color: var(--r-uncommon); }
.r-rare      { background: rgba(79,156,249,.16);  color: var(--r-rare); }
.r-epic      { background: rgba(165,107,245,.16); color: var(--r-epic); }
.r-legendary { background: rgba(245,166,35,.16);  color: var(--r-legendary); }
.r-unique    { background: rgba(245,86,140,.16);  color: var(--r-unique); }
.rus { font-weight: 700; }
.rus.c1 { color: var(--r-common); } .rus.c2 { color: var(--r-uncommon); }
.rus.c3 { color: var(--r-rare); } .rus.c4 { color: var(--r-epic); }
.rus.c5 { color: var(--r-legendary); } .rus.c6 { color: var(--r-unique); }

/* ===== Уведомления ===== */
.notice { border-radius: var(--radius); padding: 14px 18px; margin: 14px 0;
  border: 1px solid var(--line); background: var(--bg-card); font-size: 15px; }
.notice.good { border-color: rgba(76,175,125,.5); }
.notice.warn { border-color: rgba(245,166,35,.5); }
.notice.bad  { border-color: rgba(239,91,110,.5); }
.notice b.tag { display: block; margin-bottom: 4px; font-size: 13px;
  text-transform: uppercase; letter-spacing: .5px; }
.notice.good b.tag { color: var(--good); }
.notice.warn b.tag { color: var(--warn); }
.notice.bad b.tag { color: var(--bad); }

/* ===== Списки ===== */
ul.plain { margin: 8px 0; padding-left: 22px; }
ul.plain li { margin: 6px 0; }
li::marker { color: var(--accent); }
ol.steps { counter-reset: st; list-style: none; padding: 0; margin: 16px 0; }
ol.steps li { counter-increment: st; position: relative; padding: 0 0 18px 56px; }
ol.steps li::before {
  content: counter(st); position: absolute; left: 0; top: 0;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--bg-card); border: 1px solid var(--line);
  color: var(--accent); font-weight: 900; display: grid; place-items: center; font-size: 17px;
}
ol.steps li b { display: block; margin-bottom: 3px; }
ol.steps li span { color: var(--muted); font-size: 15px; }
ol.steps li:not(:last-child)::after {
  content: ""; position: absolute; left: 19px; top: 42px; bottom: 2px;
  width: 1px; background: var(--line);
}

/* ===== Оглавление ===== */
.toc {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; columns: 2; column-gap: 34px; margin: 20px 0 34px;
}
.toc a { display: block; color: var(--muted); padding: 3px 0; font-size: 14.5px; break-inside: avoid; }
.toc a:hover { color: var(--accent); }
h3.sub { font-size: 21px; margin: 38px 0 10px; scroll-margin-top: 80px;
  border-bottom: 1px solid var(--line); padding-bottom: 8px; }
h3.sub:first-of-type { margin-top: 26px; }
h4.sub { font-size: 16.5px; margin: 22px 0 8px; color: var(--accent); }

code { background: var(--bg-code); border: 1px solid var(--line); border-radius: 6px;
  padding: 1px 7px; font-size: 13.5px; color: var(--accent); }

/* ===== Калькулятор ===== */
.calc {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; margin: 18px 0;
}
.calc .row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.calc label { display: block; font-size: 13.5px; color: var(--muted); margin-bottom: 6px; }
.calc input[type=number] {
  background: var(--bg-code); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 10px 12px; font-size: 16px; width: 170px;
}
.calc input:focus { outline: 2px solid var(--accent-dark); }
.calc .out { margin-top: 18px; display: grid; gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.calc .cell { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 14px; }
.calc .cell b { display: block; font-size: 20px; color: var(--accent); }
.calc .cell span { font-size: 12.5px; color: var(--muted); }
.calc .cell.good b { color: var(--good); }
.calc .cell.bad b { color: var(--bad); }
.calc table { margin-top: 16px; min-width: 420px; }

/* ===== CTA-полоса ===== */
.cta-band {
  margin: 48px 0 8px; text-align: center;
  background: linear-gradient(135deg, rgba(255,210,63,.12), rgba(255,210,63,.03));
  border: 1px solid rgba(255,210,63,.35); border-radius: 18px; padding: 34px 22px;
}
.cta-band h2 { margin: 0 0 8px; font-size: 24px; }
.cta-band p { color: var(--muted); margin: 0 0 20px; }

/* ===== Подвал ===== */
footer.site {
  border-top: 1px solid var(--line); margin-top: 40px;
  padding: 26px 20px 90px; text-align: center; color: var(--muted); font-size: 13.5px;
}
footer.site .links { margin-bottom: 10px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ===== Рекламные места (РСЯ) ===== */
.ad-slot {
  margin: 34px auto;
  min-height: 120px;
  border: 1px dashed rgba(255,210,63,.35);
  border-radius: var(--radius);
  background: repeating-linear-gradient(45deg, rgba(255,210,63,.03) 0 12px, transparent 12px 24px);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.ad-slot::before {
  content: "Реклама";
  color: var(--muted); font-size: 12px; letter-spacing: 2px; text-transform: uppercase;
}
.ad-slot:not(:empty)::before { display: none; }
.ad-slot .ad-note { font-size: 11px; color: var(--muted); }

/* ===== Куки-баннер ===== */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90;
  max-width: 640px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.cookie-banner h4 { margin: 0 0 6px; font-size: 16px; }
.cookie-banner p { margin: 0 0 14px; color: var(--muted); font-size: 13.5px; }
.cookie-banner .btns { display: flex; gap: 10px; flex-wrap: wrap; }
.cookie-overlay {
  position: fixed; inset: 0; z-index: 95; background: rgba(10, 13, 18, .72);
  display: grid; place-items: center; padding: 20px;
}
.cookie-modal {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: 18px;
  max-width: 560px; width: 100%; padding: 24px; max-height: 84vh; overflow-y: auto;
}
.cookie-modal h3 { margin: 0 0 8px; }
.cookie-modal p.small { color: var(--muted); font-size: 13.5px; }
.cookie-group { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 10px 0; }
.cookie-group .head { display: flex; align-items: center; gap: 10px; }
.cookie-group .head b { flex: 1; }
.cookie-group p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.switch { position: relative; width: 42px; height: 24px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .track {
  position: absolute; inset: 0; border-radius: 999px; background: var(--line);
  transition: background .15s; cursor: pointer;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; transition: transform .15s;
}
.switch input:checked + .track { background: var(--good); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:disabled + .track { opacity: .55; cursor: not-allowed; }
.hidden { display: none !important; }

@media (max-width: 760px) {
  .burger { display: block; }
  nav.main {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; background: var(--bg-soft);
    border-bottom: 1px solid var(--line); padding: 10px 16px 16px; margin: 0;
  }
  nav.main.open { display: flex; }
  nav.main a { padding: 11px 12px; }
  .toc { columns: 1; }
  .hero { padding-top: 36px; }
  .egg-ladder .step { width: 40px; }
}
