/* Đua khủng long: giao diện bổ sung cho ChiaNè / Trò chơi nhóm (game.css). */
.dr-narrow { max-width: 460px; margin-left: auto; margin-right: auto; }
.dr-code-in { text-align: center; font-size: 2rem; font-weight: 800; letter-spacing: .5em; padding-left: calc(.5em + 14px); text-transform: uppercase; }
.dr-code-tag { display: inline-block; padding: 0 .5em; border-radius: 10px; background: var(--teal-soft); color: var(--teal-deep); letter-spacing: .25em; font-weight: 800; }
.dr-label { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dr-wait { margin: 8px 0; color: var(--ink-2); }
.dr-room .card { margin-bottom: 14px; }
.dr-msg { text-align: center; }
.dr-bigcode { font-size: clamp(2.4rem, 12vw, 3.6rem); font-weight: 800; letter-spacing: .3em; padding-left: .3em; color: var(--teal-deep); line-height: 1.15; }
.dr-guest-code { text-align: center; }
.dr-invite-grid { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: center; }
@media (max-width: 520px) { .dr-invite-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; } }
.dr-invite-info { min-width: 0; width: 100%; }
.dr-link { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.dr-link input { flex: 1; min-width: 0; padding: 9px 12px; border: 1.5px solid var(--line-strong); border-radius: var(--r-sm); background: #fff; font: inherit; font-size: .9rem; }
.dr-qr { width: 200px; height: 200px; line-height: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.dr-qr svg { width: 100%; height: 100%; display: block; }
.dr-count { font-weight: 600; color: var(--ink-3); font-size: .9em; }
.dr-plist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.dr-prow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.dr-prow.is-off { opacity: .6; }
.dr-av { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; font-weight: 800; }
.dr-pname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dr-pname small { color: var(--ink-3); font-weight: 500; }
.dr-badge { padding: 2px 8px; border-radius: 99px; background: var(--khaki-soft); color: var(--ink-2); font-size: .72rem; font-weight: 700; }
.dr-badge.is-off { background: var(--mahogany-soft); color: var(--mahogany); }
.dr-x { flex: none; min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--line-strong); border-radius: 99px; background: transparent; font: inherit; font-weight: 700; color: var(--mahogany); cursor: pointer; }
.dr-x:hover, .dr-x.is-arm { background: var(--mahogany); color: #fff; border-color: var(--mahogany); }
.dr-lobby-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.dr-lobby-actions .btn-primary { margin-left: auto; min-width: 190px; }
.dr-lock-ico { font-size: 1.2rem; margin-right: 4px; }
#drLock.is-locked { border-color: var(--mahogany); background: var(--mahogany-soft); color: var(--mahogany); }
.dr-msgs { margin: 12px 0; max-height: 220px; min-height: 80px; overflow-y: auto; display: grid; gap: 6px; align-content: start; }
.dr-audio { position: absolute; width: 0; height: 0; overflow: hidden; }

.dr-home { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 420px) { .dr-home { grid-template-columns: 1fr; } }


.dr-modal { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(20, 16, 14, .55); }
.dr-modal[hidden] { display: none; }
.dr-modal-box { width: 100%; max-width: 440px; max-height: 92vh; overflow: auto; padding: 22px; border-radius: var(--r-lg); background: var(--paper); box-shadow: var(--shadow-lift); }
.dr-modal-box h2 { margin: 0 0 6px; }
.dr-home { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 420px) { .dr-home { grid-template-columns: 1fr; } }
.dr-hint { margin: 0 0 14px; color: var(--ink-2); font-size: .9rem; }
.dr-modal-sub { margin: 0 0 14px; color: var(--ink-2); }

/* ---- Màn đua ---- */
.dr-game { max-width: 760px; margin: 0 auto; padding-bottom: 36px; }
.dr-hbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 10px; font-weight: 700; }
.dr-who { color: var(--ink-2); font-size: .9rem; }
.dr-alone { margin: 6px 0 10px; padding: 10px 14px; border-radius: 12px; background: #fff4c7; border: 1px solid #e6c84a; text-align: center; font-weight: 700; }
.dr-alone[hidden], .dr-countdown[hidden], .dr-over[hidden], .dr-endactions[hidden] { display: none; }
.dr-stage { position: relative; border-radius: 6px; overflow: hidden; background: #f7f7f7; line-height: 0; touch-action: none; user-select: none; -webkit-user-select: none; }
.dr-stage canvas { display: block; width: 100%; height: auto; aspect-ratio: 600 / 150; image-rendering: pixelated; image-rendering: crisp-edges; touch-action: none; -webkit-tap-highlight-color: transparent; }
.dr-countdown { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 4.2rem; font-weight: 800; line-height: 1; color: #535353; background: rgba(247, 247, 247, .55); }
.dr-over { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; margin-top: 12px; padding: 14px; text-align: center; line-height: 1.3; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); box-shadow: var(--shadow); }
.dr-over-ico { font-size: 2.6rem; line-height: 1.1; }
.dr-over-t { margin: 0; font-size: 1.1rem; }
.dr-over-s { margin: 2px 0 0; color: var(--ink-2); font-weight: 600; }
.dr-btn { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; padding: 0; border: 3px solid rgba(0,0,0,.35); border-radius: 50%; background: var(--b, #e0457b); color: #fff; cursor: pointer; box-shadow: 0 5px 0 var(--bd, #a52a58), inset 0 3px 0 rgba(255,255,255,.3); touch-action: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.dr-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--bd, #a52a58), inset 0 3px 0 rgba(255,255,255,.3); }
.dr-keys { margin: 10px 0 0; color: var(--ink-3); font-size: .82rem; text-align: center; }
@media (hover: none) { .dr-keys { display: none; } }
.dr-rank { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.dr-rk { display: flex; align-items: center; gap: 6px; min-width: 0; padding: 4px 8px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font-size: .82rem; transition: opacity .3s, filter .3s; }
.dr-rk.is-me { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal-soft); }
.dr-rk.is-dead { opacity: .35; filter: grayscale(1); }
.dr-rk-i { flex: none; width: 18px; height: 18px; border-radius: 50%; background: var(--khaki-soft); text-align: center; font-size: .68rem; font-weight: 800; line-height: 18px; }
.dr-rk-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.dr-rk-n small { color: var(--ink-3); font-weight: 500; }
.dr-rk-s { font-size: .78rem; font-variant-numeric: tabular-nums; font-weight: 800; font-family: "Courier New", monospace; letter-spacing: .08em; }
@media (max-height: 520px) and (orientation: landscape) {
  .dr-game { width: min(98vw, calc(4 * (100vh - 150px) + 190px)); max-width: none; position: relative; left: 50%; transform: translateX(-50%); padding-bottom: 12px; }
  .dr-btn { width: 56px; height: 56px; }
  .dr-keys { display: none; }
  .dr-hbar, .dr-solo-score, .dr-top2 { margin: 2px 0 6px; }
  .dr-gb { margin-bottom: 10px; gap: 10px; padding: 10px 12px 12px; box-shadow: 0 5px 0 #4a4f5c, inset 0 4px 0 rgba(255,255,255,.55); }
  .dr-gb-screen { padding: 10px; }
}
/* ---- Trang chủ: Trở về -> tiêu đề -> Chơi riêng -> (tách đôi) Tạo phòng / Vào phòng ---- */
.dr-vlink { width: 5px; height: 28px; border-radius: 3px; background: #e8962a; }
.dr-vlink + a.mp-solo { margin-top: 0; }
.dr-vlink.is-pink { background: #f0558c; }
.mp-links.dr-after-solo .t { stroke: #f0558c; }
a.mp-card.mp-solo { flex-direction: row; gap: 10px; width: 156px; height: 116px; min-height: 0; padding: 0 12px; border-radius: 26px; }
a.mp-card.mp-solo .mp-ico { flex: none; width: 52px; height: 52px; font-size: 1.6rem; border-width: 3px; }
a.mp-card.mp-solo h2 { margin: 0; font-size: 1.15rem; }
@media (max-width: 480px) {
  a.mp-card.mp-solo { width: 140px; height: 96px; padding: 0 8px; }
  a.mp-card.mp-solo .mp-ico { width: 40px; height: 40px; font-size: 1.2rem; }
  a.mp-card.mp-solo h2 { font-size: 1rem; }
}
/* ---- Chơi riêng ---- */
.dr-solo-score { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 6px 0 10px; font-weight: 700; }
.dr-start { position: absolute; inset: 0; z-index: 4; display: flex; align-items: center; justify-content: center; border: 0; width: 100%; background: rgba(247, 247, 247, .6); color: #535353; font: inherit; font-size: clamp(.75rem, 3.2vw, 1.05rem); font-weight: 800; cursor: pointer; line-height: 1.3; padding: 8px; }
.dr-start[hidden] { display: none; }
.dr-top2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }

/* ---- Máy chơi game: màn hình ở giữa, nút Lên / Xuống hai bên ---- */
.dr-gb { margin-bottom: 20px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "screen screen screen" "up . down"; align-items: center; gap: 14px 10px; padding: 16px 16px 18px; border: 4px solid #4a4f5c; border-radius: 26px 26px 52px 26px; background: #d9dde3; box-shadow: 0 8px 0 #4a4f5c, inset 0 4px 0 rgba(255,255,255,.55); }
.dr-gb-screen { grid-area: screen; position: relative; padding: 12px; border-radius: 12px 12px 40px 12px; background: #3b3f4a; box-shadow: inset 0 3px 0 rgba(0,0,0,.3); }
.dr-gb-screen::before { content: ""; position: absolute; left: 14px; top: 3px; width: 6px; height: 6px; border-radius: 50%; background: #ff5a5a; box-shadow: 0 0 6px #ff5a5a; }
.dr-gb .dr-jump { grid-area: up; --b: #e0457b; --bd: #a52a58; }
.dr-gb .dr-duck { grid-area: down; --b: #3a6fd8; --bd: #264b9a; }
.dr-gb.is-locked .dr-btn { opacity: .4; pointer-events: none; }
@media (min-width: 700px), (orientation: landscape) {
  .dr-gb { grid-template-areas: "up screen down"; gap: 18px; padding: 20px 22px; }
  .dr-gb-screen { padding: 14px; }
}
.dr-tip { margin: 0 0 10px; color: var(--ink-2); font-size: .85rem; }
.dr-pop { position: fixed; left: 50%; bottom: 22px; z-index: 95; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 999px; background: rgba(40, 44, 54, .92); color: #fff; font-size: .85rem; font-weight: 600; text-align: center; box-shadow: 0 6px 20px rgba(0,0,0,.25); animation: drPop .3s ease-out; transition: opacity .6s; pointer-events: none; }
.dr-pop.is-out { opacity: 0; }
@keyframes drPop { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }
