/* Brainrot Tycoon — enhanced visual layer */
:root{--neon-pink:#ff4fd8;--neon-cyan:#55efff;--deep:#17154d}
body{background:#17154d}
.game{isolation:isolate;background:
 radial-gradient(circle at 50% 42%,rgba(255,255,255,.34) 0 2%,transparent 18%),
 linear-gradient(180deg,#78dbff 0 38%,#77df78 38% 64%,#42ad58 64% 100%)}
.game:before{background:
 linear-gradient(rgba(255,255,255,.12) 1px,transparent 1px),
 linear-gradient(90deg,rgba(255,255,255,.12) 1px,transparent 1px),
 linear-gradient(145deg,#8df27f,#56b95c);
background-size:34px 34px,34px 34px,auto;filter:saturate(1.12)}
.game:after{content:"";position:absolute;z-index:1;left:0;right:0;top:40%;height:28%;pointer-events:none;background:linear-gradient(90deg,rgba(255,255,255,.12),transparent 18%,transparent 82%,rgba(255,255,255,.12));box-shadow:inset 0 10px 20px rgba(31,95,74,.12)}

.topbar{filter:drop-shadow(0 10px 12px rgba(35,42,105,.12))}
.brand{animation:brandFloat 3s ease-in-out infinite;background:linear-gradient(135deg,#ff69d4,#7868ff 60%,#42d4ff);border-width:3px;box-shadow:0 7px 0 #4c3baa,0 12px 24px rgba(82,55,190,.22)}
.wallet-item,.sound{border-width:3px;backdrop-filter:blur(8px)}
.wallet-item{background:linear-gradient(135deg,#26375c,#36548b)}
.wallet-item.gem{background:linear-gradient(135deg,#714fe0,#c45fff)}

.arena{overflow:hidden}
.arena:before{content:"";position:absolute;left:50%;top:47%;width:min(42vw,520px);height:min(42vw,520px);transform:translate(-50%,-50%);border-radius:50%;border:3px solid rgba(255,255,255,.22);box-shadow:0 0 60px rgba(255,255,255,.16),inset 0 0 60px rgba(255,103,211,.12);animation:arenaPulse 3.2s ease-in-out infinite}
.skyline{height:120px;opacity:.35;filter:blur(.2px)}
.skyline i{border-radius:8px 8px 0 0;background:linear-gradient(180deg,#5c65a6,#7e87bb)!important}
.boss-name{left:50%;transform:translateX(-50%) rotate(-1deg);z-index:5;width:auto;min-width:230px;text-align:center;letter-spacing:1.5px;border:3px solid white;background:linear-gradient(90deg,#ff58bb,#8c63ff)!important;color:white!important;box-shadow:0 7px 0 #613eac,0 12px 24px rgba(64,42,150,.18);text-shadow:0 2px 0 rgba(0,0,0,.12)}
.boss-wrap{z-index:4}.boss{border:0!important;border-radius:50%!important;background:radial-gradient(circle at 50% 45%,#fff 0 8%,#ffe875 9% 28%,#ff9dce 29% 52%,rgba(255,88,187,.12) 53%)!important;box-shadow:0 18px 0 rgba(54,101,80,.2),0 0 0 12px rgba(255,255,255,.16),0 0 55px rgba(255,89,190,.45)!important}
.boss span{filter:drop-shadow(0 12px 8px rgba(42,52,99,.22));animation:bossIdle 1.8s ease-in-out infinite}
.boss.hit{animation:bossHit .22s ease-out!important}.boss.hit span{animation:bossHitEmoji .22s ease-out!important}
.boss-health{border:4px solid #fff!important;background:#39456e!important;box-shadow:0 6px 0 rgba(38,55,92,.18)!important}.boss-health i{background:linear-gradient(90deg,#ff7ed9,#ffeb61)!important;box-shadow:0 0 16px #ff72cf}

.main-tap{background:linear-gradient(135deg,#ff61c7,#ff8bd5 48%,#ff4cb5)!important;border:5px solid white!important;border-radius:28px!important;box-shadow:0 12px 0 #bc3d96,0 18px 30px rgba(126,41,105,.25)!important;text-shadow:0 2px 0 rgba(154,40,112,.18);transform:rotate(-2deg);transition:transform .08s,box-shadow .08s!important}.main-tap:active{transform:translateY(8px) rotate(-2deg) scale(.96)!important;box-shadow:0 4px 0 #bc3d96,0 8px 16px rgba(126,41,105,.25)!important}.main-tap span{animation:tapIcon 1.1s ease-in-out infinite}
.combo{background:rgba(38,37,74,.82)!important;color:white!important;border:3px solid rgba(255,255,255,.8)!important;backdrop-filter:blur(8px);box-shadow:0 6px 14px rgba(38,37,74,.18)}
.streak-badge{border:3px solid white!important;background:linear-gradient(135deg,#ff8e4b,#ffcf55)!important;box-shadow:0 7px 0 rgba(159,79,48,.28)!important}

.sidebar{border:3px solid rgba(255,255,255,.96);background:rgba(255,255,255,.88);backdrop-filter:blur(12px);box-shadow:0 10px 0 rgba(38,55,92,.16),0 18px 30px rgba(38,55,92,.12)}.crew-card{border:3px solid #e6e3ff!important;background:linear-gradient(135deg,#fff,#edf5ff)!important;box-shadow:0 5px 0 #cfd4ef!important}.crew-card:hover{transform:translateY(-3px)!important;background:linear-gradient(135deg,#fff,#e6dfff)!important}
.shop{border-left:4px solid white!important;background:rgba(250,249,255,.96)!important;backdrop-filter:blur(16px)}.shop-head{background:linear-gradient(135deg,#7c65ff,#b36fff)!important;color:white!important}.shop-item{border:2px solid #e9e7fb!important;background:linear-gradient(135deg,#fff,#f8f5ff)!important;box-shadow:0 5px 0 #ddd9f3!important}.shop-item button{background:linear-gradient(135deg,#55d7b2,#34bd98)!important;border:0!important;color:#173f42!important;box-shadow:0 4px 0 #218975!important}
.bottom-nav{left:50%!important;right:auto!important;transform:translateX(-50%)!important;width:min(720px,calc(100% - 280px))!important;height:76px!important;border:4px solid white!important;border-radius:24px 24px 0 0!important;background:rgba(38,37,74,.92)!important;backdrop-filter:blur(12px);box-shadow:0 -8px 24px rgba(38,55,92,.16)}.nav-btn{color:#bbb9dc!important;border-radius:16px!important}.nav-btn.active{color:white!important;background:linear-gradient(135deg,#8063ff,#ba63ef)!important;box-shadow:0 5px 0 #5146ae!important;transform:translateY(-4px)}
.modal-card{border:5px solid white!important;box-shadow:0 14px 0 rgba(38,37,74,.22),0 30px 80px rgba(38,37,74,.28)!important}.cta{background:linear-gradient(135deg,#45d6ae,#45a5e0)!important;border:0!important;box-shadow:0 7px 0 #25866f!important}.cta.purple{background:linear-gradient(135deg,#9b62ff,#e45bd2)!important;box-shadow:0 7px 0 #7541b8!important}
.damage{color:white!important;text-shadow:0 3px 0 #bd3e99,0 0 12px #ff58bb!important;font-size:28px!important}.toast{border:3px solid white!important;background:linear-gradient(135deg,#252651,#6f55bf)!important;box-shadow:0 10px 24px rgba(38,37,74,.24)!important}
.effect-layer.shock{animation:screenShake .22s linear}.spark{position:absolute;width:8px;height:8px;border-radius:50%;background:#fff;box-shadow:0 0 12px #ffeb61,0 0 22px #ff58bb;pointer-events:none;animation:sparkFly .7s ease-out forwards}

.leaderboard-card{width:min(480px,92vw)!important}.leaderboard-name{display:flex;gap:8px;margin:14px 0}.leaderboard-name input{flex:1;min-width:0;border:3px solid #dddaf2;border-radius:12px;padding:10px 12px;font:800 16px 'Nunito',sans-serif;color:#26254a}.leaderboard-name button{border:0;border-radius:12px;padding:10px 14px;background:linear-gradient(135deg,#8063ff,#c45fff);color:white;font-weight:800}.leaderboard-list{display:grid;gap:8px}.leaderboard-row{display:grid;grid-template-columns:34px 38px 1fr auto;align-items:center;gap:7px;padding:9px 12px;border:2px solid #e9e7fb;border-radius:14px;background:linear-gradient(135deg,#fff,#f7f5ff);box-shadow:0 4px 0 #ddd9f3}.leaderboard-row.is-player{border-color:#ff82ce;background:linear-gradient(135deg,#fff3fb,#eeeaff);box-shadow:0 4px 0 #d6a6c9}.rank{width:28px;height:28px;display:grid;place-items:center;border-radius:50%;background:#6c63b8;color:white}.leader-emoji{font-size:24px}.leaderboard-row>span:last-child{font-size:13px;color:#55527a}

@keyframes brandFloat{50%{transform:rotate(1deg) translateY(-3px)}}@keyframes bossIdle{50%{transform:translateY(-8px) rotate(2deg) scale(1.03)}}@keyframes bossHit{50%{transform:scale(.88) rotate(-5deg)}}@keyframes bossHitEmoji{50%{transform:scale(.8) rotate(12deg)}}@keyframes tapIcon{50%{transform:rotate(8deg) scale(1.08)}}@keyframes arenaPulse{50%{transform:translate(-50%,-50%) scale(1.08);border-color:rgba(255,255,255,.5)}}@keyframes sparkFly{to{transform:translate(var(--tx),var(--ty)) scale(0);opacity:0}}@keyframes screenShake{25%{transform:translate(3px,-2px)}50%{transform:translate(-3px,2px)}75%{transform:translate(2px,1px)}}
.boss.boss-change{animation:bossChange 1.1s cubic-bezier(.2,.8,.2,1)!important}
.boss.boss-change span{animation:bossEmojiChange 1.1s ease-out!important}
@keyframes bossChange{0%{transform:scale(1) rotate(0);filter:brightness(1)}25%{transform:scale(.15) rotate(-18deg);filter:brightness(2) hue-rotate(90deg)}55%{transform:scale(.15) rotate(18deg);filter:brightness(3) hue-rotate(180deg)}100%{transform:scale(1) rotate(0);filter:brightness(1)}}
@keyframes bossEmojiChange{0%,100%{transform:scale(1) rotate(0);opacity:1}35%,60%{transform:scale(.2) rotate(20deg);opacity:0}}

@media(max-width:900px){.sidebar{width:150px}.bottom-nav{width:calc(100% - 180px)!important}.brand b{display:none}.brand{width:58px}.brand small{display:none}.wallet-item{min-width:85px}.boss{width:220px!important;height:220px!important}.boss span{font-size:150px!important}}
@media(max-width:620px){.sidebar{display:none}.bottom-nav{width:calc(100% - 16px)!important}.arena{left:0!important;width:100%!important}.topbar{left:8px;right:8px}.wallet-item{min-width:70px;padding:0 8px}.wallet-item.gem{min-width:72px}.shop{width:min(330px,88vw)!important}.boss{width:180px!important;height:180px!important}.boss span{font-size:120px!important}.main-tap{width:150px!important;height:150px!important}.boss-name{top:130px!important}}
/* Mobile landscape and touch layouts */
html,body,.game{width:100%;min-height:100%;overscroll-behavior:none}button,input,select{touch-action:manipulation}
@media(orientation:landscape) and (pointer:coarse),(orientation:landscape) and (max-height:500px){
  body,.game{height:100dvh!important;min-height:100dvh!important}
  .topbar{top:max(6px,env(safe-area-inset-top));left:10px;right:10px;height:50px}
  .brand{height:48px;padding:5px 9px}.brand span{font-size:28px}.brand b{font-size:16px}.brand small{margin-top:34px}
  .wallet-item{height:42px;min-width:74px;font-size:16px;padding:0 8px}.wallet-item span{font-size:20px}.wallet-item.gem{min-width:68px}.sound{width:42px;height:42px;font-size:16px}
  .sidebar{display:none!important}.arena{left:0!important;right:0!important;top:58px!important;bottom:64px!important;width:100%!important}
  .boss-name{top:6px!important;min-width:180px;padding:5px 10px;font-size:10px}
  .boss-wrap{top:48%!important;transform:translate(-50%,-50%) scale(.72)!important}
  .boss{width:190px!important;height:190px!important}.boss span{font-size:125px!important}.boss-health{top:-12px!important;height:18px}
  .main-tap{bottom:3px!important;width:120px!important;height:66px!important;border-width:4px!important}.main-tap span{display:none}.main-tap b{font-size:16px}.main-tap small{font-size:8px}
  .combo{right:12px!important;bottom:10px!important;padding:6px 8px}.streak-badge{right:12px!important;bottom:54px!important;padding:5px 8px;font-size:9px}
  .bottom-nav{left:50%!important;bottom:3px!important;width:calc(100% - 12px)!important;height:56px!important;max-width:none!important;padding:3px!important;border-radius:16px 16px 0 0!important;overflow-x:auto!important;justify-content:space-between!important;scrollbar-width:none}
  .bottom-nav::-webkit-scrollbar{display:none}.bottom-nav .nav-btn,.nav-btn{flex:1 0 52px!important;width:52px!important;height:46px!important;border-radius:10px!important}.nav-btn span{font-size:18px}.nav-btn b{font-size:7px}.nav-btn.active{transform:translateY(-2px)!important}
  .shop{top:54px!important;bottom:62px!important;width:min(310px,42vw)!important}.shop-head{height:48px}.shop-items{max-height:calc(100dvh - 112px);overflow-y:auto}
  .modal-card{max-height:calc(100dvh - 20px)!important;overflow-y:auto!important;padding:14px!important}.reward-icon{font-size:48px}.modal-card h2{font-size:20px}.modal-card p{min-height:0}.modal-close{top:7px!important;right:7px!important}
  .leaderboard-card,.gifts-card,.tutorial-card,.crystal-modal-card,.crew-modal-card{width:min(680px,94vw)!important}.leaderboard-list,.gift-inbox,.crystal-items,.crew-replace{max-height:calc(100dvh - 210px);overflow-y:auto}
  .tutorial-icon{font-size:44px;margin:2px}.tutorial-card p{min-height:40px}.tutorial-progress{margin-bottom:4px}.tutorial-actions button{padding:8px}.cta{height:44px}
}
@media(orientation:portrait) and (pointer:coarse),(orientation:portrait) and (max-width:620px){
  body,.game{height:100dvh!important;min-height:100dvh!important}.topbar{top:max(8px,env(safe-area-inset-top))}.arena{top:72px!important;bottom:88px!important}
  .bottom-nav{bottom:max(4px,env(safe-area-inset-bottom))!important;width:calc(100% - 8px)!important;overflow-x:auto;justify-content:flex-start;scrollbar-width:none}.bottom-nav::-webkit-scrollbar{display:none}
  .bottom-nav .nav-btn,.nav-btn{flex:0 0 58px!important;width:58px!important}.modal-card{max-height:calc(100dvh - 24px);overflow-y:auto}.leaderboard-list,.gift-inbox,.crystal-items,.crew-replace{max-height:calc(100dvh - 220px);overflow-y:auto}
}
