:root{
  --hmd-navy:#19243a;
  --hmd-purple:#4f329a;
  --hmd-purple-2:#6941c6;
  --hmd-pink:#d94f91;
  --hmd-green:#10b981;
  --hmd-red:#ef4444;
  --hmd-amber:#f59e0b;
  --hmd-border:#e7e3ef;
  --hmd-muted:#747490;
  --hmd-soft:#f7f4fb;
}

.hmd-page{
  min-height:calc(100vh - 180px);
  padding:28px 0 52px;
  background:
    radial-gradient(circle at 9% 7%,rgba(79,50,154,.10),transparent 27%),
    radial-gradient(circle at 91% 14%,rgba(217,79,145,.07),transparent 24%),
    #f9f8fb;
}

.hmd-container{max-width:1180px}

.hmd-top-nav{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}

.hmd-back,.hmd-arcade-tag{
  min-height:38px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 13px;
  border:1px solid var(--hmd-border);
  border-radius:999px;
  background:rgba(255,255,255,.92);
  font-size:11px;
  font-weight:850;
  text-decoration:none;
}
.hmd-back{color:var(--hmd-navy)}
.hmd-back:hover{color:var(--hmd-purple);border-color:rgba(79,50,154,.28)}
.hmd-arcade-tag{color:var(--hmd-purple)}
.hmd-live-dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--hmd-pink);
  box-shadow:0 0 0 4px rgba(217,79,145,.12);
}

.hmd-card{
  position:relative;
  overflow:hidden;
  border:1px solid var(--hmd-border);
  border-radius:28px;
  background:#fff;
  box-shadow:0 22px 65px rgba(25,36,58,.09);
}

.hmd-screen{padding:38px}

.hmd-setup-layout{
  display:grid;
  grid-template-columns:minmax(0,.88fr) minmax(520px,1.12fr);
  gap:46px;
  align-items:center;
}

.hmd-hero{padding:8px}

.hmd-badge{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:7px 12px;
  border:1px solid rgba(79,50,154,.14);
  border-radius:999px;
  background:#f8f5fd;
  color:var(--hmd-purple);
  font-size:10px;
  font-weight:900;
  letter-spacing:.07em;
}
.hmd-badge-dot{
  width:7px;height:7px;border-radius:50%;
  background:var(--hmd-pink);
  box-shadow:0 0 0 4px rgba(217,79,145,.12);
}

.hmd-hero h1{
  margin:18px 0 12px;
  color:var(--hmd-navy);
  font-size:clamp(38px,4.4vw,58px);
  line-height:1.02;
  font-weight:950;
  letter-spacing:-2px;
}
.hmd-hero h1 span{
  background:linear-gradient(95deg,var(--hmd-purple),var(--hmd-pink));
  -webkit-background-clip:text;
  background-clip:text;
  color:transparent;
}

.hmd-lead{
  max-width:500px;
  margin:0;
  color:var(--hmd-muted);
  font-size:15px;
  line-height:1.72;
}

.hmd-benefits{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  margin-top:23px;
}
.hmd-benefits>div{
  min-width:116px;
  display:grid;
  grid-template-columns:31px auto;
  column-gap:9px;
  align-items:center;
  padding:9px 11px;
  border:1px solid var(--hmd-border);
  border-radius:13px;
  background:#fff;
}
.hmd-benefits>div>span{
  grid-row:1/3;
  width:31px;height:31px;
  display:grid;place-items:center;
  border-radius:9px;
  background:#f1edf9;
  color:var(--hmd-purple);
  font-size:11px;
}
.hmd-benefits b{color:var(--hmd-navy);font-size:11px;line-height:1.15}
.hmd-benefits small{color:#9995a5;font-size:9px;line-height:1.15}

.hmd-keyboard-note{
  max-width:390px;
  display:flex;
  align-items:center;
  gap:11px;
  margin-top:16px;
  padding:12px 13px;
  border:1px solid #e7e0f3;
  border-radius:14px;
  background:#fbf9fe;
}
.hmd-note-icon{
  width:38px;height:38px;
  display:grid;place-items:center;
  flex:none;
  border-radius:11px;
  background:#eee8f8;
  color:var(--hmd-purple);
}
.hmd-keyboard-note div{display:flex;flex-direction:column}
.hmd-keyboard-note b{color:var(--hmd-navy);font-size:11px}
.hmd-keyboard-note small{margin-top:2px;color:#8e899b;font-size:9px;line-height:1.45}

.hmd-setup-panel{
  padding:23px;
  border:1px solid var(--hmd-border);
  border-radius:22px;
  background:#fbfafe;
  box-shadow:inset 0 1px 0 #fff,0 10px 30px rgba(25,36,58,.04);
}

.hmd-panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin-bottom:17px;
}
.hmd-panel-head small{
  display:block;
  margin-bottom:2px;
  color:var(--hmd-purple);
  font-size:9px;
  font-weight:900;
  letter-spacing:.09em;
}
.hmd-panel-head h2{
  margin:0;
  color:var(--hmd-navy);
  font-size:21px;
  font-weight:900;
  letter-spacing:-.45px;
}
.hmd-panel-icon{
  width:42px;height:42px;
  display:grid;place-items:center;
  border-radius:13px;
  background:linear-gradient(135deg,var(--hmd-navy),var(--hmd-purple));
  color:#fff;
  box-shadow:0 8px 18px rgba(79,50,154,.18);
}

.hmd-option-section{
  margin-bottom:13px;
  padding:14px;
  border:1px solid var(--hmd-border);
  border-radius:16px;
  background:#fff;
}
.hmd-section-label{
  display:flex;
  align-items:center;
  gap:6px;
  margin-bottom:9px;
  color:#5d5b70;
  font-size:10px;
  font-weight:900;
}

.hmd-mode-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
}

.hmd-choice{
  position:relative;
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:9px 10px;
  border:1px solid var(--hmd-border);
  border-radius:12px;
  background:#fff;
  cursor:pointer;
  transition:.18s ease;
}
.hmd-choice:hover{transform:translateY(-1px);border-color:rgba(79,50,154,.28)}
.hmd-choice.active{
  border-color:var(--hmd-purple);
  background:#f7f4fd;
  box-shadow:0 0 0 2px rgba(79,50,154,.05);
}
.hmd-choice input,.hmd-diff input{position:absolute;opacity:0;pointer-events:none}
.hmd-choice-icon{
  width:31px;height:31px;
  display:grid;place-items:center;
  flex:none;
  border-radius:9px;
  background:#f1edf9;
  color:var(--hmd-purple);
  font-size:11px;
}
.hmd-choice>span:last-child{min-width:0}
.hmd-choice b{display:block;color:var(--hmd-navy);font-size:11px;line-height:1.2}
.hmd-choice small{display:block;margin-top:2px;color:#9692a4;font-size:9px;white-space:nowrap}

.hmd-difficulty-grid{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:8px;
}
.hmd-diff{
  position:relative;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:40px;
  margin:0;
  border:1px solid var(--hmd-border);
  border-radius:11px;
  background:#fff;
  cursor:pointer;
  transition:.18s ease;
}
.hmd-diff:hover{border-color:rgba(79,50,154,.28)}
.hmd-diff.active{border-color:var(--hmd-purple);background:#f7f4fd}
.hmd-diff b{color:var(--hmd-navy);font-size:10px}
.hmd-diff-dot{width:8px;height:8px;border-radius:50%}
.hmd-diff-dot.easy{background:#10b981}
.hmd-diff-dot.medium{background:#f59e0b}
.hmd-diff-dot.hard{background:#ef4444}

.hmd-start-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}

.hmd-btn{
  min-height:48px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:0 22px;
  border:0;
  border-radius:13px;
  background:linear-gradient(135deg,var(--hmd-purple),var(--hmd-purple-2));
  color:#fff!important;
  text-decoration:none!important;
  font-size:13px;
  font-weight:900;
  box-shadow:0 10px 22px rgba(79,50,154,.23);
  cursor:pointer;
  transition:.2s ease;
}
.hmd-start-wrap>.hmd-btn{width:100%}
.hmd-btn:hover{transform:translateY(-1px);box-shadow:0 13px 26px rgba(79,50,154,.29)}
.hmd-upgrade{background:linear-gradient(135deg,#d97706,#f59e0b)}
.hmd-access-note{margin:0;color:#c2414f;font-size:10px;font-weight:800}
.hmd-note{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin:0;
  color:#9995a6;
  font-size:9.5px;
}

/* GAME */
#hmdGame{padding:28px}

.hmd-game-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:18px;
  margin-bottom:16px;
}
.hmd-game-head>div:first-child>span{
  color:var(--hmd-purple);
  font-size:9px;
  font-weight:900;
  letter-spacing:.1em;
}
.hmd-game-head h2{
  margin:2px 0 0;
  color:var(--hmd-navy);
  font-family:'Noto Sans Devanagari',Mangal,sans-serif;
  font-size:22px;
  font-weight:900;
}
.hmd-round-live{
  display:flex;
  align-items:center;
  gap:7px;
  padding:7px 10px;
  border:1px solid #dcefe8;
  border-radius:999px;
  background:#f2fbf7;
  color:#15835f;
  font-size:9px;
  font-weight:900;
}
.hmd-round-live span{
  width:7px;height:7px;border-radius:50%;
  background:#10b981;
  box-shadow:0 0 0 4px rgba(16,185,129,.12);
}

.hmd-hud{
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:8px;
  margin-bottom:13px;
}
.hmd-hud div{
  padding:10px 8px;
  border:1px solid var(--hmd-border);
  border-radius:12px;
  background:#fff;
  text-align:center;
}
.hmd-hud small{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  color:#9692a4;
  font-size:8px;
  font-weight:900;
}
.hmd-hud b{
  display:block;
  margin-top:2px;
  color:var(--hmd-navy);
  font-size:18px;
  font-weight:950;
  font-variant-numeric:tabular-nums;
}
.hmd-hud div:nth-child(1) small i{color:#f59e0b}
.hmd-hud div:nth-child(2) small i,
.hmd-hud div:nth-child(3) small i,
.hmd-hud div:nth-child(4) small i{color:#10b981}
.hmd-hud div:nth-child(5) small i{color:#f97316}
.hmd-hud div:nth-child(6) small i{color:var(--hmd-purple)}

.hmd-stage-wrap{
  padding:9px;
  border:1px solid var(--hmd-border);
  border-radius:20px;
  background:#fbfafe;
}
.hmd-stage-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  padding:0 5px 8px;
  color:#9995a6;
  font-size:9px;
  font-weight:800;
}

.hmd-prompt{
  position:relative;
  min-height:245px;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  margin:0;
  padding:36px 20px;
  overflow:hidden;
  border:1px solid #ddd7ea;
  border-radius:15px;
  background:
    linear-gradient(rgba(79,50,154,.035) 1px,transparent 1px),
    linear-gradient(90deg,rgba(79,50,154,.035) 1px,transparent 1px),
    linear-gradient(180deg,#fdfcff,#f5f1fb);
  background-size:34px 34px,34px 34px,auto;
  text-align:center;
}
.hmd-prompt small{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-bottom:12px;
  padding:5px 9px;
  border:1px solid var(--hmd-border);
  border-radius:999px;
  background:#fff;
  color:var(--hmd-purple);
  font-size:8px;
  font-weight:900;
  letter-spacing:.08em;
}
.hmd-prompt strong{
  display:block;
  color:var(--hmd-navy);
  font:900 clamp(32px,6vw,54px) 'Noto Sans Devanagari',Mangal,sans-serif;
  line-height:1.35;
}

#hmdForm{
  max-width:690px;
  display:flex;
  gap:9px;
  margin:14px auto 0;
}
.hmd-input-wrap{
  position:relative;
  display:flex;
  align-items:center;
  flex:1;
}
.hmd-input-wrap>i{
  position:absolute;
  left:15px;
  z-index:2;
  color:#aaa5b6;
  font-size:12px;
}
#hmdInput{
  width:100%;
  min-width:0;
  height:52px;
  padding:0 14px 0 42px;
  border:1.5px solid #ddd7e8;
  border-radius:13px;
  background:#fff;
  color:var(--hmd-navy);
  font:750 20px 'Noto Sans Devanagari',Mangal,sans-serif;
  text-align:center;
  outline:none;
}
#hmdInput:focus{
  border-color:var(--hmd-purple);
  box-shadow:0 0 0 4px rgba(79,50,154,.08);
}

#hmdFeedback{
  min-height:24px;
  margin:10px 0 0;
  color:#747490;
  font-family:'Noto Sans Devanagari',Mangal,sans-serif;
  font-size:12px;
  font-weight:750;
  text-align:center;
}
#hmdFeedback.bad{color:#dc2626}

.hmd-results{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:10px;
  max-width:620px;
  margin:24px auto;
}
.hmd-results div{
  padding:12px;
  border:1px solid var(--hmd-border);
  border-radius:12px;
  background:#fff;
}
.hmd-results small{display:block;color:#747490;font-size:10px}
.hmd-results b{color:var(--hmd-navy);font-size:20px}

@media(max-width:991.98px){
  .hmd-setup-layout{grid-template-columns:1fr;gap:25px}
  .hmd-hero{text-align:center;padding:0}
  .hmd-lead{margin-left:auto;margin-right:auto}
  .hmd-benefits{justify-content:center}
  .hmd-keyboard-note{margin-left:auto;margin-right:auto;text-align:left}
}

@media(max-width:767.98px){
  .hmd-screen{padding:26px 16px}
  .hmd-hud{grid-template-columns:repeat(3,1fr)}
}

@media(max-width:575.98px){
  .hmd-page{padding:16px 0 38px}
  .hmd-card{border-radius:20px}
  .hmd-hero h1{font-size:37px;letter-spacing:-1.35px}
  .hmd-lead{font-size:13.5px}
  .hmd-benefits>div{flex:1;min-width:0}
  .hmd-setup-panel{padding:15px;border-radius:18px}
  .hmd-mode-grid{grid-template-columns:1fr}
  #hmdGame{padding:18px 12px 24px}
  .hmd-game-head h2{font-size:18px}
  .hmd-round-live{display:none}
  .hmd-stage-top span:last-child{display:none}
  .hmd-prompt{min-height:215px;padding:30px 12px}
  .hmd-prompt strong{font-size:clamp(30px,11vw,44px)}
  #hmdForm{flex-direction:column}
  #hmdForm>.hmd-btn{width:100%}
  .hmd-results{grid-template-columns:repeat(2,1fr)}
}
