/* 单一深色主题：整个游戏是霓虹夜景，不跟随系统浅色 */
:root{--bg:#05010d;--frame:#140630;--glow:rgba(255,61,187,.35);--ink:#f0ecff;color-scheme:dark}
html,body{height:100%;margin:0;background:var(--bg)}
body{position:fixed;inset:0;overflow:hidden;overscroll-behavior:none;background:radial-gradient(70% 60% at 50% 30%,#2a0845 0%,var(--bg) 70%);color:var(--ink);
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent;-webkit-text-size-adjust:100%}
#wrap{position:fixed;inset:0;display:flex;align-items:center;justify-content:center}
/* 手机：铺满整个屏幕（dvh 跟随地址栏伸缩），安全区由游戏自己避让 */
#game{position:relative;width:100%;height:100%;height:100dvh;overflow:hidden;touch-action:none;background:var(--bg)}
#game canvas{display:block;touch-action:none;cursor:grab}
/* 电脑和平板横放：居中显示竖屏画面 */
@media (min-width:600px) and (min-height:560px){
  #game{height:min(calc(100dvh - 32px),900px);width:auto;aspect-ratio:9/18;max-width:calc(100vw - 32px);border-radius:30px;
    box-shadow:0 0 0 8px var(--frame),0 0 0 9px var(--glow),0 30px 90px rgba(0,0,0,.7),0 0 120px rgba(255,61,187,.18)}
}
/* 手机横屏：竖屏游戏放不下，整屏提示把手机竖过来（游戏会暂停） */
#rotate{display:none}
@media (orientation:landscape) and (max-height:560px) and (pointer:coarse){
  #wrap{visibility:hidden}
  #rotate{display:flex;position:fixed;inset:0;z-index:60;flex-direction:column;align-items:center;justify-content:center;gap:14px;
    padding:max(16px,env(safe-area-inset-left,0px));background:radial-gradient(70% 70% at 50% 40%,#2a0845,var(--bg));
    font:700 18px/1.4 -apple-system,"PingFang SC","Microsoft YaHei",sans-serif;color:var(--ink);text-align:center}
  #rotate::before{content:"";width:44px;height:72px;border:3px solid #5ff6ff;border-radius:10px;box-shadow:0 0 18px rgba(95,246,255,.5);
    animation:szdj-turn 1.6s ease-in-out infinite}
}
@keyframes szdj-turn{0%,20%{transform:rotate(-90deg)}60%,100%{transform:rotate(0)}}
@media (prefers-reduced-motion:reduce){#game canvas{cursor:default}#rotate::before{animation:none}}
