* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; width: 100%; height: 100%; overflow: hidden; background: #BFE6FF; color: #fff; touch-action: none; user-select: none; -webkit-user-select: none; font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue', sans-serif; }
#game { position: fixed; inset: 0; }
#slope { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hidden { display: none !important; }

#hud { position: absolute; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 12px) 14px 0; pointer-events: none; }
.hud-box { display: flex; align-items: center; gap: 6px; background: rgba(20, 40, 70, .55); border-radius: 999px; padding: 8px 14px; font-size: 18px; font-weight: 800; }
.hud-box .mp-icon { font-size: 20px; color: #FFD27A; }
#progress { position: absolute; right: 8px; top: 30%; width: 8px; height: 40%; background: rgba(20, 40, 70, .4); border-radius: 8px; overflow: hidden; pointer-events: none; }
#progressBar { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #FF8A3D; border-radius: 8px; }

.screen { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(180deg, rgba(30, 60, 110, .35), rgba(30, 60, 110, .6)); }
.screen.modal { background: rgba(10, 20, 40, .7); z-index: 5; }
.panel { width: 100%; max-width: 360px; background: rgba(255, 255, 255, .96); color: #24324A; border-radius: 28px; padding: 28px 22px 22px; text-align: center; box-shadow: 0 14px 40px rgba(20, 40, 80, .35); border: 4px solid #FF8A3D; }
.panel.small { max-width: 300px; }
.logo { font-size: 34px; font-weight: 900; color: #FF8A3D; letter-spacing: 2px; text-shadow: 0 3px 0 #FFE2C8; margin-bottom: 10px; }
.logo.s { font-size: 24px; }
.tip { font-size: 14px; color: #5B6B85; line-height: 1.6; margin-bottom: 18px; }
.stats { text-align: left; margin: 6px 0 18px; display: grid; gap: 8px; }
.stat { display: flex; justify-content: space-between; background: #FFF3E8; border-radius: 14px; padding: 12px 16px; font-size: 16px; font-weight: 700; }
.stat b { color: #FF8A3D; }
.bonus { margin-top: 12px; font-size: 13px; color: #8A5A2B; min-height: 18px; }

.btn { width: 100%; min-height: 54px; border: 0; border-radius: 18px; font-size: 18px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 12px; cursor: pointer; }
.btn .mp-icon { font-size: 24px; }
.btn.primary { background: #FF8A3D; color: #fff; box-shadow: 0 5px 0 #D96A20; }
.btn.primary:active { transform: translateY(3px); box-shadow: 0 2px 0 #D96A20; }
.btn.ad { background: #2E8BFF; color: #fff; box-shadow: 0 5px 0 #1C63C4; }
.btn.ad:active { transform: translateY(3px); box-shadow: 0 2px 0 #1C63C4; }
.btn.ghost { background: #E8EDF5; color: #5B6B85; }
.btn:disabled { opacity: .5; }
.ad-bar { height: 10px; background: #E8EDF5; border-radius: 10px; overflow: hidden; margin: 4px 0 6px; }
#adBar { height: 100%; width: 0; background: #2E8BFF; }

.toast { position: absolute; left: 50%; top: calc(env(safe-area-inset-top, 0px) + 16px); transform: translateX(-50%); z-index: 8; max-width: 88%; background: #FF8A3D; color: #fff; border-radius: 16px; padding: 12px 16px; font-size: 15px; font-weight: 800; text-align: center; box-shadow: 0 8px 20px rgba(20, 40, 80, .28); }
#resultBonus { margin: 0 0 4px; font-size: 15px; font-weight: 800; }
