* { box-sizing: border-box; }

:root {
  --bg: #fff7ec;
  --bg-alt: #ffeef4;
  --ink: #4a3428;
  --accent: #ff8fab;
  --accent-2: #ffb26b;
  --card: #ffffff;
  --radius: 20px;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}

/* ТОПБАР */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(6px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}
.logo { font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.nav a { margin-left: 16px; color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover { color: var(--accent); }

/* ГЕРОЙ */
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  align-items: center;
  justify-content: space-between;
  padding: 56px 24px 64px;
  max-width: 1080px;
  margin: 0 auto;
}
.hero__text { flex: 1 1 320px; max-width: 520px; }
.badge {
  display: inline-block;
  background: #ffe3ec;
  color: #d9547c;
  font-weight: 700;
  font-size: .85rem;
  padding: 6px 14px;
  border-radius: 999px;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 14px 0 10px; line-height: 1.15; }
.accent { color: var(--accent); }
.lead { font-size: 1.1rem; color: #7a6154; margin: 0 0 22px; }
.hero__btns { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 6px 18px rgba(255, 143, 171, .45);
}
.btn--ghost { background: #fff; color: var(--ink); border: 2px solid #f1d9c8; }

/* ХОМЯК */
.hero__art { position: relative; flex: 0 1 320px; text-align: center; }
.hamster {
  width: min(320px, 80vw);
  height: auto;
  animation: bob 2.6s ease-in-out infinite;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .12));
}
@keyframes bob {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(1deg); }
}
.wheel {
  position: absolute;
  top: -34px;
  right: 8%;
  font-size: 2.6rem;
  animation: spin 4s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* СЕКЦИИ */
.section { max-width: 1080px; margin: 0 auto; padding: 48px 24px; }
.section--alt {
  max-width: none;
  background: var(--bg-alt);
}
.section--alt > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.section h2 { font-size: clamp(1.5rem, 3.5vw, 2.2rem); margin: 0 0 26px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 8px 22px rgba(74, 52, 40, .08);
  transition: transform .18s ease;
}
.card:hover { transform: translateY(-6px) scale(1.02); }
.card__emoji { font-size: 2.2rem; margin-bottom: 8px; }
.card h3 { margin: 0 0 8px; }
.card p { margin: 0; color: #7a6154; }
.muted { color: #b58f7a !important; font-size: .85rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }

.fact-random {
  margin-top: 18px;
  background: #fff4df;
  border-left: 5px solid var(--accent-2);
  padding: 14px 16px;
  border-radius: 10px;
  font-weight: 600;
  min-height: 1.5em;
}

/* ШАГИ */
.steps { padding-left: 22px; }
.steps li { margin-bottom: 12px; font-size: 1.05rem; }
.warn {
  margin-top: 20px;
  background: #ffecec;
  border: 2px dashed #f2a1a1;
  border-radius: 14px;
  padding: 14px 18px;
  font-weight: 700;
  color: #c0473f;
}

/* ВИКТОРИНА */
.quiz {
  background: #fff;
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 8px 22px rgba(74, 52, 40, .08);
}
.quiz__q { font-size: 1.15rem; font-weight: 700; margin: 0 0 16px; }
.quiz__answers { display: grid; gap: 10px; }
.quiz__answers button {
  text-align: left;
  padding: 12px 16px;
  border-radius: 12px;
  border: 2px solid #000;
  background: #000;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.quiz__answers button:hover { border-color: var(--accent); background: #2a2a2a; transform: translateX(4px); }
.quiz__answers button.correct { background: #e3fbe8; border-color: #57c47a; }
.quiz__answers button.wrong { background: #ffecec; border-color: #f2a1a1; }
.quiz__result { margin: 16px 0 0; font-weight: 800; min-height: 1.4em; }

/* ОБ АВТОРЕ */
.author {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  background: var(--card);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 8px 22px rgba(74, 52, 40, .08);
}
.author__avatar {
  font-size: 3.4rem;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ffe3ec, #fff1de);
  border-radius: 50%;
  border: 4px solid var(--accent);
  flex: 0 0 auto;
}
.author__info { flex: 1 1 260px; }
.author__name { margin: 0 0 4px; font-size: 1.4rem; }
.author__role {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 700;
}
.author__bio { margin: 0 0 14px; color: #7a6154; }
.author__contacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.author__contacts li { font-weight: 600; }
.author__contacts span { color: #7a6154; font-weight: 500; }

.card--photo { padding-top: 0; overflow: hidden; }
.card__photo {
  display: block;
  width: calc(100% + 44px);
  margin: 0 -22px 16px;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* ИГРА */
.game__intro { max-width: 640px; color: #7a6154; margin: -10px 0 22px; }
.game {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: stretch;
}
.game__stage {
  position: relative;
  flex: 1 1 340px;
  min-height: 340px;
  background: #ffffff;
  border: 3px solid #ffe3ec;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  box-shadow: 0 8px 22px rgba(74, 52, 40, .08);
}
.game__msg {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border-radius: 999px;
  padding: 6px 16px;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  white-space: nowrap;
}
.game__hamster {
  width: min(260px, 70%);
  height: auto;
  transform-origin: 50% 85%;
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
  margin-bottom: 10px;
}
.game__tray {
  border: none;
  cursor: pointer;
  background: #fff;
  border-radius: 18px;
  padding: 10px 24px;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(74, 52, 40, .14);
  transition: transform .12s ease;
}
.game__tray span { font-size: 1rem; }
.game__tray:hover { transform: translateY(-3px) scale(1.04); }
.game__tray:active { transform: scale(.95); }
.fly-seed {
  position: absolute;
  font-size: 1.8rem;
  pointer-events: none;
  z-index: 3;
}
.game__panel {
  flex: 0 1 260px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 8px 22px rgba(74, 52, 40, .08);
}
.game__label { margin: 0 0 6px; font-weight: 800; }
.meter {
  height: 18px;
  background: #f1e3d5;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.meter__fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7ed495, #ffb26b, var(--accent));
  transition: width .3s ease;
}
.game__stat, .game__best { margin: 6px 0; color: #7a6154; }
.game__stat b, .game__best b { color: var(--ink); font-size: 1.15rem; }
.game__best { border-top: 2px dashed #f1d9c8; padding-top: 10px; margin-top: 12px; }

/* ФУТЕР */
.footer {
  text-align: center;
  padding: 26px 16px;
  background: #4a3428;
  color: #ffe8d6;
  margin-top: 30px;
}
.footer a { color: #ffc9a1; }
