html, body { margin: 0; height: 100%; background: #05060c; overflow: hidden; touch-action: none; -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
body, button { font-family: "PingFang SC", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", "Yu Gothic", "Droid Sans Fallback", system-ui, sans-serif; color: #eef2ff; }
#app { position: fixed; inset: 0; }
#cv { position: absolute; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
#ui { position: fixed; inset: 0; pointer-events: none; display: flex; justify-content: center; }
#ui .col { position: relative; width: 100%; max-width: 560px; height: 100%; }
#ui .layer { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px 18px; box-sizing: border-box; pointer-events: none; }
#ui .layer.dim { background: rgba(3, 4, 10, 0.62); pointer-events: auto; }
.panel { pointer-events: auto; position: relative; background: linear-gradient(180deg, rgba(30, 38, 84, 0.94), rgba(12, 15, 40, 0.96)); border: 2px solid rgba(214, 222, 244, 0.85); box-shadow: 0 0 0 4px #06070e, 0 0 40px rgba(120, 160, 255, 0.25); border-radius: 18px; padding: 20px 18px; box-sizing: border-box; width: min(100%, 420px); max-height: calc(100% - 8px); overflow-y: auto; text-align: center; }
.panel::before { content: ""; position: absolute; inset: 6px; border-radius: 12px; pointer-events: none; background: linear-gradient(135deg, rgba(255, 123, 34, 0.18) 0 12%, transparent 12% 88%, rgba(31, 209, 196, 0.18) 88%); }
.panel h2 { margin: 0 0 10px; font-size: 24px; font-weight: 900; letter-spacing: 1px; color: #fff; text-shadow: 0 0 14px rgba(255, 220, 120, 0.5); }
.panel p { margin: 8px 0; font-size: 15px; line-height: 1.5; color: #d6ddf3; }
.btn { pointer-events: auto; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; min-width: 52px; padding: 8px 18px; margin: 8px auto 0; width: 100%; box-sizing: border-box; border-radius: 14px; border: 2px solid rgba(232, 238, 252, 0.9); background: linear-gradient(180deg, #2b3576, #161c48); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; box-shadow: 0 0 0 3px #06070e; position: relative; overflow: hidden; }
.btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(120deg, transparent 0 35%, rgba(255, 255, 255, 0.12) 35% 45%, transparent 45%); pointer-events: none; }
.btn:active { transform: scale(0.97); }
.btn.primary { background: linear-gradient(180deg, #ffb347, #e8670f); color: #1b0d00; border-color: #ffe7b8; }
.btn.teal { background: linear-gradient(180deg, #1fd1c4, #0a7f82); color: #021d1e; border-color: #c4fff9; }
.btn.violet { background: linear-gradient(180deg, #9a5cff, #4f22b0); }
.btn.ghost { background: rgba(10, 13, 32, 0.8); }
.btn.gold { background: linear-gradient(180deg, #3a2a08, #1c1404); color: #ffe9a8; border-color: #ffd34d; box-shadow: 0 0 0 3px #06070e, 0 0 12px rgba(255, 211, 77, 0.35); }
.btn[disabled] { opacity: 0.5; cursor: default; }
.row { display: flex; gap: 10px; width: 100%; }
.row .btn { flex: 1; }
.langs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 6px 0 4px; pointer-events: auto; }
.lang { min-height: 48px; min-width: 64px; padding: 6px 14px; border-radius: 24px; border: 2px solid #f2f5ff; background: rgba(8, 10, 26, 0.92); color: #ffffff; box-shadow: 0 0 0 2px #05060c, 0 0 8px rgba(255, 255, 255, 0.25); font-size: 16px; font-weight: 700; cursor: pointer; }
.lang.on { background: #ffd93a; color: #201600; border-color: #fff4c0; box-shadow: 0 0 14px rgba(255, 217, 58, 0.6); }
.title-wrap { pointer-events: none; text-align: center; margin-top: 6px; }
.game-title { font-size: clamp(40px, 12vw, 64px); font-weight: 900; letter-spacing: 4px; margin: 0; color: #fff; text-shadow: 0 0 6px #fff7d6, 0 0 22px rgba(255, 200, 80, 0.85), 0 0 48px rgba(120, 220, 255, 0.55); line-height: 1.1; }
.game-title.long { letter-spacing: 1px; font-size: clamp(32px, 9.5vw, 56px); }
.tagline { margin: 8px 0 0; font-size: 16px; color: #c9e9ff; text-shadow: 0 0 8px rgba(0, 0, 0, 0.9); }
.menu { pointer-events: auto; width: min(100%, 340px); margin-top: auto; }
.greet { font-size: 14px; color: #c9d3ee; min-height: 20px; margin-top: 6px; text-shadow: 0 0 6px #000; }
.note { font-size: 13px; color: #ffcf8a; margin-top: 6px; }
.stars { font-size: 30px; letter-spacing: 6px; color: #ffd93a; text-shadow: 0 0 12px rgba(255, 217, 58, 0.7); }
.stars .off { color: #3b4266; text-shadow: none; }
.big { font-size: 44px; font-weight: 900; color: #fff; margin: 4px 0; text-shadow: 0 0 18px rgba(255, 210, 120, 0.6); }
.kv { display: flex; justify-content: space-between; font-size: 15px; color: #d6ddf3; margin: 4px 0; padding: 0 6px; }
.grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 10px 0; }
.wbtn { min-height: 56px; border-radius: 12px; border: 2px solid rgba(220, 228, 250, 0.8); background: linear-gradient(180deg, #24306c, #121741); color: #fff; font-size: 18px; font-weight: 800; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; box-shadow: 0 0 0 2px #06070e; }
.wbtn small { font-size: 10px; color: #ffd93a; letter-spacing: 1px; }
.wbtn[disabled] { opacity: 0.35; cursor: default; }
.pausebtn { pointer-events: auto; position: absolute; left: 50%; transform: translateX(-50%); width: 64px; height: 64px; border-radius: 50%; border: 3px solid #e8eefc; background: radial-gradient(circle at 40% 35%, #3a4590, #121741); box-shadow: 0 0 0 4px #06070e, 0 0 20px rgba(140, 170, 255, 0.4); cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; }
.pausebtn i { display: block; width: 7px; height: 24px; border-radius: 2px; background: #fff; }
.tut { pointer-events: auto; position: absolute; left: 16px; right: 16px; bottom: 16px; background: linear-gradient(180deg, rgba(30, 38, 84, 0.96), rgba(12, 15, 40, 0.98)); border: 2px solid #e8eefc; border-radius: 16px; box-shadow: 0 0 0 4px #06070e; padding: 12px 14px; box-sizing: border-box; overflow-y: auto; }
.tut .hd { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: #ffd93a; font-weight: 800; }
.tut .hd .btn { width: auto; margin: 0; min-height: 48px; font-size: 15px; padding: 4px 16px; }
.tut p { margin: 6px 0 0; font-size: 15px; line-height: 1.45; color: #eef2ff; }
.toast { position: absolute; left: 50%; top: 22%; transform: translateX(-50%); background: rgba(8, 10, 26, 0.92); border: 2px solid #ffd93a; color: #fff; padding: 10px 18px; border-radius: 14px; font-weight: 800; font-size: 16px; pointer-events: none; white-space: nowrap; max-width: 90%; text-overflow: ellipsis; overflow: hidden; animation: tin 2.2s ease forwards; }
@keyframes tin { 0% { opacity: 0; transform: translate(-50%, 10px); } 12% { opacity: 1; transform: translate(-50%, 0); } 80% { opacity: 1; } 100% { opacity: 0; } }
.lb { list-style: none; padding: 0; margin: 8px 0; text-align: left; }
.lb li { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 4px 8px; border-radius: 10px; border-bottom: 1px solid rgba(200, 210, 240, 0.15); }
.lb li.me { background: rgba(255, 217, 58, 0.16); border: 1px solid rgba(255, 217, 58, 0.6); }
.lb li.click { cursor: pointer; }
.lb .rk { width: 34px; font-weight: 900; color: #ffd93a; text-align: center; }
.lb img { width: 34px; height: 34px; border-radius: 50%; background: #222a55; object-fit: cover; }
.lb .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb .sc { font-weight: 800; }
.badge { font-size: 11px; background: #1fd1c4; color: #021d1e; border-radius: 8px; padding: 1px 6px; margin-left: 6px; font-weight: 800; }
.coin { width: 22px; height: 22px; vertical-align: middle; }
.skin { display: flex; align-items: center; gap: 12px; padding: 8px; border-radius: 12px; border: 1px solid rgba(200, 210, 240, 0.25); margin: 8px 0; text-align: left; }
.skin canvas { width: 48px; height: 48px; flex: none; }
.skin .nm { flex: 1; font-weight: 800; }
.skin .btn { width: auto; margin: 0; min-width: 96px; font-size: 15px; }
.toggle { display: flex; align-items: center; justify-content: space-between; margin: 6px 0; font-size: 16px; }
.toggle .btn { width: 96px; margin: 0; }
.close-x { position: absolute; top: 8px; right: 8px; width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(220, 228, 250, 0.7); background: rgba(8, 10, 26, 0.85); color: #fff; font-size: 22px; cursor: pointer; z-index: 2; }
.loadbar { pointer-events: none; width: min(70%, 280px); height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); overflow: hidden; margin: 14px auto 0; }
.loadbar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #1fd1c4, #ffd93a); transition: width 0.2s; }
.row .btn { padding-left: 8px; padding-right: 8px; font-size: 16px; min-width: 0; overflow-wrap: anywhere; }
@media (max-height: 560px) {
  .game-title, .game-title.long { font-size: clamp(26px, 7vh, 40px); letter-spacing: 1px; }
  .tagline { display: none; }
  .langs { margin: 2px 0; }
  .menu { width: min(100%, 560px); display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .menu > .btn { margin: 0; min-height: 48px; font-size: 16px; padding: 6px 8px; }
  .menu > .row { grid-column: 2 / -1; gap: 6px; }
  .menu > .lbbtn { grid-column: 1 / 2; }
  .menu > .row .btn { margin: 0; min-height: 48px; }
  .menu > .greet, .menu > .note, .menu > .loadbar, .menu > p { grid-column: 1 / -1; }
  #ui .layer { padding-top: 10px; padding-bottom: 16px; }
}
.btn.daily, .btn.lbbtn { flex-direction: column; gap: 1px; line-height: 1.15; padding-top: 6px; padding-bottom: 6px; }
.btn.lbbtn .mod { font-size: 12.5px; font-weight: 700; color: #fff3cf; opacity: 0.92; text-align: center; overflow-wrap: anywhere; }
.panel .rank { color: #ffe08a; font-weight: 700; }
.btn.daily .mod { font-size: 12.5px; font-weight: 700; color: #f1e2ff; opacity: 0.92; text-align: center; overflow-wrap: anywhere; }
.starline { color: #ffe27a; font-weight: 800; letter-spacing: 0.5px; margin: 4px 0; }
