/* ===== КотоМир — тёплая кошачья тема, реалистичные SVG-коты ===== */
* { box-sizing: border-box; }

:root {
  --bg: #fff7ec;
  --bg2: #ffefd9;
  --ink: #3b2b1f;
  --accent: #ff8c42;
  --accent2: #ff5d8f;
  --green: #38c172;
  --card: #ffffff;
  --shadow: 0 8px 24px rgba(120, 80, 40, 0.14);
  --radius: 18px;
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background:
    radial-gradient(circle at 10% 10%, #ffe6cc 0, transparent 40%),
    radial-gradient(circle at 90% 30%, #ffe0ec 0, transparent 45%),
    var(--bg);
}

h2 { font-size: 1.9rem; margin: 0 0 .4rem; }
.accent { color: var(--accent); }

/* лапки-фон */
.paw-floats span {
  position: fixed; font-size: 2rem; opacity: .12; pointer-events: none;
  animation: pawFloat linear infinite;
}
.paw-floats span:nth-child(1) { left: 6%;  top: 20%; animation-duration: 17s; }
.paw-floats span:nth-child(2) { left: 85%; top: 55%; animation-duration: 23s; }
.paw-floats span:nth-child(3) { left: 40%; top: 80%; animation-duration: 27s; }
.paw-floats span:nth-child(4) { left: 70%; top: 12%; animation-duration: 31s; }
.paw-floats span:nth-child(5) { left: 20%; top: 60%; animation-duration: 21s; }
@keyframes pawFloat {
  from { transform: translateY(-10vh) rotate(0deg); }
  to   { transform: translateY(110vh) rotate(360deg); }
}

/* шапка */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  padding: .7rem 1.2rem;
  background: rgba(255, 247, 236, .92);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 12px rgba(120, 80, 40, .12);
}
.logo { font-size: 1.3rem; font-weight: 800; cursor: pointer; user-select: none; }
.logo:hover { animation: wiggle .4s; }
.nav { display: flex; gap: .9rem; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; padding: .3rem .5rem; border-radius: 10px; }
.nav a:hover { background: var(--bg2); color: var(--accent2); }

/* кнопки */
.meow-btn {
  border: none; cursor: pointer; font-weight: 700; font-size: 1rem;
  padding: .55rem 1.1rem; border-radius: 999px;
  background: var(--accent); color: #fff;
  box-shadow: 0 4px 0 #d96a24;
  transition: transform .12s;
}
.meow-btn:hover { transform: translateY(-2px); filter: brightness(1.05); }
.meow-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #d96a24; }
.meow-btn.alt { background: var(--accent2); box-shadow: 0 4px 0 #c93a68; }
.meow-btn.big { font-size: 1.15rem; padding: .8rem 1.5rem; }
.meow-btn.tiny { font-size: .8rem; padding: .3rem .7rem; }

/* герой */
.hero { position: relative; text-align: center; padding: 2.5rem 1rem 3rem; overflow: hidden; }
.hero-cat-wrap { position: relative; width: min(340px, 80vw); margin: 0 auto; }
.hero-cat { width: 100%; height: auto; display: block; cursor: pointer;
  filter: drop-shadow(0 18px 22px rgba(120, 70, 30, .25));
  animation: catBreathe 3.6s ease-in-out infinite;
  transform-origin: 50% 92%;
}
@keyframes catBreathe { 0%,100% { transform: translateY(0) scale(1) } 50% { transform: translateY(-6px) scale(1.012) } }
.cat-tail { transform-origin: 320px 300px; animation: tailSway 3.2s ease-in-out infinite; }
@keyframes tailSway { 0%,100% { transform: rotate(-6deg) } 50% { transform: rotate(12deg) } }
.cat-head { transform-origin: 200px 300px; animation: headTilt 5s ease-in-out infinite; }
@keyframes headTilt { 0%,100% { transform: rotate(0deg) } 30% { transform: rotate(-2.5deg) } 70% { transform: rotate(2.5deg) } }
.cat-ears .ear-l { transform-origin: 140px 130px; animation: earTwitch 4.5s ease-in-out infinite; }
.cat-ears .ear-r { transform-origin: 290px 120px; animation: earTwitch 4.5s .7s ease-in-out infinite; }
@keyframes earTwitch { 0%,88%,100% { transform: rotate(0) } 92% { transform: rotate(-7deg) } 96% { transform: rotate(4deg) } }
.hero-cat .pupil { transition: rx .18s ease, ry .18s ease; }
.hero-cat.blink .pupil { ry: 3; }
.hero-cat.meowing .mouth { animation: mouthOpen .5s ease-in-out 2; }
@keyframes mouthOpen { 0%,100% { transform: scaleY(1) } 50% { transform: scaleY(3.2) } }
.hero-cat .mouth { transform-origin: 201px 256px; transform-box: fill-box; }
.hero-cat .whiskers { transform-origin: 201px 262px; animation: whiskerWig 2.8s ease-in-out infinite; }
@keyframes whiskerWig { 0%,100% { transform: skewX(0deg) } 50% { transform: skewX(1.4deg) } }

.hero h1 { font-size: clamp(2rem, 6vw, 3.4rem); margin: .6rem 0 .2rem; }
.hero-sub { max-width: 640px; margin: 0 auto 1.4rem; font-size: 1.1rem; color: #6b5647; }
.hero-buttons { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; align-items: center; }
.cta {
  background: var(--green); color: #fff; text-decoration: none; font-weight: 700;
  padding: .8rem 1.4rem; border-radius: 999px; box-shadow: 0 4px 0 #2a9a5a;
  transition: transform .12s;
}
.cta:hover { transform: translateY(-2px); }
@keyframes wiggle { 0%,100%{transform:rotate(0)} 30%{transform:rotate(-8deg)} 70%{transform:rotate(8deg)} }

.meow-popups { position: absolute; inset: 0; pointer-events: none; }
.meow-pop {
  position: absolute; font-weight: 800; color: var(--accent2);
  animation: popUp 1.1s ease-out forwards; font-size: 1.3rem;
}
@keyframes popUp {
  from { opacity: 1; transform: translateY(0) scale(.8); }
  to   { opacity: 0; transform: translateY(-90px) scale(1.5); }
}

/* секции */
.section { padding: 3.2rem 1.2rem; max-width: 1100px; margin: 0 auto; }
.section.alt-bg { background: var(--bg2); max-width: none; border-radius: 40px; }
.section.alt-bg > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.section-sub { color: #6b5647; font-size: 1.05rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem 1.4rem; }

/* анатомия */
.anatomy-wrap { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: stretch; }
.anatomy-cat { position: relative; flex: 1 1 380px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: .8rem; }
.anatomy-cat svg { width: 100%; height: auto; display: block; }
.anatomy-cat .eye .pupil { animation: pupilDilate 5s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes pupilDilate { 0%,100% { transform: scaleX(1) } 50% { transform: scaleX(1.6) } }
.anat-dot {
  position: absolute; width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #fff; background: var(--accent2); color: #fff;
  font-weight: 800; cursor: pointer; box-shadow: 0 3px 8px rgba(0,0,0,.25);
  animation: dotPulse 1.8s infinite;
}
.anat-dot:hover { transform: scale(1.15); background: var(--accent); }
.anat-dot.active { background: var(--green); animation: none; }
@keyframes dotPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(255,93,143,.5) } 50% { box-shadow: 0 0 0 10px rgba(255,93,143,0) } }
.anatomy-info { flex: 1 1 300px; align-self: center; }
.anatomy-info h3 { margin-top: 0; color: var(--accent2); }
.facts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.fact { background: var(--card); padding: .9rem; border-radius: 14px; box-shadow: var(--shadow); font-size: .95rem; }

/* породы */
.breeds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; margin-top: 1.2rem; }
.breed-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1.1rem; transition: transform .18s; cursor: pointer; position: relative; overflow: hidden;
}
.breed-card:hover { transform: translateY(-6px) rotate(-.5deg); }
.breed-face { font-size: 3rem; }
.breed-card h3 { margin: .4rem 0 .2rem; }
.breed-tag { display: inline-block; background: var(--bg2); color: var(--accent); font-weight: 700; font-size: .78rem; padding: .2rem .6rem; border-radius: 999px; }
.breed-card p { font-size: .93rem; color: #6b5647; }
.breed-trait { font-size: .85rem; background: #eafaf1; color: #1e8e54; padding: .4rem .6rem; border-radius: 10px; }
.breed-more { display: none; margin-top: .5rem; font-size: .88rem; }
.breed-card.open .breed-more { display: block; animation: popIn .3s; }
@keyframes popIn { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1 } }

/* Котокрафт */
.kotokraft { display: flex; gap: 1.4rem; flex-wrap: wrap; margin-top: 1.2rem; }
.mc-panel { flex: 2 1 480px; }
.mc-tips { flex: 1 1 240px; }
.mc-screen { border: 5px solid #3b3b3b; border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); background: #79c4f2; }
.mc-world { position: relative; height: 260px; overflow: hidden; }
.mc-sun { position: absolute; top: 14px; right: 24px; width: 44px; height: 44px; background: #ffe45c; box-shadow: 0 0 24px #ffe45c; }
.mc-cloud { position: absolute; width: 70px; height: 22px; background: #fff; opacity: .9; animation: cloudMove linear infinite; }
.mc-cloud::after { content: ""; position: absolute; left: 16px; top: -14px; width: 40px; height: 20px; background: #fff; }
.mc-cloud.c1 { top: 30px; animation-duration: 26s; }
.mc-cloud.c2 { top: 70px; animation-duration: 40s; animation-delay: -12s; }
@keyframes cloudMove { from { left: -90px } to { left: 110% } }
.mc-hill { position: absolute; bottom: 70px; background: #57b84a; }
.mc-hill.h1 { left: 0; width: 180px; height: 90px; clip-path: polygon(0 100%, 50% 0, 100% 100%); }
.mc-hill.h2 { right: 30px; width: 240px; height: 120px; clip-path: polygon(0 100%, 45% 10%, 100% 100%); background: #4aa83f; }
.mc-ground { position: absolute; bottom: 0; left: 0; right: 0; height: 72px;
  background: repeating-linear-gradient(90deg, #8b5a2b 0 32px, #7d4f24 32px 64px);
  border-top: 8px solid #57b84a; }
.mc-cat { position: absolute; bottom: 62px; left: 46%; width: 90px; height: 70px; transition: left .3s, bottom .3s; }
.mc-cat.jump { animation: mcJump .55s ease-out; }
@keyframes mcJump { 0%,100% { transform: translateY(0) } 45% { transform: translateY(-70px) } }
.mc-cat.happy .mc-head { animation: wiggle .4s 2; }
.mc-body { position: absolute; bottom: 0; left: 14px; width: 66px; height: 34px; background: #f0954b; }
.mc-body::before, .mc-body::after { content: ""; position: absolute; bottom: -16px; width: 14px; height: 18px; background: #d97b34; }
.mc-body::before { left: 6px; } .mc-body::after { right: 6px; }
.mc-tail { position: absolute; right: -26px; bottom: 16px; width: 34px; height: 12px; background: #f0954b; animation: tailWag .6s infinite alternate; }
.mc-tail::after { content: ""; position: absolute; right: -4px; top: -14px; width: 12px; height: 18px; background: #f0954b; }
@keyframes tailWag { from { transform: rotate(-14deg) } to { transform: rotate(18deg) } }
.mc-head { position: absolute; top: 0; left: 0; width: 46px; height: 42px; background: #f0954b; z-index: 2; }
.mc-ear { position: absolute; top: -12px; width: 14px; height: 14px; background: #f0954b; }
.mc-ear.l { left: 4px; clip-path: polygon(0 100%, 0 0, 100% 100%); }
.mc-ear.r { right: 4px; clip-path: polygon(0 100%, 100% 0, 100% 100%); }
.mc-eye { position: absolute; top: 14px; width: 8px; height: 8px; background: #2e7d32; }
.mc-eye.l { left: 8px; } .mc-eye.r { right: 8px; }
.mc-nose { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 8px; height: 6px; background: #e0577a; }
.mc-item { position: absolute; bottom: 74px; left: 66%; font-size: 1.8rem; opacity: 0; transition: opacity .3s, transform .3s; }
.mc-item.show { opacity: 1; animation: itemDrop .6s; }
@keyframes itemDrop { from { transform: translateY(-40px) } to { transform: translateY(0) } }
.mc-hearts { position: absolute; bottom: 128px; left: 44%; font-size: 1.2rem; pointer-events: none; }
.mc-hearts span { position: absolute; animation: popUp 1s forwards; }
.mc-hud { display: flex; justify-content: space-around; gap: .5rem; flex-wrap: wrap;
  background: rgba(0,0,0,.75); color: #fff; font-family: "Courier New", monospace;
  font-weight: 700; padding: .45rem; font-size: .92rem; }
.mc-buttons { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.mc-btn { border: 3px solid #3b3b3b; background: #d7d7d7; color: #222; font-weight: 800;
  padding: .55rem .9rem; cursor: pointer; box-shadow: inset -3px -3px 0 #9a9a9a, inset 3px 3px 0 #fff; font-size: .95rem; }
.mc-btn:hover { background: #fff; }
.mc-btn:active { box-shadow: inset 3px 3px 0 #9a9a9a; }
.mc-log { margin-top: .8rem; background: #1c1c1c; color: #7dff7d; font-family: "Courier New", monospace;
  font-size: .9rem; padding: .6rem .8rem; border-radius: 6px; min-height: 2.2em; }
.mc-tips h3 { margin-top: 0; }
.mc-tips li { margin-bottom: .5rem; font-size: .93rem; }
.mc-tips li.done { text-decoration: line-through; color: #1e8e54; }
.mc-xp { background: var(--bg2); padding: .5rem .7rem; border-radius: 10px; }

/* звуки */
.sounds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.sound-btn { border: none; cursor: pointer; background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1.2rem .6rem; font-size: 1rem; font-weight: 700;
  color: var(--ink); transition: transform .15s; display: flex; flex-direction: column; gap: .5rem; align-items: center; }
.sound-btn span { font-size: 2.4rem; }
.sound-btn:hover { transform: translateY(-5px) scale(1.03); background: #fff3e6; }
.sound-btn:active { transform: scale(.96); }
.sound-btn.playing { outline: 4px solid var(--accent); animation: wiggle .35s; }

/* магазин */
.shop-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 1rem; margin: 1rem 0 1.4rem; }
.product { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 1rem; text-align: center; transition: transform .15s; }
.product:hover { transform: translateY(-5px); }
.product .p-icon { font-size: 3rem; }
.product h3 { margin: .4rem 0 .2rem; font-size: 1.05rem; }
.product .p-desc { font-size: .85rem; color: #6b5647; min-height: 2.6em; }
.product .p-price { color: var(--accent2); font-weight: 800; font-size: 1.15rem; margin: .4rem 0; }
.add-btn { border: none; background: var(--green); color: #fff; font-weight: 700;
  padding: .5rem 1rem; border-radius: 999px; cursor: pointer; box-shadow: 0 3px 0 #2a9a5a; }
.add-btn:hover { filter: brightness(1.07); }
.add-btn:active { transform: translateY(2px); box-shadow: none; }
.cart-box { margin-top: .6rem; }
.cart-box h3 { margin-top: 0; }
.cart-box ul { list-style: none; padding: 0; margin: 0; }
.cart-box li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px dashed #e5d5c3; font-size: .95rem; }
.cart-box li button { border: none; background: #ffe0e6; color: #d63a5b; border-radius: 8px; cursor: pointer; padding: .1rem .5rem; }
.cart-empty { color: #9b8776; justify-content: center !important; border: none !important; }

/* котокафе */
.cafe { text-align: center; }
.cafe-invite { font-size: 1.12rem; max-width: 760px; margin: 0 auto 1.4rem; background: var(--card); padding: 1rem 1.3rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.cafe-cats { position: relative; height: 220px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(#7ec8ff 0 55%, #57b84a 55% 70%, #8b5a2b 70%); box-shadow: var(--shadow); }
.live-cat { position: absolute; top: var(--top); left: -70px; font-size: 2.6rem; cursor: pointer;
  animation: catWalk var(--dur) linear infinite; filter: drop-shadow(0 6px 4px rgba(0,0,0,.25)); }
.live-cat span { display: inline-block; animation: catBob .5s infinite alternate; }
.live-cat.flip { animation-name: catWalkBack; }
@keyframes catWalk { from { left: -70px } to { left: 110% } }
@keyframes catWalkBack { from { left: 110% } to { left: -70px } }
@keyframes catBob { from { transform: translateY(0) } to { transform: translateY(-8px) } }
.live-cat.flip span { animation: catBobBack .5s infinite alternate; }
@keyframes catBobBack { from { transform: scaleX(-1) translateY(0) } to { transform: scaleX(-1) translateY(-8px) } }
.cafe-cta { margin: 1.6rem 0 1.2rem; }
.invite-ticket { margin: 1rem auto 0; max-width: 380px; background: linear-gradient(135deg, #fff3e6, #ffe0ec);
  border: 3px dashed var(--accent); border-radius: var(--radius); padding: 1rem 1.4rem;
  animation: popIn .5s; box-shadow: var(--shadow); }
.invite-ticket h3 { margin-top: 0; }
.invite-ticket p { margin: .3rem 0; }
.tiny { font-size: .85rem; color: #9b8776; }
.cafe-map { text-align: left; max-width: 560px; margin: 0 auto; }
.cafe-map h3 { margin-top: 0; }

.site-footer { text-align: center; padding: 2rem 1rem 2.6rem; color: #9b8776; }

@media (max-width: 640px) {
  .nav { gap: .5rem; font-size: .9rem; }
  .section { padding: 2.4rem 1rem; }
  h2 { font-size: 1.5rem; }
}
