/* Game-specific styles (extends styles.css) */

.game-page{ position: relative; z-index: 1; padding-bottom: 80px; }

.game-hero{ padding: 44px 0 18px 0; }
.game-hero h1{
  margin: 14px 0 10px 0;
  font-family: var(--serif);
  font-size: clamp(38px, 4vw, 60px);
  line-height: 1.02;
}
.game-wrap{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 14px;
  align-items:start;
  padding: 18px 0 0 0;
}

.board-shell{
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.board-top{
  display:flex;
  justify-content: space-between;
  gap: 12px;
  align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.14);
}
.board-title{ font-weight: 900; }
.board-legend{ display:flex; gap: 10px; flex-wrap: wrap; align-items:center; }
.legend-item{ font-size: 12px; color: rgba(255,255,255,.72); display:flex; gap:6px; align-items:center; }
.legend-dot{
  width: 10px; height: 10px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.25);
}
.legend-dot.p1{ background: rgba(56,245,197,.85); }
.legend-dot.p2{ background: rgba(255,98,214,.80); }
.legend-badge{
  width: 18px; height: 18px; border-radius: 6px;
  display:grid; place-items:center;
  border: 1px solid rgba(255,255,255,.20);
}
.legend-badge.up{ background: rgba(56,245,197,.12); }
.legend-badge.down{ background: rgba(255,98,214,.12); }

.board{
  display:grid;
  grid-template-columns: repeat(10, minmax(0,1fr));
  background: rgba(0,0,0,.18);
}
.cell{
  position: relative;
  min-height: 60px;
  padding: 8px;
  border-right: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cell:nth-child(10n){ border-right:none; }

.num{
  font-size: 12px;
  font-weight: 900;
  color: rgba(255,255,255,.78);
  display:flex;
  align-items:center;
  justify-content: space-between;
}
.jump{
  font-size: 12px;
  font-weight: 900;
  opacity: .9;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
}
.jump.up{ background: rgba(56,245,197,.10); }
.jump.down{ background: rgba(255,98,214,.10); }

.tokens{
  position:absolute;
  left: 8px; right: 8px; bottom: 8px;
  display:flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items:center;
}
.token{
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.25);
  box-shadow: 0 10px 26px rgba(0,0,0,.25);
}
.token.p1{ background: rgba(56,245,197,.95); }
.token.p2{ background: rgba(255,98,214,.92); }

.panel{ display:grid; gap: 12px; }
.panel-card{
  border-radius: var(--radius2);
  background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.04));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow);
  padding: 16px;
}
.panel-head{
  display:flex; justify-content: space-between; align-items:center; gap: 10px;
}
.panel-title{ font-weight: 900; }
.turn-pill{
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.dice-row{
  display:grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  margin-top: 14px;
  align-items:center;
}
.die{
  width: 86px; height: 66px;
  border-radius: 18px;
  display:grid; place-items:center;
  font-size: 28px;
  font-weight: 900;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
}
.pos-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.pos{
  display:flex; align-items:center; justify-content: space-between;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  font-weight: 900;
}
.pos .label{ color: rgba(255,255,255,.70); font-weight: 800; }

.log{
  margin-top: 12px;
  height: 190px;
  overflow:auto;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.10);
  font-size: 12px;
  color: rgba(255,255,255,.78);
  line-height: 1.45;
}
.log .line{ margin-bottom: 8px; }
.panel-actions{ display:flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Modal */
.modal{
  border: none;
  padding: 0;
  border-radius: 22px;
  max-width: min(720px, calc(100% - 24px));
  background: rgba(10, 14, 28, .92);
  color: var(--text);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
}
.modal::backdrop{
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(6px);
}
.modal-inner{
  padding: 18px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 22px;
}
.modal-actions{ display:flex; justify-content:flex-end; gap: 10px; padding: 0; margin-top: 14px; }
.modal-inner h2{ margin: 0 0 10px 0; font-family: var(--serif); }

/* Question UI */
.q-meta{ display:flex; justify-content: space-between; gap: 10px; align-items:center; }
.q-tag{
  font-size: 12px;
  font-weight: 900;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(56,245,197,.12);
  border: 1px solid rgba(56,245,197,.24);
}
.q-progress{ font-size: 12px; color: rgba(255,255,255,.70); }
.q-choices{ display:grid; gap: 10px; margin-top: 12px; }
.choice{
  width: 100%;
  text-align:left;
  padding: 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: rgba(255,255,255,.90);
  font-weight: 800;
  cursor:pointer;
}
.choice:hover{ filter: brightness(1.07); transform: translateY(-1px); }
.choice.correct{ border-color: rgba(56,245,197,.40); background: rgba(56,245,197,.10); }
.choice.wrong{ border-color: rgba(255,98,214,.40); background: rgba(255,98,214,.10); }

.q-footer{ margin-top: 12px; }
.q-explain{
  min-height: 20px;
  font-size: 13px;
  color: rgba(255,255,255,.80);
  line-height: 1.55;
}

/* Responsive */
@media (max-width: 1020px){
  .game-wrap{ grid-template-columns: 1fr; }
  .cell{ min-height: 54px; }
}


/* Overlay for true chutes & ladders graphics */
.board-shell{ position: relative; }
.board-stage{ position: relative; }
.board-overlay{ position:absolute; inset:0; width:100%; height:100%; pointer-events:none; z-index: 0; }
.board{ position: relative; z-index: 1; }
.ladder-line{ stroke: rgba(56,245,197,.9); stroke-width: 4; stroke-linecap: round; }
.ladder-rung{ stroke: rgba(56,245,197,.75); stroke-width: 3; stroke-linecap: round; }
.chute-path{ stroke: rgba(255,98,214,.85); stroke-width: 6; stroke-linecap: round; fill: none; }
.chute-rail{ stroke: rgba(255,98,214,.55); stroke-width: 2.5; stroke-linecap: round; fill: none; }
