/* ===== Матвей.игры — мультяшный стиль ===== */
:root{
 --bg:#dff0ff; --paper:#ffffff; --ink:#1b1033; --text:#1b1033; --muted:#4a3f66;
 --purple:#6c3cff; --yellow:#ffd23f; --mint:#22c58b; --pink:#ff4f9a; --sky:#a8e6ff;
 --night:#2a1650; --line:3px solid var(--ink); --sh:6px 6px 0 var(--ink); --sh-s:3px 3px 0 var(--ink);
 --head:Rubik,"Arial Black",system-ui,sans-serif; --body:Nunito,system-ui,sans-serif;
 color-scheme:light;
}
:root[data-theme="night"]{
 --bg:#140b2e; --paper:#231648; --ink:#06020f; --text:#f4efff; --muted:#c9bdf0;
 --night:#0d0720; --sh:6px 6px 0 #000; --sh-s:3px 3px 0 #000;
 color-scheme:dark;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html{scroll-behavior:smooth}
body{margin:0;background:var(--bg);color:var(--text);font:600 18px/1.5 var(--body);transition:background .4s,color .4s;min-height:100vh}
#net{position:fixed;inset:0;width:100%;height:100%;z-index:0;pointer-events:none}
.wrap{position:relative;z-index:1;max-width:1200px;margin:0 auto;padding:0 32px}
a{color:inherit}
h1,h2,h3{font-family:var(--head);font-weight:900;margin:0;line-height:1.05}
h1{font-size:clamp(40px,6vw,64px)}
h2{font-size:clamp(26px,3.2vw,36px)}
p{margin:0}
svg{fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
:focus-visible{outline:4px solid var(--pink);outline-offset:3px}

/* ---- header ---- */
.top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;padding:24px 0}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none}
.brand-badge{width:56px;height:56px;border-radius:18px;background:var(--purple);border:var(--line);box-shadow:4px 4px 0 var(--ink);display:grid;place-items:center;font:900 30px var(--head);color:#fff}
.brand-name{font:900 26px var(--head)}
.brand-name span{color:var(--purple)}
:root[data-theme="night"] .brand-name span{color:#b9a0ff}
.nav{display:flex;flex-wrap:wrap;gap:8px}
.nav a,.btn,.pill{border:var(--line);border-radius:999px;background:var(--paper);color:var(--text);font-weight:800;text-decoration:none;box-shadow:var(--sh-s);transition:transform .12s,box-shadow .12s,background .2s}
.nav a{padding:10px 18px}
.nav a:hover,.btn:hover{transform:translate(-2px,-2px);box-shadow:5px 5px 0 var(--ink)}
.nav a:active,.btn:active,.icon-btn:active,.stat:active{transform:translate(2px,2px);box-shadow:1px 1px 0 var(--ink)}
.nav a.on{background:var(--purple);color:#fff}
.tools{display:flex;gap:8px}
.icon-btn{width:48px;height:48px;border-radius:14px;border:var(--line);background:var(--paper);color:var(--text);box-shadow:var(--sh-s);display:grid;place-items:center;cursor:pointer;transition:transform .12s}
.icon-btn:hover{transform:translate(-2px,-2px)}
.icon-btn svg{width:24px;height:24px}
#soundBtn{background:var(--yellow);color:#1b1033}
#soundBtn[aria-pressed="false"]{background:var(--paper);color:var(--text)}
#soundBtn .ico-off,#soundBtn[aria-pressed="false"] .ico-on{display:none}
#soundBtn[aria-pressed="false"] .ico-off{display:block}
.ico-sun{display:none}
:root[data-theme="night"] .ico-sun{display:block}
:root[data-theme="night"] .ico-moon{display:none}

/* ---- pages ---- */
.page{padding:16px 0 56px;animation:pageIn .45s cubic-bezier(.2,1.5,.4,1)}
@keyframes pageIn{from{opacity:0;transform:translateY(24px) scale(.98)}to{opacity:1;transform:none}}
.card,.card-big{border:var(--line);background:var(--paper);box-shadow:var(--sh);border-radius:28px}
.card{padding:28px 30px;display:flex;flex-direction:column;gap:16px}
.card-big{border-width:4px;border-radius:36px;box-shadow:10px 10px 0 var(--ink)}
.row{display:flex;flex-wrap:wrap;gap:14px}
.btn{display:inline-block;padding:15px 28px;border-radius:18px;font:800 20px var(--head);cursor:pointer;box-shadow:5px 5px 0 var(--ink)}
.btn-yellow{background:var(--yellow);color:#1b1033}
.pill{padding:8px 14px;border-radius:12px;font-size:16px;box-shadow:none}
.tag{align-self:flex-start;padding:6px 14px;border-radius:999px;border:var(--line);font-weight:800;font-size:15px;letter-spacing:.04em;color:#1b1033}
.tag-mint{background:var(--mint)}
.lead{font-size:20px;max-width:560px}
.small{font-size:14px;color:var(--muted)}
.page-title{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:16px;margin:8px 0 32px}
.sec-head{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:12px;margin:64px 0 24px}
.sec-head a{font-weight:800}
.h2-space{margin:56px 0 24px}
.c-yellow{background:var(--yellow)!important;color:#1b1033}
.c-mint{background:var(--mint)!important;color:#1b1033}
.c-pink{background:var(--pink)!important;color:#1b1033}
.c-purple{background:var(--purple)!important;color:#fff}

/* ---- hero ---- */
.hero{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:40px;padding:64px 56px;background:color-mix(in srgb,var(--paper) 86%,transparent);backdrop-filter:blur(2px)}
.hero-text{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;gap:20px}
.hero-logo{position:relative;width:340px;height:360px;flex:0 0 auto;cursor:pointer}
.blob{position:absolute;left:20px;top:10px;width:300px;height:290px;background:var(--purple);border:4px solid var(--ink);border-radius:46% 54% 42% 58%/52% 44% 56% 48%;box-shadow:10px 10px 0 var(--ink);display:grid;place-items:center;transition:border-radius .6s}
.hero-logo:hover .blob{border-radius:58% 42% 55% 45%/40% 58% 42% 60%}
.blob-m{font:900 190px/1 var(--head);color:#fff;text-shadow:6px 6px 0 var(--ink)}
.liquid-big{filter:url(#liquidBig)}
.liquid-small{filter:url(#liquidSmall)}
.drip{position:absolute;background:var(--purple);border:4px solid var(--ink);border-top:none;border-radius:0 0 16px 16px;transition:height .6s cubic-bezier(.3,1.6,.5,1)}
.d1{left:76px;top:268px;width:30px;height:48px}
.d2{left:176px;top:264px;width:22px;height:30px}
.hero-logo:hover .d1{height:86px}
.hero-logo:hover .d2{height:60px}
.joy{position:absolute;right:0;top:0;width:82px;height:82px;border-radius:50%;background:var(--yellow);border:4px solid var(--ink);box-shadow:4px 4px 0 var(--ink);display:grid;place-items:center;color:#1b1033;transition:transform .5s cubic-bezier(.3,1.8,.5,1)}
.hero-logo:hover .joy{transform:rotate(-18deg) scale(1.08)}
.joy svg{width:44px;height:44px}
.hint{position:absolute;left:0;bottom:0;padding:8px 14px;border-radius:12px;border:var(--line);background:var(--paper);font-weight:800;font-size:15px;transform:rotate(-6deg);box-shadow:var(--sh-s)}

/* ---- stats ---- */
.stats{display:flex;flex-wrap:wrap;gap:20px;margin-top:48px}
.stat{flex:1 1 220px;text-align:left;border:var(--line);border-radius:24px;box-shadow:var(--sh);padding:22px 24px;cursor:pointer;font:inherit;color:#1b1033;transition:transform .15s}
.stat:hover{transform:translate(-2px,-2px) rotate(-1deg)}
.stat b{display:block;font:900 52px/1 var(--head)}
.stat span{font-weight:800}
.s-yellow{background:var(--yellow)}.s-mint{background:var(--mint)}.s-pink{background:var(--pink)}.s-white{background:#fff}
.stat.hit{animation:hit .35s}
@keyframes hit{50%{transform:scale(1.08) rotate(2deg)}}

/* ---- game art ---- */
.mini-games{display:flex;flex-wrap:wrap;gap:24px}
.mini{flex:1 1 320px;min-width:0;padding:0;overflow:hidden;text-decoration:none;gap:0;transition:transform .15s}
.mini:hover{transform:translate(-3px,-3px)}
.mini-body{padding:20px 22px 24px;display:flex;flex-direction:column;gap:6px}
.mini-body h3{font-size:26px}
.art{position:relative;height:180px;border-bottom:var(--line);overflow:hidden}
.art i{position:absolute;display:block;border:var(--line)}
.art.big{flex:1 1 380px;min-height:300px;border-bottom:none;border-right:var(--line)}
.art-brainrot{background:repeating-conic-gradient(#7ed957 0 25%,#6cc94a 0 50%) 0 0/40px 40px}
.art-brainrot .road{left:-4px;right:-4px;top:54%;height:20%;background:#e8473b}
.art-brainrot .guy{left:44%;top:30%;width:40px;height:56px;background:var(--yellow);border-radius:8px;animation:bob 1.2s ease-in-out infinite}
.art-brainrot .base{left:70%;top:14%;width:70px;height:60px;background:var(--sky);border-radius:10px}
.art-brainrot .b2{left:10%;top:72%;width:90px;height:64px}
.art-mages{background:#2a1650}
.art-mages .ring{left:50%;top:50%;width:120px;height:120px;margin:-60px 0 0 -60px;border-radius:50%;border:6px solid #b06bff;box-shadow:0 0 0 6px #4fe3ff;animation:spin 8s linear infinite}
.art-mages.big .ring{width:170px;height:170px;margin:-85px 0 0 -85px}
.art-mages .core{left:50%;top:50%;width:56px;height:56px;margin:-28px 0 0 -28px;border-radius:50%;background:#ff3b4e;animation:pulse 1.6s ease-in-out infinite}
.art-mages .moon{right:30px;top:22px;width:40px;height:40px;border-radius:50%;background:#fff6c8}
.art-arena{background-color:#f4f4f8;background-image:linear-gradient(#d6d6e2 2px,transparent 2px),linear-gradient(90deg,#d6d6e2 2px,transparent 2px);background-size:36px 36px}
.art-arena .f1,.art-arena .f2{top:32%;width:42px;height:72px;border-radius:8px}
.art-arena .f1{left:32%;background:var(--pink);animation:punchL 1.4s ease-in-out infinite}
.art-arena .f2{left:56%;background:#4f8bff;animation:punchR 1.4s ease-in-out infinite}
.art.big .f1,.art.big .f2{width:56px;height:100px}
@keyframes bob{50%{transform:translateY(-8px)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pulse{50%{transform:scale(1.2)}}
@keyframes punchL{50%{transform:translateX(10px)}}
@keyframes punchR{50%{transform:translateX(-10px)}}
.badge{position:absolute;left:20px;top:20px;padding:6px 12px;border-radius:10px;border:var(--line);font-weight:800;font-size:15px;color:#1b1033}
.b-yellow{background:var(--yellow)}.b-purple{background:#b06bff;color:#fff}.b-white{background:#fff}

.game{display:flex;flex-wrap:wrap;overflow:hidden;margin-bottom:32px}
.game-body{flex:1 1 460px;min-width:0;padding:32px 36px;display:flex;flex-direction:column;gap:14px}
.game-body ul{margin:0;padding-left:22px;font-weight:700}

/* ---- about ---- */
.about-hero{display:flex;flex-wrap:wrap;align-items:center;gap:48px;padding:48px 52px;margin-bottom:32px}
.about-hero>div:last-child{flex:1 1 420px;min-width:0;display:flex;flex-direction:column;gap:16px}
.avatar{position:relative;width:260px;height:270px;flex:0 0 auto}
.avatar i{position:absolute;display:block;border:4px solid var(--ink)}
.a-bg{left:10px;top:20px;width:240px;height:240px;border-radius:50%;background:var(--yellow)}
.a-face{left:50px;top:70px;width:160px;height:170px;border-radius:48% 48% 44% 44%;background:#f3c9a4}
.a-cap{left:42px;top:44px;width:176px;height:74px;border-radius:88px 88px 16px 16px;background:var(--purple)}
.a-visor{left:150px;top:100px;width:96px;height:20px;border-radius:10px;background:var(--purple)}
.a-eye{top:146px;width:18px;height:24px;border-radius:50%;background:var(--ink);border:none!important;animation:blink 4s infinite}
.e1{left:88px}.e2{left:152px}
.a-smile{left:100px;top:190px;width:60px;height:26px;border-top:none!important;border-radius:0 0 30px 30px}
@keyframes blink{0%,94%,100%{transform:scaleY(1)}96%{transform:scaleY(.1)}}
.grid2{display:flex;flex-wrap:wrap;gap:24px;margin-bottom:24px}
.grid2>.card{flex:1 1 360px;min-width:0}
.chips{display:flex;flex-wrap:wrap;gap:10px}
.chip{padding:8px 16px;border-radius:999px;border:var(--line);background:var(--paper);font-weight:800}
.tools-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:12px;font-weight:700}
.tools-list li{display:flex;align-items:center;gap:12px}
.ti{width:40px;height:40px;flex:0 0 auto;border-radius:12px;border:var(--line);display:grid;place-items:center}
.ti svg{width:22px;height:22px}
.desk{flex-direction:row;flex-wrap:wrap;align-items:center}
.desk-text{flex:1 1 300px;display:flex;flex-direction:column;gap:12px}
.desk img{flex:0 1 380px;width:100%;max-width:380px;height:auto;border-radius:20px;border:var(--line);box-shadow:var(--sh-s);transform:rotate(1.5deg)}
.card-night{background:var(--night);color:#fff}

/* ---- devlog ---- */
.steps{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:16px}
.steps li{flex:1 1 200px;border:var(--line);border-radius:24px;background:var(--paper);box-shadow:5px 5px 0 var(--ink);padding:20px;font-weight:800}
.steps li.s-yellow,.steps li.s-mint,.steps li.s-pink{color:#1b1033}
.steps b{display:block;font:900 36px/1 var(--head);margin-bottom:6px}
.timeline{list-style:none;margin:0 0 40px;padding:0 0 0 28px;border-left:4px solid var(--ink);display:flex;flex-direction:column;gap:20px}
.timeline li{position:relative;border:var(--line);border-radius:22px;background:var(--paper);box-shadow:5px 5px 0 var(--ink);padding:18px 22px}
.timeline b{font:800 20px var(--head)}
.dot{position:absolute;left:-46px;top:18px;width:28px;height:28px;border-radius:50%;border:var(--line)}
:root[data-theme="night"] .timeline{border-left-color:#6c5aa8}

/* ---- reviews ---- */
.grid-reviews{display:flex;flex-wrap:wrap;gap:28px;align-items:flex-start}
.review-form{flex:1 1 360px;max-width:460px}
.review-form label{display:flex;flex-direction:column;gap:6px;font-weight:800}
.review-form input,.review-form textarea{font:600 18px var(--body);padding:12px 14px;border:var(--line);border-radius:14px;background:var(--bg);color:var(--text);resize:vertical}
.stars{border:none;margin:0;padding:0;display:flex;flex-direction:row-reverse;justify-content:flex-end;gap:4px}
.stars legend{font-weight:800;margin-bottom:6px;width:100%}
.stars input{position:absolute;opacity:0;width:1px;height:1px}
.stars label{font-size:38px;line-height:1;color:#c9c4d8;cursor:pointer;-webkit-text-stroke:2px var(--ink);transition:transform .1s}
.stars label:hover{transform:scale(1.15)}
.stars input:checked~label,.stars label:hover,.stars label:hover~label{color:var(--yellow)}
.stars input:focus-visible+label{outline:3px solid var(--pink);border-radius:6px}
.hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}
.form-msg{font-weight:800;min-height:1.5em}
.form-msg.ok{color:#0f8a5f}.form-msg.bad{color:#d0216b}
:root[data-theme="night"] .form-msg.ok{color:#5dffb4}:root[data-theme="night"] .form-msg.bad{color:#ff8ac0}
.reviews-list{flex:1 1 440px;min-width:0;display:flex;flex-direction:column;gap:18px}
.review{gap:8px}
.review-top{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:8px}
.review-top b{font:800 20px var(--head)}
.review-stars{color:#e0a800;font-size:20px;letter-spacing:2px;-webkit-text-stroke:1px var(--ink)}
.review-date{font-size:14px;color:var(--muted)}
.review p{white-space:pre-line;overflow-wrap:anywhere}
.empty{text-align:center;font-weight:800}

/* ---- footer, toast, confetti ---- */
.foot{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px;margin-top:24px;padding:28px 0 40px;border-top:3px dashed var(--ink);font-weight:700}
:root[data-theme="night"] .foot{border-top-color:#6c5aa8}
.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:50;padding:14px 22px;border:var(--line);border-radius:18px;background:var(--yellow);color:#1b1033;font:800 18px var(--body);box-shadow:var(--sh);animation:pageIn .4s cubic-bezier(.2,1.5,.4,1);max-width:calc(100vw - 32px);text-align:center}
.confetti{position:fixed;top:-20px;width:12px;height:18px;border:2px solid #1b1033;border-radius:3px;z-index:60;pointer-events:none;animation:fall linear forwards}
@keyframes fall{to{transform:translateY(110vh) rotate(720deg)}}
body.party .card,body.party .card-big,body.party .stat{animation:wobble .6s ease-in-out 3}
@keyframes wobble{25%{transform:rotate(-2deg)}75%{transform:rotate(2deg)}}

@media (max-width:760px){
 .wrap{padding:0 16px}
 .hero{padding:36px 24px}
 .hero-logo{transform:scale(.8);margin:-30px auto}
 .about-hero{padding:32px 24px}
 .art.big{border-right:none;border-bottom:var(--line)}
 .card{padding:22px}
 .game-body{padding:24px}
}
@media (prefers-reduced-motion:reduce){
 *,*::before,*::after{animation:none!important;transition:none!important}
}
