/* Large, readable Rock Paper Scissors match interface */
.gesture-art{display:block;width:100%;height:100%;margin:auto;border:0;border-radius:0;background-position:center;background-size:contain;background-repeat:no-repeat;box-shadow:none;filter:drop-shadow(0 13px 13px rgba(8,40,86,.22));transition:transform .2s ease,filter .2s ease}
.gesture-rock{background-image:url('/assets/games/rps/rock.png')}.gesture-paper{background-image:url('/assets/games/rps/paper.png')}.gesture-scissors{background-image:url('/assets/games/rps/scissors.png')}
.match-panel{width:min(940px,calc(100vw - 28px));max-height:95vh;padding:32px 38px 28px;border-top:0;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(242,247,255,.98));overflow:auto}
.match-panel:before{content:"";position:absolute;inset:0 0 auto;height:5px;border-radius:22px 22px 0 0;background:linear-gradient(90deg,#205bd8,#16b6dc,#7257e9)}
#matchBody{max-width:850px;margin:auto}.match-title{font-size:31px}.match-clock{margin:10px 0 4px;font-size:62px}.match-clock.reveal{font-size:38px}
.round-scoreboard{width:min(460px,100%);display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:13px auto 9px}.round-scoreboard .round-side{min-height:44px;display:flex;align-items:center;justify-content:center;gap:13px;padding:8px 13px;border:1px solid #d5e2f1;border-radius:15px;background:rgba(255,255,255,.82);box-shadow:0 8px 20px rgba(38,76,132,.06)}.round-scoreboard .round-side>b{color:#627792;font-size:9px;font-weight:950;letter-spacing:.11em}.round-scoreboard .round-dots{display:flex;gap:8px;margin:0}.round-scoreboard .round-dots span{width:14px;height:14px;border:2px solid #d1dceb;border-radius:50%;background:#e7edf5;box-shadow:inset 0 1px 2px rgba(44,67,97,.12);transition:background .2s ease,border-color .2s ease,transform .2s ease,box-shadow .2s ease}.round-scoreboard .round-dots span.win{border-color:#129c63;background:#20b878;box-shadow:0 0 0 4px rgba(32,184,120,.12),0 4px 10px rgba(20,143,92,.25)}.round-scoreboard .round-dots span.lose{border-color:#ce3449;background:#eb4d61;box-shadow:0 0 0 4px rgba(235,77,97,.12),0 4px 10px rgba(190,43,62,.24)}.round-scoreboard .round-dots span.active{border-color:#1d62cf;background:#2e7cf0;box-shadow:0 0 0 4px rgba(46,124,240,.12),0 4px 12px rgba(30,93,191,.28);animation:round-active-pulse 1.1s ease-in-out infinite}@keyframes round-active-pulse{0%,100%{transform:scale(.92);box-shadow:0 0 0 3px rgba(46,124,240,.12)}50%{transform:scale(1.08);box-shadow:0 0 0 6px rgba(46,124,240,.08)}}
.versus{grid-template-columns:minmax(0,1fr) 54px minmax(0,1fr);gap:18px;margin:20px 0}.fighter{position:relative;min-height:205px;display:grid;grid-template-rows:auto 1fr;align-items:center;padding:18px 22px;overflow:hidden;border:1px solid #cfdef0;border-radius:23px;background:radial-gradient(circle at 50% 92%,rgba(49,129,245,.14),transparent 48%),linear-gradient(145deg,#fbfdff,#eaf3ff);box-shadow:inset 0 1px 0 #fff,0 12px 27px rgba(38,76,132,.08)}
.fighter:after{content:"";position:absolute;right:-45px;bottom:-65px;width:150px;height:150px;border:1px solid rgba(61,126,230,.13);border-radius:50%}.fighter small{position:relative;z-index:2;color:#5b7190;font-size:10px;font-weight:950;letter-spacing:.09em}.fighter .choice{position:relative;z-index:2;min-height:155px;height:155px;display:grid;place-items:center}.fighter .choice .gesture-art{width:155px;height:155px}.fighter.revealed{border-color:#6fa2ee;box-shadow:0 0 0 4px rgba(52,118,225,.08),0 16px 34px rgba(34,86,167,.13)}
.vs{width:52px;height:52px;display:grid;place-items:center;border:1px solid #d2e0f1;border-radius:50%;background:#fff;color:#2469dd;font-size:13px;box-shadow:0 10px 24px rgba(32,73,137,.12)}
.gesture-hidden{position:relative;width:104px;height:104px;display:grid;grid-template-columns:repeat(3,10px);align-items:center;justify-content:center;gap:8px;border:1px solid #c9d9ed;border-radius:32px;background:linear-gradient(145deg,#fff,#e7f0fb);box-shadow:inset 0 0 0 7px rgba(255,255,255,.55),0 13px 30px rgba(38,75,129,.11)}.gesture-hidden:before,.gesture-hidden:after{content:"";position:absolute;border:1px solid rgba(64,124,219,.16);border-radius:50%}.gesture-hidden:before{inset:14px}.gesture-hidden:after{inset:27px}.gesture-hidden i{position:relative;z-index:2;width:9px;height:9px;border-radius:50%;background:#79a5e8;animation:hidden-pulse 1.15s ease-in-out infinite}.gesture-hidden i:nth-child(2){animation-delay:.13s}.gesture-hidden i:nth-child(3){animation-delay:.26s}@keyframes hidden-pulse{0%,100%{opacity:.35;transform:translateY(0)}50%{opacity:1;transform:translateY(-5px)}}
.pick-grid{gap:14px}.pick{position:relative;min-height:155px;display:grid;grid-template-rows:118px auto;align-items:center;padding:10px 12px 12px;overflow:hidden;border:1px solid #cfdded;border-radius:22px;background:radial-gradient(circle at 50% 115%,rgba(55,131,239,.13),transparent 50%),linear-gradient(145deg,#fff,#f3f7fd);box-shadow:0 12px 27px rgba(36,68,114,.09)}.pick:before{content:"";position:absolute;inset:0;opacity:0;background:linear-gradient(135deg,rgba(39,111,230,.08),rgba(22,190,211,.08));transition:.2s}.pick .gesture-art{position:relative;z-index:1;width:118px;height:118px}.pick>b{position:relative;z-index:1;color:#315073;font-size:10px;letter-spacing:.14em}.pick:hover:not(:disabled){transform:translateY(-4px);border-color:#6f9fe9;box-shadow:0 18px 34px rgba(37,89,169,.16)}.pick:hover:not(:disabled):before{opacity:1}.pick:hover:not(:disabled) .gesture-art{transform:scale(1.07)}.pick.selected{border-color:#2673ed;background:linear-gradient(145deg,#edf5ff,#e5f5ff);box-shadow:0 0 0 4px rgba(38,115,237,.11),0 16px 35px rgba(31,92,185,.14)}.pick.selected>b{color:#1761ce}.pick:disabled:not(.selected){opacity:.58}.match-attempt{margin:14px 0 0}
@media(prefers-reduced-motion:reduce){.gesture-hidden i,.round-scoreboard .round-dots span.active{animation:none}.gesture-art{transition:none}}
@media(max-width:700px){.match-panel{padding:26px 16px 22px}.versus{grid-template-columns:minmax(0,1fr) 38px minmax(0,1fr);gap:7px}.vs{width:38px;height:38px;font-size:10px}.fighter{min-height:166px;padding:13px 7px}.fighter .choice{min-height:125px;height:125px}.fighter .choice .gesture-art{width:125px;height:125px}.gesture-hidden{width:84px;height:84px;border-radius:25px}.pick-grid{gap:7px}.pick{min-height:128px;grid-template-rows:96px auto;padding:7px 5px 9px}.pick .gesture-art{width:96px;height:96px}.match-clock{font-size:52px}}
@media(max-width:430px){.match-panel{width:calc(100vw - 12px);padding-inline:10px}.fighter{min-height:145px}.fighter .choice{min-height:108px;height:108px}.fighter .choice .gesture-art{width:108px;height:108px}.pick{min-height:112px;grid-template-rows:82px auto}.pick .gesture-art{width:82px;height:82px}.pick>b{font-size:8px}.gesture-hidden{width:72px;height:72px}}


/* v92: cân giữa khung RPS trên điện thoại, không để modal rộng hơn viewport */
#matchModal{box-sizing:border-box;place-items:center;overflow:hidden}
#matchModal .match-panel{box-sizing:border-box;margin-left:auto;margin-right:auto;max-width:calc(100vw - 24px)}
#matchBody{box-sizing:border-box;width:100%;max-width:100%;overflow-x:hidden}
#matchBody .versus,#matchBody .pick-grid,#matchBody .round-scoreboard,#matchBody .score-strip{box-sizing:border-box}
.fighter small{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:700px){
  html,body{overflow-x:hidden}
  #matchModal.modal{padding:10px!important;align-items:center!important;justify-items:center!important;place-items:center!important}
  #matchModal .match-panel{width:calc(100vw - 20px)!important;max-width:calc(100vw - 20px)!important;max-height:calc(100dvh - 20px);padding:22px 14px 20px!important;border-radius:24px;margin:0 auto!important;left:auto!important;right:auto!important;transform:none!important}
  #matchBody{margin:0 auto!important;text-align:center!important}
  #matchBody>.eyebrow{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .round-scoreboard{width:100%!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:12px auto 8px}
  .round-scoreboard .round-side{min-width:0;padding:8px 7px;gap:7px}
  .round-scoreboard .round-side>b{font-size:8px;white-space:nowrap}
  .round-scoreboard .round-dots{gap:6px}
  .round-scoreboard .round-dots span{width:12px;height:12px}
  .score-strip{display:flex;justify-content:center;gap:8px;flex-wrap:nowrap;width:100%}
  .score-strip span{min-width:0;white-space:nowrap;padding:7px 10px}
  .versus{width:100%;grid-template-columns:minmax(0,1fr) 34px minmax(0,1fr)!important;gap:6px!important;margin:18px auto 16px!important;align-items:center}
  .fighter{box-sizing:border-box;min-width:0;min-height:148px;padding:11px 6px!important;border-radius:20px}
  .fighter .choice{min-height:110px;height:110px}
  .fighter .choice .gesture-art{width:110px;height:110px}
  .gesture-hidden{width:76px;height:76px;border-radius:25px}
  .vs{width:34px;height:34px;font-size:9px}
  .pick-grid{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px!important;margin:0 auto}
  .pick{box-sizing:border-box;min-width:0;min-height:116px;grid-template-rows:84px auto;padding:8px 5px 9px}
  .pick .gesture-art{width:84px;height:84px}
  .pick>b{font-size:8px;letter-spacing:.12em}
  .match-clock{font-size:50px;margin:8px 0 2px}
  .match-attempt{margin-bottom:0}
}
@media(max-width:390px){
  #matchModal.modal{padding:8px!important}
  #matchModal .match-panel{width:calc(100vw - 16px)!important;max-width:calc(100vw - 16px)!important;padding:20px 11px 18px!important}
  .round-scoreboard .round-side{padding:7px 5px;gap:5px}
  .round-scoreboard .round-dots span{width:11px;height:11px}
  .fighter{min-height:138px;padding:10px 5px!important}
  .fighter .choice{min-height:100px;height:100px}
  .fighter .choice .gesture-art{width:100px;height:100px}
  .gesture-hidden{width:70px;height:70px}
  .pick{min-height:108px;grid-template-rows:78px auto;padding:7px 4px 8px}
  .pick .gesture-art{width:78px;height:78px}
}
