.mc-layout { display: grid; grid-template-columns: 320px 1fr; gap: 18px; padding: 18px; max-width: 1500px; margin: 0 auto; align-items: start; }
.mc-side { display: flex; flex-direction: column; gap: 16px; }
.mc-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

/* Thanh tiêu đề */
.mc-top {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px max(18px, calc((100vw - 1500px) / 2 + 18px));
  background: rgba(6, 13, 36, .85); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(80, 120, 200, .3);
}
.mc-top h1 { font-size: 1.3em; color: var(--gold); margin: 0; letter-spacing: .02em; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-ic {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4em;
  background: linear-gradient(160deg, #ffcf5a, #e07d00); box-shadow: 0 4px 14px rgba(246, 163, 27, .35);
}
.brand-sub { font-size: .8em; color: var(--muted); }
.voice-card summary { cursor: pointer; list-style: none; }
.voice-card summary::-webkit-details-marker { display: none; }
.voice-card summary::before { content: '▸ '; color: var(--muted); }
.voice-card[open] summary::before { content: '▾ '; }
.voice-card input[type="range"] { padding: 0; min-height: 0; accent-color: var(--orange); }
.who-chip { padding: 5px 12px; border-radius: 999px; background: rgba(19, 39, 87, .8); border: 1px solid var(--line); font-size: .85em; font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }

/* Thẻ phòng */
.room-card { text-align: center; }
.mode-chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: rgba(255, 215, 106, .12); border: 1px solid rgba(255, 215, 106, .4); color: var(--gold); font-weight: 700; font-size: .85em; }
.pin-label { margin-top: 12px; font-size: .75em; text-transform: uppercase; letter-spacing: .15em; color: var(--muted); }
.pin-side { font-size: 1.9em; font-weight: 900; letter-spacing: .12em; text-align: center; color: #fff; text-shadow: 0 0 14px rgba(120, 181, 255, .4); line-height: 1.15; }
.qr-side { background: #fff; border-radius: 12px; padding: 10px; width: 100%; max-width: 320px; margin: 10px auto 0; cursor: zoom-in; box-shadow: 0 4px 18px rgba(0, 0, 0, .4); }
.qr-side img { width: 100%; display: block; }
.toggles { display: flex; flex-direction: column; gap: 8px; text-align: left; padding: 10px 12px; border-radius: 10px; background: rgba(7, 18, 48, .6); border: 1px solid rgba(80, 120, 200, .25); }

/* Danh sách người */
.plist { display: flex; flex-direction: column; gap: 6px; max-height: 340px; overflow: auto; }
.prow { display: flex; align-items: center; gap: 10px; padding: 6px 8px 6px 12px; border-radius: 10px; background: rgba(20, 40, 90, .45); border: 1px solid transparent; transition: border-color .15s; }
.prow:hover { border-color: rgba(120, 160, 230, .35); }
.prow .dot { width: 9px; height: 9px; border-radius: 50%; background: #556; flex: none; }
.prow .dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.prow .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prow button.sm { min-height: 28px; padding: 2px 8px; }

.ctrl-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.status-chip { display: inline-block; padding: 5px 14px; border-radius: 999px; background: #23407f; font-weight: 700; font-size: .9em; }
.status-chip.st-C_OPEN { background: #1f7a2a; }
.status-chip.st-C_CLOSED { background: #7a5410; }
.status-chip.st-C_FINISHED { background: #5b2f8f; }
.auto-chip { background: #1f7a2a; }
.mc-answer { font-size: 1.1em; font-weight: 800; color: #b7f59a; }
.secret { display: inline-flex; align-items: center; gap: 8px; }
.secret .masked { color: var(--muted); letter-spacing: .1em; }
.eye-btn { min-height: 30px; padding: 2px 10px; font-size: 1.1em; background: #0b1a3f; border-color: var(--line); }
.timer-chip { font-weight: 800; color: var(--orange); }
.timer-chip:empty { display: none; }

/* Đấu trường 100 */
.progress { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.progress-bar { flex: 1; height: 8px; border-radius: 999px; background: rgba(7, 18, 48, .8); overflow: hidden; border: 1px solid rgba(80, 120, 200, .25); }
.progress-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); transition: width .4s; }
.auto-box { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: rgba(7, 18, 48, .5); border: 1px dashed rgba(80, 120, 200, .4); }
.auto-box button { flex: none; }
.no-players { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--orange); background: rgba(122, 84, 16, .3); }
.no-players .np-ic { font-size: 1.5em; flex: none; }

.q-panel { margin-top: 16px; padding: 16px; border-radius: 12px; background: rgba(5, 12, 34, .55); border: 1px solid rgba(80, 120, 200, .35); }
.q-panel.cancelled { opacity: .6; }
.q-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.q-no { font-size: .8em; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-2); }
.q-text { font-weight: 700; font-size: 1.25em; line-height: 1.4; margin: 4px 0 14px; }
.q-answer { display: flex; align-items: center; gap: 10px; margin-top: 12px; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 4px; }
.opt { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; background: linear-gradient(180deg, #13295c, #0c1b42); border: 1px solid #2f58a8; min-height: 48px; transition: background .2s, border-color .2s; }
.opt-l { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--orange-2); background: rgba(246, 163, 27, .12); border: 1px solid rgba(246, 163, 27, .5); }
.opt-t { flex: 1; }
.opt-ord { flex: none; font-weight: 800; color: #b7f59a; }
.opt.ok { background: linear-gradient(180deg, #2b8f22, #1b5f15); border-color: #84e874; }
.opt.ok .opt-l { color: #fff; background: rgba(255, 255, 255, .15); border-color: #d9ffd2; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat { padding: 12px 14px; border-radius: 12px; background: rgba(7, 18, 48, .6); border: 1px solid rgba(80, 120, 200, .3); }
.stat-v { font-size: 1.6em; font-weight: 900; color: #fff; line-height: 1.1; }
.stat-l { font-size: .85em; color: var(--muted); margin-top: 2px; }
.stat-s { font-size: .75em; color: var(--accent-2); }

table.rank td, table.rank th { padding: 10px 14px; vertical-align: middle; }
table.rank .num { text-align: right; }
table.rank .score { font-weight: 800; color: var(--gold); }
table.rank .nm { font-weight: 600; }
table.rank tbody tr:hover td { background: rgba(60, 140, 255, .08); }
table.rank tr.top1 td { background: rgba(255, 215, 106, .12); }
table.rank tr.top2 td { background: rgba(200, 215, 240, .07); }
table.rank tr.top3 td { background: rgba(214, 140, 80, .08); }
.medal { font-size: 1.35em; }
.rk { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(80, 120, 200, .25); font-weight: 700; font-size: .9em; }

/* Các phần khác */
.preview { font-size: 18px; padding: 10px 0 0; overflow: hidden; }
.preview .hex { --tip: 20px; }

.ll-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ll-card { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: rgba(10, 25, 60, .6); display: flex; flex-direction: column; gap: 8px; }
.ll-card.used { opacity: .65; }
.ll-card.active { border-color: var(--orange); box-shadow: 0 0 10px rgba(246,163,27,.4); opacity: 1; }
.ll-card h4 { margin: 0; font-size: .95em; }

.pick-letters { display: flex; gap: 6px; }
.pick-letters button { width: 46px; }
.pick-letters button.on { background: linear-gradient(180deg, #ffd27a, #f6a31b); color: #120a00; }

.ans-table td, .ans-table th { padding: 5px 8px; }
.ok-text { color: #8ae46d; font-weight: 700; }
.bad-text { color: #ff8c86; font-weight: 700; }

.topic-list { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 160px; overflow: auto; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: rgba(7, 18, 48, .4); }
.mini-ladder-mc { font-size: 13px; }
.mini-ladder-mc .ladder { max-width: 380px; }

@media (max-width: 980px) {
  .mc-layout { grid-template-columns: 1fr; padding: 16px; }
}
@media (max-width: 640px) {
  .opt-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .auto-box { flex-direction: column; align-items: stretch; }
  .mc-top { padding: 10px 16px; }
}
