/* UbayBian Neural Grid v2.2 · Match Math Reactor arena proportions */

/* Same desktop arena footprint as Math Reactor */
.neural-shell{
  width:min(1040px,95vw);
  height:min(660px,88vh);
  min-height:0;
  max-height:90vh;
  overflow:hidden;
  border-radius:34px;
}
.neural-top{padding:24px 28px 8px;}
.neural-stage{height:calc(100% - 88px);padding:4px 36px 22px;overflow:hidden;}
.neural-view{height:100%;min-height:0;}

/* Ready aligns visually with Math Reactor */
.neural-ready{max-width:700px;padding:10px 28px 4px;justify-content:center;}
.neural-ready .neural-orb{width:84px;height:84px;margin-bottom:10px;border-radius:27px;font-size:37px;}
.neural-ready h3{font-size:clamp(38px,3.8vw,48px);}
.neural-ready-copy{margin:11px auto 16px;font-size:16px;line-height:1.45;}
.neural-chips{margin-bottom:16px;gap:8px;}
.neural-xp-card{margin-bottom:17px;padding:12px 16px;}
.neural-main-btn{min-width:220px;padding:14px 24px;font-size:16px;}
.neural-note{margin-top:9px;}

/* Gameplay: everything must fit in the same 660px arena */
.neural-play{max-width:720px;justify-content:flex-start;padding-top:0;overflow:visible;}
.neural-hud{
  width:min(440px,100%);
  grid-template-columns:102px 146px 102px;
  gap:12px;
  margin:0 auto 6px;
}
.neural-stat{height:68px;padding:8px 12px;border-radius:18px;}
.neural-stat-label{margin-bottom:1px;font-size:9px;}
.neural-stat-value{font-size:27px;}
.neural-round{min-width:146px;padding:9px 14px;font-size:12px;}
.neural-phase{min-height:17px;margin:0 0 5px;font-size:11px;line-height:1.1;}

/* Main fix: board is intentionally smaller than v2.1 */
.neural-board{
  width:min(290px,48vh);
  padding:9px;
  gap:9px;
  margin:0 auto 7px;
  border-radius:23px;
}
.neural-cell{
  border-radius:17px;
  font-size:38px;
}
.neural-cell.is-hidden:after{font-size:36px;}
.neural-countdown{width:62px;height:62px;font-size:28px;}

.neural-prompt{
  margin:0 auto 6px;
  font-size:20px;
  line-height:1.15;
}
.neural-options{
  width:min(560px,100%);
  gap:8px;
}
.neural-option{
  min-height:43px;
  padding:8px 9px;
  border-radius:14px;
  font-size:16px;
}
.neural-feedback{
  min-height:17px;
  margin-top:5px;
  font-size:12px;
  line-height:1.2;
}
.neural-next{
  margin-top:5px;
  padding:10px 18px;
  border-radius:14px;
  font-size:13px;
}

/* Results use the same compact rhythm as Math Reactor */
.neural-result{max-width:650px;justify-content:center;}
.neural-complete{margin-bottom:7px;padding:7px 12px;font-size:11px;}
.neural-result h3{font-size:clamp(31px,3.4vw,40px);}
.neural-score-ring{width:124px;height:124px;margin:10px auto 5px;}
.neural-score-ring strong{font-size:53px;}
.neural-score-ring span{font-size:11px;}
.neural-result-grid{max-width:500px;margin:14px auto 14px;gap:9px;}
.neural-result-card{padding:13px 10px;border-radius:17px;}
.neural-result-card strong{font-size:24px;}
.neural-result-actions .neural-main-btn{min-width:220px;}
.neural-note{font-size:12px;}

/* Short laptop screens: shrink only the game content, not the whole modal */
@media (max-height:720px) and (min-width:721px){
  .neural-shell{height:calc(100vh - 18px);max-height:none;}
  .neural-top{padding:12px 24px 3px;}
  .neural-icon{width:46px;height:46px;border-radius:15px;font-size:23px;}
  .neural-title{font-size:30px;}.neural-subtitle{margin-top:2px;font-size:12px;}
  .neural-close{width:40px;height:40px;font-size:22px;}
  .neural-stage{height:calc(100% - 60px);padding:0 24px 10px;}
  .neural-hud{grid-template-columns:92px 132px 92px;gap:9px;margin-bottom:4px;}
  .neural-stat{height:60px;padding:7px 10px}.neural-stat-value{font-size:24px;}
  .neural-round{min-width:132px;padding:8px 11px;}
  .neural-phase{margin-bottom:3px;font-size:10px;min-height:15px;}
  .neural-board{width:min(250px,43vh);padding:8px;gap:8px;margin-bottom:5px;}
  .neural-cell{border-radius:15px;font-size:34px;}.neural-cell.is-hidden:after{font-size:32px;}
  .neural-prompt{font-size:18px;margin-bottom:5px;}
  .neural-option{min-height:38px;padding:7px;font-size:15px;}
  .neural-feedback{margin-top:3px;min-height:15px;font-size:11px;}
  .neural-next{margin-top:3px;padding:8px 15px;}
  .neural-ready .neural-orb{width:68px;height:68px;font-size:30px;margin-bottom:7px;}
  .neural-ready h3{font-size:36px}.neural-ready-copy{margin:7px auto 10px;font-size:14px;}
  .neural-chips{margin-bottom:10px}.neural-xp-card{margin-bottom:11px;padding:9px 14px;}
  .neural-score-ring{width:108px;height:108px;margin:7px auto 3px}.neural-score-ring strong{font-size:46px;}
  .neural-result-grid{margin:10px auto 10px}.neural-result-card{padding:10px 8px;}
}

@media (max-width:720px){
  .neural-shell{width:100vw;height:100dvh;max-height:none;border-radius:0;}
  .neural-stage{height:calc(100% - 70px);padding:0 14px 12px;overflow:auto;}
  .neural-board{width:min(300px,78vw);}
  .neural-options{grid-template-columns:repeat(2,1fr);max-width:330px;}
}
