@font-face {
  font-family: 'Kenney Future';
  src: url('../assets/font/kenney-future.ttf') format('truetype');
  font-display: swap;
}
:root {
  --bg: #060b16;
  --ink: #e8f4ff;
  --dim: #8aa3c2;
  --accent: #3fe0ff;
  --hot: #ff4fd8;
  --glass: rgba(10, 20, 38, 0.82);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  user-select: none; -webkit-user-select: none; touch-action: none;
}
canvas { display: block; width: 100vw; height: 100vh; height: 100dvh; touch-action: none; }
.hidden { display: none !important; }

#pauseBtn {
  position: fixed; top: calc(10px + env(safe-area-inset-top)); left: 12px;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.06); color: var(--ink); font-weight: 800; font-size: 15px; cursor: pointer;
}

.panel {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(3, 6, 14, 0.55); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  padding: 16px; z-index: 10; animation: fade 0.25s ease-out;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.card {
  width: 100%; max-width: 360px; background: var(--glass); border: 1px solid rgba(120,200,255,0.18);
  border-radius: 22px; padding: 22px 20px 18px; text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(63,224,255,0.08) inset;
  animation: pop 0.3s cubic-bezier(.2,1.4,.4,1);
}
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.logo {
  font-family: 'Kenney Future', system-ui, sans-serif; font-weight: 400;
  margin: 4px 0 2px; font-size: 40px; letter-spacing: 1px; line-height: 1;
  color: var(--accent); text-shadow: 0 0 18px rgba(63,224,255,0.55);
}
.logo span { color: var(--hot); text-shadow: 0 0 18px rgba(255,79,216,0.55); }
.sub { margin: 6px 0 14px; color: var(--dim); font-size: 14px; }
h2 { font-family: 'Kenney Future', system-ui, sans-serif; font-weight: 400; margin: 2px 0 10px; font-size: 22px; letter-spacing: 2px; color: var(--accent); }
.best-line { color: var(--dim); font-size: 13px; letter-spacing: 2px; margin-bottom: 14px; }
.best-line b { color: #ffd257; font-size: 18px; margin-left: 6px; }

.btn {
  display: block; width: 100%; margin: 8px 0; padding: 13px 14px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14); background: rgba(255,255,255,0.07);
  color: var(--ink); font-family: inherit; font-weight: 800; font-size: 16px; line-height: 1.1; letter-spacing: 1.5px; cursor: pointer;
  transition: transform 0.08s, background 0.15s;
}
.btn:active { transform: scale(0.97); }
.btn.primary {
  background: linear-gradient(180deg, #4ff0ff, #1aa6d6); color: #04131f; border: none; font-size: 19px;
  box-shadow: 0 6px 20px rgba(63,224,255,0.35);
}
.btn.daily { background: linear-gradient(180deg, rgba(255,79,216,0.28), rgba(255,79,216,0.12)); border-color: rgba(255,79,216,0.45); }
.btn.daily .t { display: block; }
.btn.daily .s { display: block; font-weight: 500; font-size: 12px; letter-spacing: 0.5px; color: #f7c6ee; margin-top: 4px; }
.btn.ghost { background: transparent; color: var(--dim); font-size: 14px; }
.btn.small { width: 44px; margin: 0; padding: 10px 0; font-size: 14px; }
.row { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.theme-name { flex: 1; }
.theme-name b { display: block; font-size: 16px; letter-spacing: 1px; }
.theme-name small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; min-height: 13px; }
.how { color: var(--dim); font-size: 12px; line-height: 1.45; margin: 10px 4px 0; }

.score-big { font-size: 54px; font-weight: 900; color: #fff; text-shadow: 0 0 20px rgba(63,224,255,0.5); margin: 4px 0; }
.near { font-size: 15px; color: #ffd257; font-weight: 700; min-height: 20px; }
.near.newbest { color: #7dff9b; font-size: 18px; letter-spacing: 2px; }
.stats { color: var(--dim); font-size: 13px; line-height: 1.6; margin: 10px 0 8px; }
.unlock { color: var(--hot); font-weight: 800; font-size: 14px; margin-bottom: 6px; }
