/* ════════════════════════════════════════════════════════
   NIGHTWINGS HANGMAN — styles
   One game, three skins via [data-theme]:
     starfall (default) · reboot · decrypt
   ════════════════════════════════════════════════════════ */

.hm-app {
  position: fixed; inset: 0; overflow: hidden;
  font-family: var(--font-ui, 'Hanken Grotesk', sans-serif);
  color: #fff; isolation: isolate;
}

/* ── theme backgrounds ── */
.hm-app[data-theme="starfall"] { background: radial-gradient(130% 95% at 80% 2%, #281A57 0%, #160C33 44%, #0A0518 100%); }
.hm-app[data-theme="reboot"]   { background: linear-gradient(165deg, #1c1340 0%, #0D0820 60%); }
.hm-app[data-theme="decrypt"]  { background: #0A0518; }

.hm-stars { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.hm-stars i { position: absolute; border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.8); animation: hmTwinkle 3.6s infinite; }
.hm-app[data-theme="reboot"] .hm-stars,
.hm-app[data-theme="decrypt"] .hm-stars { opacity: .35; }

/* decrypt scanlines */
.hm-scan { position: absolute; inset: 0; pointer-events: none; z-index: 40; display: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.16) 0, rgba(0,0,0,.16) 1px, transparent 2px, transparent 3px); }
.hm-app[data-theme="decrypt"] .hm-scan { display: block; }

/* ════ TOP BAR ════ */
.hm-top { position: relative; z-index: 30; display: flex; align-items: center; gap: 14px;
  height: 60px; padding: 0 24px; background: rgba(13,8,32,.62);
  border-bottom: 1px solid rgba(180,178,220,.1); backdrop-filter: blur(10px); }
.hm-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.hm-brand:hover b { color: #F5B800; }
.hm-home { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; text-decoration: none; color: #B4B2DC; background: rgba(255,255,255,.05);
  border: 1px solid rgba(180,178,220,.2); transition: .15s; }
.hm-home:hover { color: #F5B800; border-color: rgba(245,184,0,.5); background: rgba(245,184,0,.08); }
.hm-brand img { width: 30px; height: 30px; }
.hm-brand b { font-family: var(--font-d, 'Bricolage Grotesque', sans-serif); font-weight: 800; font-size: 16px; letter-spacing: -.4px; }
.hm-brand .hm-sep { width: 1px; height: 22px; background: rgba(180,178,220,.2); margin: 0 2px; }
.hm-brand .hm-game { font-family: var(--font-d); font-weight: 700; font-size: 14px; color: #B4B2DC; }
.hm-app[data-theme="decrypt"] .hm-brand .hm-game { font-family: var(--font-mono, monospace); }
.hm-top .hm-spacer { flex: 1; }

/* generic small controls */
.hm-pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px; border-radius: 999px;
  background: rgba(13,8,32,.6); border: 1px solid rgba(180,178,220,.16); }
.hm-pill button { border: none; background: none; cursor: pointer; color: #B4B2DC; font-family: inherit;
  font-weight: 800; font-size: 11px; letter-spacing: .5px; padding: 5px 11px; border-radius: 999px; transition: .15s; }
.hm-pill button.on { background: #F5B800; color: #1A0E3D; }

/* theme dots */
.hm-themes { display: inline-flex; gap: 6px; align-items: center; padding: 6px 8px; border-radius: 999px;
  background: rgba(13,8,32,.6); border: 1px solid rgba(180,178,220,.16); }
.hm-themes .dot { width: 24px; height: 24px; border-radius: 50%; cursor: pointer; border: 1px solid rgba(180,178,220,.3);
  display: flex; align-items: center; justify-content: center; font-size: 11px; transition: .15s; position: relative; }
.hm-themes .dot.starfall { background: radial-gradient(circle at 35% 35%, #FFF7DC, #F1CE74); }
.hm-themes .dot.reboot   { background: linear-gradient(160deg, #3D2B8A, #170E33); }
.hm-themes .dot.decrypt  { background: #0A0518; color: #F5B800; font-family: var(--font-mono, monospace); font-weight: 700; }
.hm-themes .dot.on { border-color: #F5B800; box-shadow: 0 0 10px rgba(245,184,0,.5); transform: scale(1.08); }

.hm-link { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.62); padding: 7px 12px; border-radius: 8px; cursor: pointer; transition: .15s; }
.hm-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.hm-link.on { color: #F5B800; background: rgba(245,184,0,.1); font-weight: 700; }

/* ════ SCREENS ════ */
.hm-screen { position: absolute; inset: 60px 0 0 0; z-index: 10; overflow-y: auto; display: none; }
.hm-screen.on { display: block; }
.hm-wrap { max-width: 1080px; margin: 0 auto; padding: 34px 40px 60px; position: relative; }

.hm-eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: #F5B800; font-weight: 700; }
.hm-h1 { font-family: var(--font-d); font-weight: 800; font-size: 36px; letter-spacing: -1.4px; margin: 8px 0 0; }
.hm-sub { font-size: 14px; color: #B4B2DC; margin: 8px 0 0; max-width: 480px; }
.hm-app[data-theme="decrypt"] .hm-h1 { font-family: var(--font-mono, monospace); font-weight: 700; letter-spacing: -.5px; }

/* buttons */
.hm-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: none;
  font-family: var(--font-d); font-weight: 800; font-size: 15px; padding: 13px 26px; border-radius: 12px;
  background: #F5B800; color: #1A0E3D; transition: .15s; box-shadow: 0 8px 24px rgba(245,184,0,.28); }
.hm-btn:hover { background: #E8A800; transform: translateY(-1px); }
.hm-btn.ghost { background: rgba(255,255,255,.06); color: #fff; border: 1px solid rgba(180,178,220,.25); box-shadow: none; }
.hm-btn.ghost:hover { background: rgba(255,255,255,.12); }
.hm-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

/* segmented */
.hm-seg { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px;
  background: rgba(13,8,32,.6); border: 1px solid rgba(180,178,220,.14); }
.hm-seg button { border: none; background: none; cursor: pointer; padding: 8px 18px; border-radius: 999px; white-space: nowrap;
  font-family: inherit; font-size: 13px; font-weight: 700; color: #B4B2DC; transition: .15s; }
.hm-seg button.on { background: #F5B800; color: #1A0E3D; }

/* ── CATEGORY SELECT ── */
.hm-row { display: flex; align-items: center; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.hm-row .lbl { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #8B87C4; font-weight: 700; }
.hm-cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 24px; }
.hm-cat { border-radius: 16px; padding: 18px; cursor: pointer; position: relative; overflow: hidden;
  background: rgba(20,12,45,.55); border: 1px solid rgba(180,178,220,.14); transition: .15s; }
.hm-cat:hover { border-color: rgba(245,184,0,.4); transform: translateY(-2px); }
.hm-cat.on { background: linear-gradient(160deg, rgba(245,184,0,.16), rgba(20,12,45,.6)); border-color: rgba(245,184,0,.55); box-shadow: 0 0 26px rgba(245,184,0,.2); }
.hm-cat .ic { font-size: 30px; margin-bottom: 12px; }
.hm-cat .nm { font-family: var(--font-d); font-weight: 800; font-size: 17px; letter-spacing: -.3px; }
.hm-cat .meta { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 12px; color: #8B87C4; }
.hm-cat .meta .d { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; }
.hm-cat .meta .d i { width: 7px; height: 7px; border-radius: 50%; }
.hm-cat .sel { position: absolute; top: 14px; right: 14px; font-size: 10.5px; font-weight: 700; color: #F5B800; letter-spacing: 1px; }
.hm-cat.surprise { background: rgba(91,78,174,.16); border: 1px dashed rgba(180,178,220,.3); }

/* ════ PLAY ════ */
.hm-play { position: relative; z-index: 10; min-height: calc(100vh - 60px); display: flex; flex-direction: column; }
.hm-hud { display: flex; align-items: center; gap: 18px; padding: 14px 26px; border-bottom: 1px solid rgba(180,178,220,.1); background: rgba(13,8,32,.4); backdrop-filter: blur(8px); }
.hm-hud .back { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,.06); border: 1px solid rgba(180,178,220,.2); display: flex; align-items: center; justify-content: center; font-size: 16px; cursor: pointer; }
.hm-hud .cat { display: flex; flex-direction: column; }
.hm-hud .cat .k { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #8B87C4; font-weight: 700; }
.hm-hud .cat .v { font-family: var(--font-d); font-weight: 700; font-size: 16px; }
.hm-stats { display: flex; gap: 26px; }
.hm-stat { text-align: center; }
.hm-stat .v { font-family: var(--font-d); font-weight: 800; font-size: 22px; line-height: 1; }
.hm-stat .v.gold { color: #F5B800; }
.hm-stat .k { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #8B87C4; margin-top: 4px; font-weight: 700; }
.hm-hint { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 10px; cursor: pointer;
  background: rgba(245,184,0,.1); border: 1px solid rgba(245,184,0,.3); color: #F5B800; font-size: 13px; font-weight: 700; }
.hm-hint:disabled { opacity: .4; cursor: not-allowed; }

.hm-board { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; padding: 24px; position: relative; }

/* lives */
.hm-lives { display: flex; align-items: center; gap: 12px; }
.hm-lives .lbl { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #8B87C4; font-weight: 700; }
.hm-lives .pips { display: flex; gap: 9px; }
.hm-life { width: 18px; height: 18px; border-radius: 50%; transition: .3s; }
/* starfall = moons */
.hm-app[data-theme="starfall"] .hm-life { background: radial-gradient(circle at 38% 36%, #FFF7DC, #F1CE74); border: 1.5px solid rgba(245,205,120,.7); box-shadow: 0 0 12px rgba(245,205,120,.5); }
.hm-app[data-theme="starfall"] .hm-life.dead { background: transparent; border-color: rgba(180,178,220,.25); box-shadow: none; }
/* reboot = power cells */
.hm-app[data-theme="reboot"] .hm-life { border-radius: 4px; background: #F5B800; border: 1px solid rgba(245,184,0,.6); box-shadow: 0 0 10px rgba(245,184,0,.4); }
.hm-app[data-theme="reboot"] .hm-life.dead { background: rgba(224,90,55,.15); border-color: rgba(224,90,55,.4); box-shadow: none; }
/* decrypt = firewall blocks */
.hm-app[data-theme="decrypt"] .hm-life { border-radius: 3px; width: 30px; height: 14px; background: #E05A37; border: 1px solid rgba(224,90,55,.6); box-shadow: 0 0 10px rgba(224,90,55,.4); }
.hm-app[data-theme="decrypt"] .hm-life.dead { background: rgba(180,178,220,.08); border-color: rgba(180,178,220,.14); box-shadow: none; }
.hm-lives .left { font-size: 12.5px; font-weight: 700; color: #FF7A5A; }

/* theme stage (moon / robot / signal header) */
.hm-stage { display: flex; align-items: center; justify-content: center; min-height: 4px; }
.hm-moon { width: 96px; height: 96px; border-radius: 50%; position: relative;
  background: radial-gradient(circle at 38% 36%, #FFF7DC, #F3D98A 60%, #C9A23C); box-shadow: 0 0 56px rgba(245,205,120,.38), inset -6px -6px 16px rgba(120,90,20,.35); }
.hm-moon::after { content: ''; position: absolute; top: -6px; right: -10px; width: 92px; height: 92px; border-radius: 50%; background: radial-gradient(130% 95% at 80% 2%, #281A57 0%, #160C33 60%); }
/* reboot robot */
.hm-robot { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.hm-robot .ant { width: 11px; height: 11px; border-radius: 50%; background: #F5B800; box-shadow: 0 0 14px rgba(245,184,0,.7); animation: hmPulse 1.6s infinite; }
.hm-robot .antstem { width: 2px; height: 14px; background: rgba(180,178,220,.4); }
.hm-robot .head { width: 132px; height: 100px; border-radius: 18px; background: linear-gradient(160deg,#2E2152,#170E33); border: 2px solid rgba(245,184,0,.3); box-shadow: inset 0 2px 10px rgba(0,0,0,.4); position: relative; }
.hm-robot .eyes { display: flex; gap: 20px; justify-content: center; padding-top: 28px; }
.hm-robot .eye { width: 28px; height: 16px; border-radius: 6px; background: #F5B800; box-shadow: 0 0 14px rgba(245,184,0,.6); transition: .3s; }
.hm-robot.dmg-3 .head { border-color: rgba(245,150,60,.4); }
.hm-robot.dmg-4 .eye { background: #E89A18; }
.hm-robot.dmg-5 .eye { background: rgba(224,90,55,.8); box-shadow: 0 0 10px rgba(224,90,55,.5); animation: hmFlicker .9s infinite; }
.hm-robot .mouth { display: flex; gap: 4px; justify-content: center; margin-top: 16px; }
.hm-robot .mouth i { width: 5px; height: 13px; border-radius: 2px; background: rgba(180,178,220,.2); }
.hm-signal { font-family: var(--font-mono, monospace); font-size: 12px; letter-spacing: 1px; color: #8B87C4; text-align: center; }
.hm-signal b { color: #F5B800; }

/* word slots */
.hm-word { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 760px; }
.hm-slot { display: flex; align-items: center; justify-content: center; font-family: var(--font-d); font-weight: 800; transition: .2s; }
/* starfall = star circles */
.hm-app[data-theme="starfall"] .hm-slot { width: 60px; height: 60px; border-radius: 50%; font-size: 28px;
  background: rgba(20,12,45,.7); border: 1.5px solid rgba(180,178,220,.2); color: rgba(180,178,220,.4); box-shadow: inset 0 0 12px rgba(0,0,0,.4); }
.hm-app[data-theme="starfall"] .hm-slot.filled { background: radial-gradient(circle at 40% 35%, rgba(245,184,0,.34), rgba(245,184,0,.06)); border-color: rgba(245,184,0,.65); color: #FFE9A8; box-shadow: 0 0 24px rgba(245,184,0,.4); }
/* reboot = sockets */
.hm-app[data-theme="reboot"] .hm-slot { width: 50px; height: 60px; border-radius: 10px; font-size: 26px;
  background: rgba(13,8,32,.55); border: 1.5px solid rgba(180,178,220,.14); color: transparent; box-shadow: inset 0 -3px 0 rgba(180,178,220,.12); }
.hm-app[data-theme="reboot"] .hm-slot.filled { background: rgba(245,184,0,.14); border-color: rgba(245,184,0,.5); color: #F5B800; box-shadow: 0 0 16px rgba(245,184,0,.22); }
/* decrypt = cipher boxes */
.hm-app[data-theme="decrypt"] .hm-slot { width: 48px; height: 58px; border-radius: 6px; font-family: var(--font-mono, monospace); font-size: 25px; font-weight: 700;
  background: rgba(245,184,0,.04); border: 1px solid rgba(245,184,0,.22); color: rgba(245,184,0,.45); }
.hm-app[data-theme="decrypt"] .hm-slot.filled { background: rgba(76,175,138,.12); border-color: rgba(76,175,138,.5); color: #7FE3BE; box-shadow: 0 0 16px rgba(76,175,138,.22); text-shadow: 0 0 10px rgba(76,175,138,.6); }
.hm-slot.pop { animation: hmPop .35s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)) both; }
.hm-slot.space { border: none !important; background: none !important; box-shadow: none !important; width: 18px !important; }

/* clue */
.hm-clue { font-size: 14px; color: #B4B2DC; text-align: center; max-width: 560px; min-height: 20px; }
.hm-clue .k { opacity: .55; }
.hm-app[data-theme="decrypt"] .hm-clue { font-family: var(--font-mono, monospace); font-size: 13px; }

/* keyboard */
.hm-kb { display: flex; flex-direction: column; gap: 7px; align-items: center; padding-bottom: 24px; }
.hm-kb .krow { display: flex; gap: 7px; }
.hm-key { display: flex; align-items: center; justify-content: center; cursor: pointer; font-weight: 700; transition: .12s; user-select: none;
  background: rgba(255,255,255,.05); border: 1px solid rgba(180,178,220,.2); color: #E7E5F2; }
.hm-key:hover:not(.used) { border-color: rgba(245,184,0,.5); background: rgba(245,184,0,.08); }
.hm-key.correct { color: #FFE9A8; border-color: rgba(245,184,0,.6); background: radial-gradient(circle at 40% 35%, rgba(245,184,0,.4), rgba(245,184,0,.08)); box-shadow: 0 0 12px rgba(245,184,0,.35); cursor: default; }
.hm-key.wrong { color: rgba(224,90,55,.6); border-color: rgba(224,90,55,.3); background: rgba(224,90,55,.08); opacity: .5; text-decoration: line-through; cursor: default; }
/* shapes per theme */
.hm-kb.round .hm-key { width: 40px; height: 40px; border-radius: 50%; font-size: 15px; }
.hm-kb.square .hm-key { width: 46px; height: 46px; border-radius: 9px; font-size: 15px; }
.hm-kb.mono .hm-key { width: 38px; height: 38px; border-radius: 5px; font-size: 14px; font-family: var(--font-mono, monospace); }
.hm-app[data-theme="decrypt"] .hm-key.correct { color: #7FE3BE; border-color: rgba(76,175,138,.5); background: rgba(76,175,138,.14); box-shadow: 0 0 12px rgba(76,175,138,.25); }

/* owl narrator */
.hm-owl { position: absolute; left: 12px; bottom: 8px; width: 104px; height: 104px; z-index: 12; filter: drop-shadow(0 0 22px rgba(180,178,220,.22)); pointer-events: none; }
.hm-owl-say { position: absolute; left: 118px; bottom: 78px; z-index: 12; max-width: 240px; padding: 9px 14px; font-size: 13px; font-weight: 600; color: #B4B2DC;
  background: rgba(29,18,61,.85); border: 1px solid rgba(245,184,0,.25); border-radius: 14px 14px 14px 2px; }
.hm-app[data-theme="decrypt"] .hm-owl-say { font-family: var(--font-mono, monospace); font-size: 12px; }
@media (max-width: 760px) { .hm-owl, .hm-owl-say { display: none; } }

.hm-shake { animation: hmShake .4s; }

/* ════ WIN / LOSE OVERLAY ════ */
.hm-overlay { position: absolute; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(8,4,20,.62); backdrop-filter: blur(3px); }
.hm-overlay.on { display: flex; }
.hm-modal { width: 480px; max-width: 92vw; border-radius: 24px; padding: 32px 34px 28px; text-align: center; opacity: 1;
  background: linear-gradient(165deg, rgba(45,27,105,.6), rgba(13,8,32,.96)), #0D0820; border: 1px solid rgba(245,184,0,.4);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(245,184,0,.12); animation: hmRise .35s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)) both; }
.hm-modal.lose { border-color: rgba(224,90,55,.45); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 60px rgba(224,90,55,.12); }
.hm-modal img { width: 92px; height: 92px; margin: 0 auto; filter: drop-shadow(0 0 26px rgba(245,184,0,.4)); }
.hm-modal h2 { font-family: var(--font-d); font-weight: 800; font-size: 28px; letter-spacing: -1px; margin: 8px 0 0; }
.hm-reveal { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0 4px; }
.hm-reveal span { width: 38px; height: 46px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-weight: 800; font-size: 20px; background: radial-gradient(circle at 40% 35%, rgba(245,184,0,.3), rgba(245,184,0,.06)); border: 1.5px solid rgba(245,184,0,.6); color: #FFE9A8; }
.hm-modal.lose .hm-reveal span { background: rgba(224,90,55,.12); border-color: rgba(224,90,55,.5); color: #FF9A7A; }
.hm-points { font-family: var(--font-d); font-weight: 800; font-size: 44px; color: #F5B800; letter-spacing: -1.5px; margin-top: 12px; text-shadow: 0 0 30px rgba(245,184,0,.4); }
.hm-breakdown { text-align: left; margin: 14px 0 6px; }
.hm-breakdown .r { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid rgba(180,178,220,.1); font-size: 13.5px; color: #B4B2DC; }
.hm-breakdown .r b { font-family: var(--font-d); font-weight: 800; font-size: 15px; color: #fff; }
.hm-mini { display: flex; justify-content: center; gap: 24px; margin: 16px 0 18px; }
.hm-mini .m { text-align: center; }
.hm-mini .m .v { font-family: var(--font-d); font-weight: 800; font-size: 20px; }
.hm-mini .m .k { font-size: 10.5px; letter-spacing: 1px; color: #8B87C4; text-transform: uppercase; margin-top: 3px; }
.hm-modal .acts { display: flex; gap: 12px; }
.hm-modal .acts .hm-btn { flex: 1; justify-content: center; }

/* ════ SCOREBOARD ════ */
.hm-statstrip { display: flex; gap: 14px; margin-top: 22px; flex-wrap: wrap; }
.hm-statcard { flex: 1; min-width: 120px; padding: 16px 18px; border-radius: 14px; background: rgba(20,12,45,.55); border: 1px solid rgba(180,178,220,.14); }
.hm-statcard .v { font-family: var(--font-d); font-weight: 800; font-size: 26px; letter-spacing: -.5px; }
.hm-statcard .k { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: #8B87C4; font-weight: 700; margin-top: 4px; }
.hm-table { margin-top: 22px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(180,178,220,.12); background: rgba(13,8,32,.4); }
.hm-table .head, .hm-table .tr { display: grid; grid-template-columns: 60px 1fr 110px 110px 120px; align-items: center; padding: 12px 20px; }
.hm-table .head { font-size: 10.5px; letter-spacing: 2px; text-transform: uppercase; color: #8B87C4; font-weight: 700; border-bottom: 1px solid rgba(180,178,220,.12); }
.hm-table .head span:nth-child(n+3), .hm-table .tr span:nth-child(n+3) { text-align: right; }
.hm-table .tr { font-size: 14px; border-bottom: 1px solid rgba(180,178,220,.06); border-left: 3px solid transparent; }
.hm-table .tr.you { background: rgba(245,184,0,.08); border-left-color: #F5B800; }
.hm-table .tr .rank { font-family: var(--font-d); font-weight: 800; font-size: 16px; color: #B4B2DC; }
.hm-table .tr .rank.medal { color: #F5B800; }
.hm-table .tr .player { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.hm-av { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: #fff; background: linear-gradient(135deg,#3D2B8A,#5B4EAE); flex-shrink: 0; }
.hm-av.you { background: #F5B800; color: #1A0E3D; }
.hm-table .tr .score { font-family: var(--font-d); font-weight: 800; }
.hm-table .tr.you .score { color: #F5B800; }
.hm-youtag { font-size: 10.5px; font-weight: 700; color: #F5B800; background: rgba(245,184,0,.14); padding: 2px 7px; border-radius: 999px; }
.hm-note { display: flex; align-items: center; gap: 8px; margin-top: 16px; font-size: 12.5px; color: #8B87C4; }
.hm-note i { width: 7px; height: 7px; border-radius: 50%; background: #4CAF8A; box-shadow: 0 0 8px #4CAF8A; }
.hm-empty { padding: 30px; text-align: center; color: #8B87C4; font-size: 14px; }

/* ════ NAME PROMPT ════ */
.hm-name { position: absolute; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(8,4,20,.7); backdrop-filter: blur(4px); }
.hm-name.on { display: flex; }
.hm-name .box { width: 360px; max-width: 90vw; text-align: center; border-radius: 22px; padding: 30px; background: linear-gradient(165deg, rgba(45,27,105,.6), rgba(13,8,32,.96)), #0D0820; border: 1px solid rgba(245,184,0,.35); }
.hm-name img { width: 80px; height: 80px; margin: 0 auto 6px; }
.hm-name input { width: 100%; margin: 16px 0; padding: 12px 16px; border-radius: 12px; text-align: center; font-size: 16px; font-family: inherit;
  background: rgba(13,8,32,.8); border: 1.5px solid rgba(180,178,220,.25); color: #fff; }
.hm-name input:focus { outline: none; border-color: rgba(245,184,0,.6); }

/* keyframes */
@keyframes hmTwinkle { 0%,100% { opacity:.25 } 50% { opacity:1 } }
@keyframes hmPulse { 0%,100% { transform:scale(1); opacity:1 } 50% { transform:scale(.8); opacity:.6 } }
@keyframes hmFlicker { 0%,100% { opacity:.75 } 45% { opacity:.35 } 55% { opacity:.95 } }
@keyframes hmBlink { 0%,49% { opacity:1 } 50%,100% { opacity:0 } }
@keyframes hmPop { 0% { transform:scale(.5) } 100% { transform:scale(1) } }
@keyframes hmRise { 0% { transform:translateY(20px) scale(.96) } 100% { transform:none } }
@keyframes hmShake { 0%,100% { transform:translateX(0) } 20% { transform:translateX(-8px) } 40% { transform:translateX(8px) } 60% { transform:translateX(-5px) } 80% { transform:translateX(5px) } }

@media (max-width: 720px) {
  .hm-cat-grid { grid-template-columns: repeat(2, 1fr); }
  .hm-wrap { padding: 24px 18px 50px; }
  .hm-stats { gap: 14px; }
  .hm-table .head, .hm-table .tr { grid-template-columns: 44px 1fr 80px; }
  .hm-table .head span:nth-child(4), .hm-table .head span:nth-child(5),
  .hm-table .tr span:nth-child(4), .hm-table .tr span:nth-child(5) { display: none; }
}

/* Narrow phones: shrink the on-screen keyboard + word slots so a full
   10-key QWERTY row and long words fit without overflowing. */
@media (max-width: 480px) {
  .hm-kb .krow { gap: 4px; }
  .hm-kb.round .hm-key,
  .hm-kb.square .hm-key,
  .hm-kb.mono .hm-key { width: 30px; height: 34px; font-size: 13px; border-radius: 8px; }
  .hm-word { gap: 6px; }
  .hm-app[data-theme="starfall"] .hm-slot { width: 38px; height: 38px; font-size: 19px; }
  .hm-app[data-theme="reboot"] .hm-slot,
  .hm-app[data-theme="decrypt"] .hm-slot { width: 34px; height: 42px; font-size: 18px; }
}
