/* ═════════ ГРАФИКА: атмосфера подвала, персонажи, эффекты ═════════ */
.atmo { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.atmo .bricks { position: absolute; inset: 0; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='60'%3E%3Cg stroke='%23120c10' stroke-width='3'%3E%3Crect x='0' y='0' width='60' height='30' fill='%233a2229'/%3E%3Crect x='60' y='0' width='60' height='30' fill='%23331d24'/%3E%3Crect x='-30' y='30' width='60' height='30' fill='%232e1a20'/%3E%3Crect x='30' y='30' width='60' height='30' fill='%233d252b'/%3E%3Crect x='90' y='30' width='60' height='30' fill='%232e1a20'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 60px; }
.atmo .vignette { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 30%, transparent 25%, rgba(5, 2, 6, .82) 75%, #050206 100%); }
.atmo .beam { position: absolute; top: 60px; left: 50%; width: 1100px; height: 110vh; transform: translateX(-50%);
  background: conic-gradient(from 150deg at 50% 0, transparent 0deg, rgba(255, 225, 150, .10) 18deg, rgba(255, 225, 150, .10) 42deg, transparent 60deg);
  animation: flicker 6s infinite; }
.atmo .pipes { position: absolute; top: 0; left: 0; width: 100%; height: 30px; opacity: .9; }
.atmo .drip { position: absolute; top: 34px; left: 38.5%; width: 6px; height: 9px; border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%; background: #8fc6ff; opacity: 0; animation: drip 4.5s infinite ease-in; }
@keyframes drip { 0%, 60% { opacity: 0; transform: translateY(0) scale(.4); } 65% { opacity: .8; transform: scale(1); } 100% { opacity: .6; transform: translateY(95vh); } }
.atmo .cobweb { position: absolute; top: 24px; left: 0; width: 150px; opacity: .8; }
.atmo .cobweb.flip { left: auto; right: 0; transform: scaleX(-1); }
.atmo .cobweb .spider { animation: spider 7s ease-in-out infinite; }
@keyframes spider { 50% { transform: translateY(40px); } }
.atmo .dust { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: rgba(255, 235, 200, .55); animation: dust linear infinite; }
@keyframes dust { 0% { transform: translate(0, 0); opacity: 0; } 20% { opacity: .9; } 100% { transform: translate(60px, -160px); opacity: 0; } }
.garland, .bulb { z-index: 2; }
.bulb { top: 20px; }

/* Неоновая вывеска */
.logo h1 { color: #ff5a78; text-shadow: 0 0 4px #fff, 0 0 10px #ff2d55, 0 0 24px #ff2d55, 0 0 48px #ff2d55; animation: neon 7s infinite; }
@keyframes neon { 0%, 41%, 43%, 76%, 78%, 100% { opacity: 1; } 42%, 77% { opacity: .55; text-shadow: none; } }
.logo small { text-shadow: 0 0 10px rgba(245, 201, 106, .6); }

/* Вспышки на смену фазы */
#flash { position: fixed; inset: 0; pointer-events: none; z-index: 20; opacity: 0; }
#flash.blackout { background: #000; animation: blackout 1.1s; }
#flash.redflash { background: radial-gradient(circle, rgba(255, 30, 60, .15), rgba(160, 0, 20, .65)); animation: fade .9s; }
#flash.goldflash { background: radial-gradient(circle, rgba(255, 230, 140, .7), transparent 70%); animation: fade 1.4s; }
#flash.greenflash { background: radial-gradient(circle, rgba(94, 224, 138, .35), transparent 70%); animation: fade .9s; }
@keyframes blackout { 0% { opacity: 0; } 10%, 30% { opacity: 1; } 35% { opacity: .2; } 45%, 60% { opacity: .95; } 100% { opacity: 0; } }
@keyframes fade { 0% { opacity: 1; } 100% { opacity: 0; } }
.shake { animation: bigshake .5s; }
@keyframes bigshake { 20% { transform: translate(-8px, 4px); } 40% { transform: translate(7px, -5px); } 60% { transform: translate(-5px, 3px); } 80% { transform: translate(4px, -2px); } }

/* Тамада */
#tamada { position: fixed; left: 18px; bottom: 0; z-index: 3; display: flex; align-items: flex-end; gap: 6px; pointer-events: none; transition: transform .5s; }
#tamada.hidden { transform: translateY(110%); }
#tamada .tamada { width: 170px; height: auto; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .6)); }
.tamada .tm-body, .tamada .tm-head { animation: bob 2.6s ease-in-out infinite; transform-box: view-box; transform-origin: 100px 270px; }
.tamada .tm-head { animation-delay: .1s; }
.tamada .eyes { animation: blink 4.2s infinite; transform-box: view-box; transform-origin: 100px 100px; }
@keyframes blink { 0%, 94%, 100% { transform: scaleY(1); } 97% { transform: scaleY(.1); } }
@keyframes bob { 50% { transform: translateY(-4px) rotate(-1deg); } }
.talking .mouth { animation: talk .18s infinite alternate; transform-box: fill-box; transform-origin: 50% 0; }
@keyframes talk { to { transform: scaleY(.35); } }
#tamada .bubble { max-width: 440px; margin-bottom: 150px; background: #fff7ea; color: #2a1a14; border-radius: 18px; padding: 12px 16px; font-size: 1.12rem; line-height: 1.3; position: relative; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); animation: pop .35s cubic-bezier(.3, 1.6, .5, 1); }
#tamada .bubble::before { content: ''; position: absolute; left: -20px; bottom: 18px; border: 8px solid transparent; border-right: 14px solid #fff7ea; }
#tamada .bubble.empty { display: none; }
#tamada .bubble b { color: #c31d3b; display: block; font-family: 'Russo One'; font-size: .8rem; letter-spacing: .06em; }
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
.host .quip { display: none; }
.host { padding-bottom: 40px; }

/* Руки вместо полосок */
.hands { vertical-align: middle; overflow: visible; }
.pcard .lv { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.snip-finger { animation: fingerfall 1.8s ease-in forwards; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes fingerfall { 0%, 40% { transform: none; opacity: 1; } 50% { transform: translateY(-4px) rotate(-12deg); } 100% { transform: translate(14px, 70px) rotate(140deg); opacity: 0; } }

/* Ножницы */
.scissors { overflow: visible; }
.scissors .blade-a { animation: cutA .3s 5 alternate; transform-box: view-box; transform-origin: 50px 50px; }
.scissors .blade-b { animation: cutB .3s 5 alternate; transform-box: view-box; transform-origin: 50px 50px; }
@keyframes cutA { to { transform: rotate(14deg); } } @keyframes cutB { to { transform: rotate(-14deg); } }

/* Мини-игры: иллюстрации */
.mg-art { height: 190px; display: block; margin: 0 auto; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .6)); }
.mg-hero { display: flex; justify-content: center; align-items: flex-end; gap: 18px; }
.calc-digits { animation: pulse .6s infinite alternate; }
.card-flip { animation: flip 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes flip { 0%, 40%, 100% { transform: scaleX(1); } 50%, 90% { transform: scaleX(-1); } }
.shout path { animation: shout .6s infinite; }
@keyframes shout { 0% { opacity: 0; } 50% { opacity: 1; } 100% { opacity: 0; transform: translateX(10px); } }
.glass-svg { height: 150px; overflow: visible; }
.glass-svg .bub { animation: bub 2.2s infinite ease-in; }
@keyframes bub { from { transform: translateY(0); opacity: .9; } to { transform: translateY(-26px); opacity: 0; } }
.glass-svg .smoke { animation: smoke 2s infinite; }
@keyframes smoke { to { transform: translateY(-14px); opacity: 0; } }
.glass-svg.poison { filter: drop-shadow(0 0 16px #7dff5a); }
.glass-svg.safe { opacity: .5; }
.glass-row { display: flex; justify-content: center; gap: 40px; }
.glass-row .glass-svg { height: 220px; animation: sway 3s ease-in-out infinite; }
.glass-row .glass-svg:nth-child(2) { animation-delay: .4s; } .glass-row .glass-svg:nth-child(3) { animation-delay: .8s; }
@keyframes sway { 50% { transform: rotate(3deg) translateY(-4px); } }
.glasses button { padding: 8px 4px; font-size: 1rem; }
.glasses button .glass-svg { height: 130px; display: block; margin: 0 auto; }
.cake { height: 190px; filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .6)); }
.cake .flame { animation: flame .3s infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flame { to { transform: scaleY(1.25) scaleX(.85); } }
.bunting { position: fixed; top: 8px; left: 0; width: 100%; height: 46px; z-index: 1; pointer-events: none; }

/* Печати */
.stamp { position: absolute; right: 14px; top: 50%; transform: translateY(-50%) rotate(-12deg); border: 4px solid var(--good); color: var(--good); font-family: 'Russo One'; padding: 2px 10px; border-radius: 8px; font-size: 1.1rem; animation: stamp .45s cubic-bezier(.3, 1.8, .5, 1); background: rgba(10, 30, 15, .75); }
.stamp.bad { border-color: var(--bad); color: var(--bad); background: rgba(40, 5, 10, .75); }
@keyframes stamp { from { transform: translateY(-50%) rotate(-12deg) scale(3); opacity: 0; } }
.stamp.big { position: static; display: inline-block; transform: rotate(-8deg); font-size: 2.4rem; padding: 6px 22px; border-width: 6px; animation: stampbig .45s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes stampbig { from { transform: rotate(-8deg) scale(3); opacity: 0; } }
.opt.right .cnt { display: none; }

/* Финал: коридор */
.lane { background: repeating-linear-gradient(90deg, #2a1f2c 0 38px, #1c141e 38px 40px), #1d1420; box-shadow: inset 0 3px 8px rgba(0, 0, 0, .6); }
.lane .door { top: 2px; right: 6px; font-size: inherit; }
.door-svg .door-leaf { transition: transform .8s; transform-box: view-box; transform-origin: 5px 30px; }
.door-svg.open .door-leaf { transform: scaleX(.15); }
.runner.moved { animation: hop .5s; }
@keyframes hop { 40% { transform: translateY(-14px); } }
.final-hero { display: flex; justify-content: center; }

/* Пьедестал */
.podium .p1 .av { animation: winner 1s ease-in-out infinite alternate; }
@keyframes winner { to { transform: translateY(-10px) rotate(6deg) scale(1.1); } }
.podium .p1::before { content: '👑'; display: block; font-size: 40px; animation: winner 1s ease-in-out infinite alternate-reverse; }

/* Лобби */
.lobby-hero { display: flex; justify-content: center; align-items: flex-end; gap: 40px; margin-top: 10px; }

/* Телефон */
.phone .big-msg.good { text-shadow: 0 0 18px rgba(94, 224, 138, .6); }
.phone .big-msg.bad { text-shadow: 0 0 18px rgba(255, 77, 94, .6); }
.big-hands { display: flex; justify-content: center; margin: 6px 0; }
.phone-art { display: flex; justify-content: center; align-items: flex-end; gap: 10px; }
.phone-art .tamada { width: 130px; }
.phone-art .cake { height: 120px; }
.phone .mg-art { height: 130px; }
.phone .me-bar .hands { flex-shrink: 0; }

@media (max-width: 900px) {
  #tamada .tamada { width: 100px; }
  #tamada .bubble { margin-bottom: 80px; font-size: .9rem; max-width: 62vw; }
  .glass-row .glass-svg { height: 150px; }
}

/* Экран ведущего поменьше большого телевизора: тамада компактнее, контент не залезает под него */
@media (max-width: 1500px) {
  #tamada .tamada { width: 120px; }
  #tamada .bubble { max-width: 330px; margin-bottom: 100px; font-size: .95rem; }
  .host .stage > .strip, .host .stage > .mg-board, .host .stage > .track { padding-left: 130px; }
}

/* Лендинг под формой входа */
.about { margin-top: 18px; background: rgba(20, 12, 18, .75); border: 1px solid var(--line); border-radius: 18px; padding: 18px; backdrop-filter: blur(2px); }
.about h2 { font-size: 1.35rem; color: var(--gold); margin: 6px 0 10px; }
.steps { padding-left: 0; list-style: none; margin: 0; display: grid; gap: 10px; counter-reset: s; }
.steps li { background: var(--panel); border-radius: 12px; padding: 10px 12px; line-height: 1.35; }
.feats { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.about-art { display: flex; justify-content: space-around; align-items: center; margin: 16px 0; gap: 8px; }
.about-art .mg-art { height: 100px; margin: 0; }
.about-art .glass-row { gap: 4px; }
.about-art .glass-row .glass-svg { height: 90px; }
.osada { display: flex; gap: 14px; align-items: center; text-decoration: none; color: #eaf3e4; background: linear-gradient(135deg, #10201a, #1b3523); border: 2px solid #2f5236; border-radius: 18px; padding: 14px; box-shadow: 0 0 30px rgba(95, 191, 63, .15); }
.osada span { display: flex; flex-direction: column; gap: 4px; }
.osada small { color: #a9bfa6; line-height: 1.35; }
.osada em { color: #ffd75e; font-style: normal; font-weight: 700; }
.osada:hover { border-color: #8fd16a; }
