1020 lines
35 KiB
HTML
1020 lines
35 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="th">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||
<meta http-equiv="Cache-Control" content="no-store, max-age=0">
|
||
<title>เล่น — Game</title>
|
||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||
<link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@500;700;800&family=Share+Tech+Mono&display=swap" rel="stylesheet">
|
||
<link rel="stylesheet" href="css/style.css">
|
||
<style>
|
||
html, body { height: 100%; margin: 0; }
|
||
body { min-height: 100dvh; }
|
||
.play-canvas-stack {
|
||
position: relative;
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
min-width: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
}
|
||
.play-canvas-stack #game-canvas {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
width: 100%;
|
||
display: block;
|
||
touch-action: none;
|
||
}
|
||
/* Quiz carry — ปุ่ม GRAB มุมขวาล่าง (เทียบ F) · mockup ≈ 10–12% ความสูงจอ */
|
||
#quiz-carry-grab-btn {
|
||
position: absolute;
|
||
right: max(10px, env(safe-area-inset-right, 0px));
|
||
bottom: max(10px, env(safe-area-inset-bottom, 0px));
|
||
z-index: 60;
|
||
width: min(12vh, 13vw, 168px);
|
||
height: min(12vh, 13vw, 168px);
|
||
padding: 0;
|
||
margin: 0;
|
||
border: none;
|
||
border-radius: 50%;
|
||
background: transparent;
|
||
cursor: default;
|
||
opacity: 0.38;
|
||
transition: opacity 0.2s ease, transform 0.15s ease;
|
||
touch-action: manipulation;
|
||
-webkit-tap-highlight-color: transparent;
|
||
box-shadow: none;
|
||
}
|
||
#quiz-carry-grab-btn.is-hidden {
|
||
display: none !important;
|
||
}
|
||
#quiz-carry-grab-btn.quiz-carry-grab-btn--active {
|
||
opacity: 1;
|
||
cursor: pointer;
|
||
}
|
||
#quiz-carry-grab-btn.quiz-carry-grab-btn--active:active {
|
||
transform: scale(0.96);
|
||
}
|
||
#quiz-carry-grab-btn.quiz-carry-grab-btn--place.quiz-carry-grab-btn--active {
|
||
filter: drop-shadow(0 0 10px rgba(94, 234, 255, 0.45));
|
||
}
|
||
#quiz-carry-grab-btn img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: contain;
|
||
display: block;
|
||
pointer-events: none;
|
||
user-select: none;
|
||
}
|
||
#quiz-game-overlay {
|
||
position: fixed;
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
bottom: max(12px, env(safe-area-inset-bottom));
|
||
z-index: 650;
|
||
max-width: min(96vw, 520px);
|
||
width: 100%;
|
||
pointer-events: none;
|
||
}
|
||
#quiz-game-overlay.is-hidden { display: none !important; }
|
||
.quiz-game-inner {
|
||
background: rgba(12, 14, 28, 0.92);
|
||
border: 1px solid rgba(122, 162, 247, 0.45);
|
||
border-radius: 14px;
|
||
padding: 0.65rem 1rem 0.75rem;
|
||
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
|
||
backdrop-filter: blur(10px);
|
||
}
|
||
.quiz-game-phase {
|
||
font-size: 0.72rem;
|
||
font-weight: 700;
|
||
letter-spacing: 0.06em;
|
||
text-transform: uppercase;
|
||
color: #7aa2f7;
|
||
margin-bottom: 0.35rem;
|
||
}
|
||
.quiz-game-q {
|
||
margin: 0 0 0.45rem;
|
||
font-size: clamp(0.95rem, 3vw, 1.1rem);
|
||
line-height: 1.45;
|
||
color: #e2e8f0;
|
||
font-weight: 600;
|
||
white-space: pre-line;
|
||
}
|
||
.quiz-game-timer {
|
||
font-variant-numeric: tabular-nums;
|
||
font-size: 1.35rem;
|
||
font-weight: 800;
|
||
color: #9ece6a;
|
||
text-shadow: 0 0 12px rgba(158, 206, 106, 0.35);
|
||
}
|
||
.quiz-play-legend {
|
||
margin: 0;
|
||
font-size: 0.72rem;
|
||
line-height: 1.4;
|
||
color: #a9b1d6;
|
||
}
|
||
#quiz-map-question-panel {
|
||
position: absolute;
|
||
z-index: 2;
|
||
pointer-events: none;
|
||
box-sizing: border-box;
|
||
padding: clamp(6px, 1.5vw, 14px);
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
justify-content: flex-start;
|
||
text-align: center;
|
||
overflow: hidden;
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
--qmap-bg: rgba(12, 14, 28, 0.88);
|
||
--qmap-border: rgba(255, 214, 102, 0.7);
|
||
--qmap-border-w: 2px;
|
||
--qmap-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);
|
||
background: var(--qmap-bg);
|
||
border: var(--qmap-border-w) solid var(--qmap-border);
|
||
border-radius: 12px;
|
||
box-shadow: var(--qmap-shadow);
|
||
}
|
||
#quiz-map-question-panel.is-hidden { display: none !important; }
|
||
#quiz-map-question-panel::-webkit-scrollbar {
|
||
display: none;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
/* ขนาดตั้งต้น — โหมด quiz_carry ถูกทับด้วย play.js ตามสัดส่วนกล่อง + ธีม */
|
||
#quiz-map-question-text {
|
||
margin: 0;
|
||
font-size: 22px;
|
||
font-weight: 600;
|
||
line-height: 1.45;
|
||
--qmap-text: #f1f5f9;
|
||
--qmap-text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
|
||
color: var(--qmap-text);
|
||
text-shadow: var(--qmap-text-shadow);
|
||
width: 100%;
|
||
box-sizing: border-box;
|
||
flex: 0 1 auto;
|
||
min-height: 0;
|
||
max-height: 100%;
|
||
overflow: hidden;
|
||
overflow-wrap: anywhere;
|
||
word-break: break-word;
|
||
white-space: pre-line;
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
}
|
||
#quiz-map-question-text::-webkit-scrollbar {
|
||
display: none;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
#quiz-carry-embed-countdown {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 10080;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
pointer-events: none;
|
||
background: var(--carry-ecd-overlay, rgba(8, 10, 20, 0.42));
|
||
}
|
||
#quiz-carry-embed-countdown.quiz-carry-embed-countdown--map-anchor {
|
||
align-items: flex-start;
|
||
justify-content: flex-start;
|
||
background: var(--carry-ecd-overlay, rgba(8, 10, 20, 0.32));
|
||
}
|
||
#quiz-carry-embed-countdown.is-hidden { display: none !important; }
|
||
#quiz-carry-embed-countdown-inner {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 0.5rem;
|
||
max-width: min(94vw, 760px);
|
||
padding: 0 14px;
|
||
text-align: center;
|
||
}
|
||
#quiz-carry-embed-countdown-inner.quiz-carry-embed-countdown-inner--map-rect {
|
||
max-width: none;
|
||
padding: clamp(6px, 1.2vmin, 12px);
|
||
box-sizing: border-box;
|
||
border-radius: var(--carry-ecd-inner-radius, 12px);
|
||
background: var(--carry-ecd-inner-bg, rgba(12, 14, 28, 0.82));
|
||
border: var(--carry-ecd-inner-border-w, 1px) solid var(--carry-ecd-inner-border, rgba(122, 162, 247, 0.45));
|
||
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
|
||
}
|
||
#quiz-carry-embed-countdown-kicker {
|
||
display: none;
|
||
margin: 0;
|
||
font: 800 0.68rem / 1.2 system-ui, "Kanit", sans-serif;
|
||
letter-spacing: 0.12em;
|
||
text-transform: uppercase;
|
||
color: #7aa2f7;
|
||
text-shadow: 0 1px 12px rgba(0, 0, 0, 0.55);
|
||
}
|
||
#quiz-carry-embed-countdown-q {
|
||
display: none;
|
||
margin: 0;
|
||
font: 600 clamp(14px, 3.2vmin, 20px) / 1.45 system-ui, "Kanit", sans-serif;
|
||
color: #f8fafc;
|
||
text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75);
|
||
max-height: min(32vh, 220px);
|
||
overflow: hidden;
|
||
overflow-wrap: anywhere;
|
||
word-break: break-word;
|
||
white-space: pre-line;
|
||
scrollbar-width: none;
|
||
-ms-overflow-style: none;
|
||
}
|
||
#quiz-carry-embed-countdown-q::-webkit-scrollbar {
|
||
display: none;
|
||
width: 0;
|
||
height: 0;
|
||
}
|
||
#quiz-carry-embed-countdown-num {
|
||
font: 800 min(var(--carry-ecd-screen-vw, 28vw), var(--carry-ecd-screen-max, 132px)) / 1.05 system-ui, "Kanit", sans-serif;
|
||
color: var(--carry-ecd-digit-color, #ffe066);
|
||
text-shadow: 0 0 48px rgba(255, 224, 102, 0.55), 0 4px 24px rgba(0, 0, 0, 0.65);
|
||
letter-spacing: -0.04em;
|
||
}
|
||
/* ยึดกล่องบนแมป (ทอง / กลาง / กริด 321): ตัวเลขตามขนาดกล่องช่อง — ไม่ใช้ vw เต็มจอ */
|
||
#quiz-carry-embed-countdown.quiz-carry-embed-countdown--map-anchor #quiz-carry-embed-countdown-inner.quiz-carry-embed-countdown-inner--map-rect {
|
||
container-type: size;
|
||
}
|
||
#quiz-carry-embed-countdown.quiz-carry-embed-countdown--map-anchor #quiz-carry-embed-countdown-inner.quiz-carry-embed-countdown-inner--map-rect #quiz-carry-embed-countdown-num {
|
||
font-weight: 800;
|
||
font-size: var(--carry-ecd-map-digit-fs, clamp(14px, min(78cqmin, 82cqh), 200px));
|
||
line-height: 1;
|
||
font-family: system-ui, "Kanit", sans-serif;
|
||
color: var(--carry-ecd-digit-color, #ffe066);
|
||
letter-spacing: -0.02em;
|
||
text-shadow: 0 0 clamp(6px, 3cqmin, 18px) rgba(255, 224, 102, 0.5), 0 2px clamp(4px, 1.5cqh, 12px) rgba(0, 0, 0, 0.6);
|
||
}
|
||
/* ด้านบน: ไม่ชน HUD ล่างบนแคนวาส + เห็นชัดกว่าแถบล่าง */
|
||
#quiz-carry-embed-q-strip {
|
||
position: fixed;
|
||
left: 50%;
|
||
top: max(52px, calc(env(safe-area-inset-top) + 46px));
|
||
bottom: auto;
|
||
transform: translateX(-50%);
|
||
z-index: 10100;
|
||
max-width: min(92vw, min(640px, calc(100vw - 200px)));
|
||
padding: 0.4rem 0.75rem 0.48rem;
|
||
border-radius: 12px;
|
||
background: rgba(12, 14, 28, 0.96);
|
||
border: 1px solid rgba(122, 162, 247, 0.55);
|
||
box-shadow: 0 10px 32px rgba(0, 0, 0, 0.55);
|
||
pointer-events: none;
|
||
}
|
||
#quiz-carry-embed-q-strip.is-hidden { display: none !important; }
|
||
.quiz-carry-embed-q-strip-kicker {
|
||
display: block;
|
||
font: 800 0.58rem / 1.2 system-ui, "Kanit", sans-serif;
|
||
letter-spacing: 0.12em;
|
||
text-transform: uppercase;
|
||
color: #7aa2f7;
|
||
margin: 0 0 0.2rem;
|
||
text-align: center;
|
||
}
|
||
#quiz-carry-embed-q-strip-text {
|
||
margin: 0;
|
||
font: 600 clamp(0.82rem, 2.4vmin, 1.12rem) / 1.45 system-ui, "Kanit", sans-serif;
|
||
color: #f8fafc;
|
||
text-align: center;
|
||
text-shadow: 0 1px 10px rgba(0, 0, 0, 0.65);
|
||
max-height: min(28vh, 200px);
|
||
overflow: auto;
|
||
}
|
||
/* ระหว่าง 3–2–1 อยู่เหนือ overlay นับถอยหลัง (10080) */
|
||
#quiz-carry-embed-q-strip.quiz-carry-embed-q-strip--countdown {
|
||
z-index: 10120;
|
||
top: max(52px, calc(env(safe-area-inset-top) + 46px));
|
||
}
|
||
/* พรีวิว embed quiz_carry: How to play + Ready / START ก่อน 3–2–1 */
|
||
#quiz-carry-pregame-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 10078;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left));
|
||
box-sizing: border-box;
|
||
}
|
||
#quiz-carry-pregame-overlay.is-hidden { display: none !important; }
|
||
.quiz-carry-pregame-backdrop {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: rgba(4, 6, 14, 0.78);
|
||
backdrop-filter: blur(10px);
|
||
}
|
||
.quiz-carry-pregame-sr-only {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
padding: 0;
|
||
margin: -1px;
|
||
overflow: hidden;
|
||
clip: rect(0, 0, 0, 0);
|
||
white-space: nowrap;
|
||
border: 0;
|
||
}
|
||
.quiz-carry-pregame-card {
|
||
position: relative;
|
||
z-index: 1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: stretch;
|
||
max-width: min(94vw, 900px);
|
||
width: 100%;
|
||
max-height: min(94vh, 900px);
|
||
overflow: hidden;
|
||
background: rgba(10, 12, 26, 0.55);
|
||
border: none;
|
||
border-radius: 4px;
|
||
box-shadow: none;
|
||
pointer-events: auto;
|
||
}
|
||
.quiz-carry-pregame-art {
|
||
flex: 1 1 auto;
|
||
min-height: 0;
|
||
margin: 0;
|
||
padding: 0;
|
||
overflow: auto;
|
||
background: transparent;
|
||
display: flex;
|
||
align-items: flex-start;
|
||
justify-content: center;
|
||
}
|
||
.quiz-carry-pregame-howto-img {
|
||
display: block;
|
||
width: 100%;
|
||
height: auto;
|
||
max-height: min(62vh, 560px);
|
||
object-fit: contain;
|
||
object-position: top center;
|
||
border: none;
|
||
outline: none;
|
||
box-shadow: none;
|
||
}
|
||
.quiz-carry-pregame-footer {
|
||
flex: 0 0 auto;
|
||
padding: 0.85rem 1rem 1rem;
|
||
background: linear-gradient(180deg, rgba(8, 10, 22, 0.2), rgba(8, 10, 22, 0.96));
|
||
border-top: none;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 0.65rem;
|
||
}
|
||
.quiz-carry-pregame-status {
|
||
margin: 0;
|
||
text-align: center;
|
||
font: 700 clamp(0.8rem, 2.4vw, 0.95rem) / 1.35 system-ui, "Kanit", sans-serif;
|
||
color: #fbcfe8;
|
||
text-shadow: 0 0 16px rgba(244, 114, 182, 0.5);
|
||
letter-spacing: 0.02em;
|
||
}
|
||
.quiz-carry-pregame-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 0.85rem 1.25rem;
|
||
justify-content: center;
|
||
align-items: center;
|
||
}
|
||
.quiz-carry-pregame-primary-btn {
|
||
background: transparent;
|
||
border: none;
|
||
padding: 0;
|
||
cursor: pointer;
|
||
line-height: 0;
|
||
border-radius: 6px;
|
||
transition: transform 0.12s ease, filter 0.12s ease, opacity 0.15s ease;
|
||
}
|
||
.quiz-carry-pregame-primary-btn:hover:not(:disabled):not(.is-read-only) {
|
||
transform: scale(1.03);
|
||
filter: brightness(1.08);
|
||
}
|
||
.quiz-carry-pregame-primary-btn.is-pressed:not(.is-start-phase) {
|
||
filter: brightness(1.12) drop-shadow(0 0 12px rgba(94, 234, 212, 0.55));
|
||
}
|
||
.quiz-carry-pregame-primary-btn.is-read-only,
|
||
.quiz-carry-pregame-primary-btn:disabled {
|
||
opacity: 0.38;
|
||
pointer-events: none;
|
||
cursor: default;
|
||
filter: grayscale(0.2);
|
||
}
|
||
.quiz-carry-pregame-primary-btn img {
|
||
display: block;
|
||
width: min(220px, 42vw);
|
||
height: auto;
|
||
}
|
||
#play-quiz-scoreboard {
|
||
position: fixed;
|
||
top: max(56px, env(safe-area-inset-top));
|
||
right: max(10px, env(safe-area-inset-right));
|
||
z-index: 10070;
|
||
min-width: 150px;
|
||
max-width: min(42vw, 220px);
|
||
background: rgba(12, 14, 28, 0.92);
|
||
border: 1px solid rgba(122, 162, 247, 0.4);
|
||
border-radius: 12px;
|
||
padding: 0.45rem 0.55rem 0.55rem;
|
||
box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
|
||
pointer-events: none;
|
||
}
|
||
#play-quiz-scoreboard.is-hidden { display: none !important; }
|
||
.play-quiz-scoreboard-title {
|
||
font-size: 0.65rem;
|
||
font-weight: 800;
|
||
letter-spacing: 0.08em;
|
||
text-transform: uppercase;
|
||
color: #7aa2f7;
|
||
margin-bottom: 0.3rem;
|
||
border-bottom: 1px solid rgba(122, 162, 247, 0.25);
|
||
padding-bottom: 0.2rem;
|
||
}
|
||
.play-quiz-scoreboard-list {
|
||
list-style: none;
|
||
margin: 0;
|
||
padding: 0;
|
||
max-height: 38vh;
|
||
overflow: auto;
|
||
}
|
||
.play-quiz-scoreboard-list li {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
gap: 0.4rem;
|
||
font-size: 0.74rem;
|
||
color: #c0caf5;
|
||
padding: 0.15rem 0;
|
||
}
|
||
.play-quiz-scoreboard-me { color: #9ece6a !important; font-weight: 700; }
|
||
.play-quiz-scoreboard-val { font-variant-numeric: tabular-nums; font-weight: 800; }
|
||
.play-quiz-scoreboard-me .play-quiz-scoreboard-val { color: #9ece6a; }
|
||
#play-quiz-feedback {
|
||
position: fixed;
|
||
top: max(10px, env(safe-area-inset-top));
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
z-index: 10072;
|
||
max-width: min(92vw, 440px);
|
||
padding: 0.55rem 1rem;
|
||
border-radius: 12px;
|
||
font-size: clamp(0.88rem, 3vw, 1.05rem);
|
||
font-weight: 800;
|
||
text-align: center;
|
||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
|
||
pointer-events: none;
|
||
line-height: 1.35;
|
||
}
|
||
#play-quiz-feedback.is-hidden { display: none !important; }
|
||
.play-quiz-feedback-ok {
|
||
background: rgba(22, 40, 28, 0.95);
|
||
border: 2px solid rgba(158, 206, 106, 0.85);
|
||
color: #c3e6a8;
|
||
}
|
||
.play-quiz-feedback-bad {
|
||
background: rgba(40, 22, 30, 0.95);
|
||
border: 2px solid rgba(247, 118, 140, 0.85);
|
||
color: #fecdd3;
|
||
}
|
||
#gauntlet-ended-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 10080;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
|
||
box-sizing: border-box;
|
||
}
|
||
#gauntlet-ended-overlay.is-hidden { display: none !important; }
|
||
.gauntlet-ended-backdrop {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: rgba(8, 10, 18, 0.82);
|
||
backdrop-filter: blur(6px);
|
||
}
|
||
.gauntlet-ended-card {
|
||
position: relative;
|
||
max-width: min(92vw, 400px);
|
||
width: 100%;
|
||
background: rgba(18, 20, 32, 0.96);
|
||
border: 1px solid rgba(247, 118, 140, 0.45);
|
||
border-radius: 16px;
|
||
padding: 1.25rem 1.35rem 1.1rem;
|
||
box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
|
||
}
|
||
.gauntlet-ended-card h2 {
|
||
margin: 0 0 0.5rem;
|
||
font-size: 1.15rem;
|
||
color: #f7768e;
|
||
font-weight: 800;
|
||
}
|
||
#gauntlet-ended-message {
|
||
margin: 0 0 0.75rem;
|
||
font-size: 0.95rem;
|
||
color: #c0caf5;
|
||
line-height: 1.45;
|
||
}
|
||
#gauntlet-ended-rankings {
|
||
margin: 0 0 1rem;
|
||
padding-left: 1.2rem;
|
||
color: #a9b1d6;
|
||
font-size: 0.88rem;
|
||
line-height: 1.5;
|
||
}
|
||
#gauntlet-ended-rankings .gauntlet-ended-me {
|
||
color: #9ece6a;
|
||
font-weight: 700;
|
||
}
|
||
#btn-gauntlet-ended-lobby {
|
||
width: 100%;
|
||
padding: 0.55rem 1rem;
|
||
border-radius: 10px;
|
||
border: none;
|
||
font-weight: 700;
|
||
cursor: pointer;
|
||
background: linear-gradient(180deg, #7aa2f7, #5a7fd4);
|
||
color: #1a1b26;
|
||
}
|
||
|
||
/* —— Cyber / server-room play HUD (Jump survive · Gauntlet) —— */
|
||
.play-cyber-hud {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 55;
|
||
pointer-events: none;
|
||
font-family: 'Share Tech Mono', ui-monospace, monospace;
|
||
}
|
||
.play-cyber-hud.is-hidden { display: none !important; }
|
||
.game-wrap.play-cyber-active .game-header {
|
||
background: linear-gradient(180deg, rgba(6, 10, 22, 0.94), rgba(12, 18, 36, 0.88));
|
||
border-bottom: 1px solid rgba(0, 255, 240, 0.22);
|
||
box-shadow: 0 0 24px rgba(0, 240, 255, 0.08);
|
||
}
|
||
.game-wrap.play-cyber-active .game-header span {
|
||
color: #7af8ff;
|
||
text-shadow: 0 0 12px rgba(0, 255, 240, 0.35);
|
||
font-family: 'Orbitron', sans-serif;
|
||
font-weight: 600;
|
||
font-size: 0.82rem;
|
||
letter-spacing: 0.04em;
|
||
}
|
||
.game-wrap.play-cyber-active #btn-leave {
|
||
background: rgba(0, 40, 48, 0.85);
|
||
color: #7af8ff;
|
||
border: 1px solid rgba(0, 255, 240, 0.35);
|
||
font-family: 'Share Tech Mono', monospace;
|
||
font-size: 0.72rem;
|
||
letter-spacing: 0.06em;
|
||
}
|
||
.play-cyber-scoreboard {
|
||
position: absolute;
|
||
top: max(52px, calc(env(safe-area-inset-top) + 42px));
|
||
left: max(10px, env(safe-area-inset-left));
|
||
width: min(240px, 42vw);
|
||
padding: 0.5rem 0.55rem 0.6rem;
|
||
background: rgba(4, 8, 18, 0.82);
|
||
border: 1px solid rgba(0, 255, 240, 0.28);
|
||
border-radius: 4px;
|
||
box-shadow:
|
||
0 0 0 1px rgba(0, 0, 0, 0.5),
|
||
0 0 28px rgba(0, 200, 255, 0.12),
|
||
inset 0 1px 0 rgba(255, 255, 255, 0.06);
|
||
}
|
||
.play-cyber-panel-title {
|
||
font-family: 'Orbitron', sans-serif;
|
||
font-weight: 800;
|
||
font-size: 0.72rem;
|
||
letter-spacing: 0.2em;
|
||
color: #5cf0ff;
|
||
text-shadow: 0 0 14px rgba(92, 240, 255, 0.45);
|
||
margin-bottom: 0.35rem;
|
||
padding-bottom: 0.25rem;
|
||
border-bottom: 1px solid rgba(0, 255, 240, 0.2);
|
||
}
|
||
.play-cyber-score-list {
|
||
list-style: none;
|
||
margin: 0;
|
||
padding: 0;
|
||
max-height: 42vh;
|
||
overflow: auto;
|
||
}
|
||
.play-cyber-score-row {
|
||
display: grid;
|
||
grid-template-columns: 36px 1fr auto;
|
||
align-items: center;
|
||
gap: 0.35rem;
|
||
padding: 0.28rem 0;
|
||
border-bottom: 1px solid rgba(0, 255, 240, 0.08);
|
||
}
|
||
.play-cyber-score-row:last-child { border-bottom: none; }
|
||
.play-cyber-score-row.is-me .play-cyber-score-name { color: #9efcff; }
|
||
.play-cyber-score-row.is-out { opacity: 0.45; }
|
||
.play-cyber-score-av {
|
||
width: 34px;
|
||
height: 34px;
|
||
object-fit: contain;
|
||
image-rendering: pixelated;
|
||
border: 1px solid rgba(0, 255, 240, 0.35);
|
||
border-radius: 2px;
|
||
background: rgba(0, 20, 30, 0.9);
|
||
}
|
||
.play-cyber-score-mid {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.1rem;
|
||
min-width: 0;
|
||
}
|
||
.play-cyber-score-name {
|
||
font-size: 0.68rem;
|
||
font-weight: 700;
|
||
color: #c8f4ff;
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
}
|
||
.play-cyber-score-state {
|
||
font-size: 0.58rem;
|
||
letter-spacing: 0.08em;
|
||
color: rgba(0, 255, 200, 0.55);
|
||
}
|
||
.play-cyber-score-row.is-out .play-cyber-score-state { color: #f7768e; }
|
||
.play-cyber-score-val {
|
||
font-family: 'Orbitron', sans-serif;
|
||
font-weight: 800;
|
||
font-size: 0.78rem;
|
||
color: #7af8ff;
|
||
text-shadow: 0 0 10px rgba(0, 255, 240, 0.35);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
.play-cyber-lead-crown {
|
||
display: inline-block;
|
||
margin-right: 0.15rem;
|
||
filter: drop-shadow(0 0 6px rgba(255, 220, 120, 0.7));
|
||
}
|
||
.play-cyber-time-block {
|
||
position: absolute;
|
||
top: max(52px, calc(env(safe-area-inset-top) + 38px));
|
||
left: 50%;
|
||
transform: translateX(-50%);
|
||
text-align: center;
|
||
min-width: 120px;
|
||
}
|
||
.play-cyber-time-label {
|
||
font-family: 'Orbitron', sans-serif;
|
||
font-size: 0.62rem;
|
||
font-weight: 700;
|
||
letter-spacing: 0.28em;
|
||
color: rgba(0, 255, 200, 0.55);
|
||
margin-bottom: 0.15rem;
|
||
}
|
||
.play-cyber-time-val {
|
||
font-family: 'Orbitron', sans-serif;
|
||
font-weight: 800;
|
||
font-size: clamp(1.5rem, 4.5vw, 2rem);
|
||
line-height: 1;
|
||
color: #7fffab;
|
||
text-shadow:
|
||
0 0 20px rgba(100, 255, 180, 0.55),
|
||
0 0 40px rgba(0, 255, 140, 0.25);
|
||
}
|
||
.play-cyber-time-sub {
|
||
margin-top: 0.25rem;
|
||
font-size: 0.58rem;
|
||
letter-spacing: 0.12em;
|
||
color: rgba(122, 248, 255, 0.5);
|
||
max-width: 70vw;
|
||
}
|
||
.play-cyber-self {
|
||
position: absolute;
|
||
top: max(52px, calc(env(safe-area-inset-top) + 38px));
|
||
right: max(10px, env(safe-area-inset-right));
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
gap: 0.35rem;
|
||
}
|
||
.play-cyber-self-frame {
|
||
padding: 4px;
|
||
background: linear-gradient(145deg, rgba(0, 60, 70, 0.9), rgba(0, 20, 35, 0.95));
|
||
border: 1px solid rgba(0, 255, 240, 0.45);
|
||
border-radius: 6px;
|
||
box-shadow:
|
||
0 0 24px rgba(0, 200, 255, 0.2),
|
||
inset 0 0 20px rgba(0, 255, 240, 0.06);
|
||
}
|
||
.play-cyber-self-frame img {
|
||
display: block;
|
||
width: 72px;
|
||
height: 72px;
|
||
object-fit: contain;
|
||
image-rendering: pixelated;
|
||
background: rgba(0, 8, 16, 0.9);
|
||
}
|
||
.play-cyber-self-status {
|
||
font-size: 0.58rem;
|
||
letter-spacing: 0.14em;
|
||
color: #5cf0ff;
|
||
text-shadow: 0 0 8px rgba(92, 240, 255, 0.4);
|
||
max-width: 100px;
|
||
text-align: center;
|
||
line-height: 1.3;
|
||
}
|
||
.play-cyber-hint {
|
||
position: absolute;
|
||
top: max(200px, calc(env(safe-area-inset-top) + 168px));
|
||
left: max(10px, env(safe-area-inset-left));
|
||
width: min(280px, 48vw);
|
||
font-size: 0.62rem;
|
||
line-height: 1.45;
|
||
color: rgba(180, 230, 255, 0.72);
|
||
text-shadow: 0 1px 8px rgba(0, 0, 0, 0.8);
|
||
}
|
||
.play-cyber-preview-line {
|
||
position: absolute;
|
||
bottom: max(88px, calc(env(safe-area-inset-bottom) + 72px));
|
||
left: max(10px, env(safe-area-inset-left));
|
||
right: max(56px, env(safe-area-inset-right));
|
||
font-size: 0.6rem;
|
||
letter-spacing: 0.06em;
|
||
color: rgba(255, 200, 120, 0.85);
|
||
text-shadow: 0 0 10px rgba(255, 180, 80, 0.35);
|
||
}
|
||
.play-cyber-preview-line.is-hidden { display: none !important; }
|
||
.play-cyber-mic {
|
||
position: absolute;
|
||
bottom: max(96px, calc(env(safe-area-inset-bottom) + 80px));
|
||
right: max(12px, env(safe-area-inset-right));
|
||
width: 44px;
|
||
height: 44px;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
background: rgba(0, 30, 40, 0.88);
|
||
border: 1px solid rgba(0, 255, 240, 0.4);
|
||
border-radius: 8px;
|
||
box-shadow: 0 0 20px rgba(0, 200, 255, 0.18);
|
||
}
|
||
.play-cyber-mic-icon {
|
||
font-size: 1.1rem;
|
||
color: #7af8ff;
|
||
text-shadow: 0 0 12px rgba(0, 255, 240, 0.5);
|
||
}
|
||
.play-cyber-corruption {
|
||
position: absolute;
|
||
bottom: 0;
|
||
left: 0;
|
||
right: 0;
|
||
height: clamp(56px, 14vh, 100px);
|
||
background: linear-gradient(0deg, rgba(120, 0, 20, 0.55), rgba(180, 20, 40, 0.22) 40%, transparent);
|
||
overflow: hidden;
|
||
pointer-events: none;
|
||
}
|
||
.play-cyber-corruption-scanlines {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: repeating-linear-gradient(
|
||
0deg,
|
||
transparent,
|
||
transparent 2px,
|
||
rgba(0, 0, 0, 0.12) 2px,
|
||
rgba(0, 0, 0, 0.12) 3px
|
||
);
|
||
opacity: 0.85;
|
||
animation: play-cyber-scan 6s linear infinite;
|
||
}
|
||
@keyframes play-cyber-scan {
|
||
from { transform: translateY(0); }
|
||
to { transform: translateY(6px); }
|
||
}
|
||
.play-cyber-corruption-text {
|
||
position: absolute;
|
||
bottom: 0.45rem;
|
||
left: 0.75rem;
|
||
right: 0.75rem;
|
||
font-size: 0.58rem;
|
||
letter-spacing: 0.1em;
|
||
color: rgba(255, 160, 170, 0.9);
|
||
text-shadow: 0 0 12px rgba(255, 80, 100, 0.5);
|
||
white-space: nowrap;
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
animation: play-cyber-glitch 4.5s steps(2) infinite;
|
||
}
|
||
@keyframes play-cyber-glitch {
|
||
0%, 100% { opacity: 1; }
|
||
50% { opacity: 0.82; }
|
||
}
|
||
.play-canvas-stack.play-cyber-vignette::after {
|
||
content: '';
|
||
position: absolute;
|
||
inset: 0;
|
||
pointer-events: none;
|
||
box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
|
||
border-radius: inherit;
|
||
}
|
||
|
||
/* Quiz Battle — MCQ โดม (กด E) */
|
||
#quiz-battle-mcq-overlay {
|
||
position: fixed;
|
||
inset: 0;
|
||
z-index: 10076;
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
|
||
box-sizing: border-box;
|
||
}
|
||
#quiz-battle-mcq-overlay.is-hidden { display: none !important; }
|
||
.quiz-battle-mcq-backdrop {
|
||
position: absolute;
|
||
inset: 0;
|
||
background: rgba(6, 8, 20, 0.82);
|
||
backdrop-filter: blur(8px);
|
||
}
|
||
.quiz-battle-mcq-card {
|
||
position: relative;
|
||
max-width: min(92vw, 440px);
|
||
width: 100%;
|
||
background: linear-gradient(165deg, rgba(14, 18, 36, 0.97), rgba(8, 12, 28, 0.98));
|
||
border: 1px solid rgba(0, 255, 240, 0.28);
|
||
border-radius: 14px;
|
||
padding: 1.1rem 1.15rem 1rem;
|
||
box-shadow:
|
||
0 0 0 1px rgba(0, 0, 0, 0.5),
|
||
0 0 40px rgba(0, 200, 255, 0.12);
|
||
font-family: 'Share Tech Mono', ui-monospace, monospace;
|
||
}
|
||
.quiz-battle-mcq-title {
|
||
margin: 0 0 0.6rem;
|
||
font-family: 'Orbitron', sans-serif;
|
||
font-size: 0.78rem;
|
||
font-weight: 800;
|
||
letter-spacing: 0.16em;
|
||
color: #5cf0ff;
|
||
text-shadow: 0 0 12px rgba(92, 240, 255, 0.4);
|
||
}
|
||
.quiz-battle-mcq-text {
|
||
margin: 0 0 1rem;
|
||
font-size: clamp(0.9rem, 2.8vw, 1.05rem);
|
||
line-height: 1.5;
|
||
color: #e2e8f0;
|
||
font-weight: 600;
|
||
}
|
||
.quiz-battle-mcq-actions {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 0.45rem;
|
||
margin-bottom: 0.65rem;
|
||
}
|
||
.quiz-battle-choice {
|
||
width: 100%;
|
||
text-align: left;
|
||
padding: 0.55rem 0.75rem;
|
||
border-radius: 8px;
|
||
border: 1px solid rgba(122, 162, 247, 0.45);
|
||
background: rgba(20, 28, 48, 0.95);
|
||
color: #c0caf5;
|
||
font-size: 0.82rem;
|
||
font-weight: 600;
|
||
cursor: pointer;
|
||
transition: border-color 0.15s, box-shadow 0.15s;
|
||
}
|
||
.quiz-battle-choice:hover {
|
||
border-color: rgba(0, 255, 240, 0.55);
|
||
box-shadow: 0 0 16px rgba(0, 200, 255, 0.15);
|
||
}
|
||
#quiz-battle-mcq-close {
|
||
width: 100%;
|
||
margin-top: 0.15rem;
|
||
padding: 0.45rem;
|
||
border: none;
|
||
border-radius: 8px;
|
||
background: rgba(60, 70, 100, 0.6);
|
||
color: #a9b1d6;
|
||
font-weight: 700;
|
||
cursor: pointer;
|
||
font-size: 0.78rem;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div class="game-wrap">
|
||
<div class="game-header">
|
||
<span id="room-id"></span>
|
||
<button id="btn-leave">ออกจากห้อง</button>
|
||
</div>
|
||
<div class="play-canvas-stack" id="play-canvas-stack">
|
||
<canvas id="game-canvas"></canvas>
|
||
<button type="button" id="quiz-carry-grab-btn" class="is-hidden" aria-label="หยิบหรือส่งคำตอบ (Grab)" title="หยิบ / ส่งคำตอบ — เหมือนกด F">
|
||
<img src="/Game/img/quiz-carry/btn-grab.png" alt="" width="256" height="256" decoding="async" />
|
||
</button>
|
||
<div id="quiz-map-question-panel" class="is-hidden" aria-hidden="true">
|
||
<p id="quiz-map-question-text"></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="play-quiz-scoreboard" class="is-hidden" aria-live="polite">
|
||
<div class="play-quiz-scoreboard-title">คะแนน</div>
|
||
<ul id="play-quiz-scoreboard-list" class="play-quiz-scoreboard-list"></ul>
|
||
</div>
|
||
<div id="play-quiz-feedback" class="is-hidden play-quiz-feedback" role="status" aria-atomic="true"></div>
|
||
<div id="quiz-carry-pregame-overlay" class="is-hidden" role="dialog" aria-modal="true" aria-labelledby="quiz-carry-pregame-sr-title" aria-hidden="true">
|
||
<div class="quiz-carry-pregame-backdrop" aria-hidden="true"></div>
|
||
<div class="quiz-carry-pregame-card">
|
||
<h2 id="quiz-carry-pregame-sr-title" class="quiz-carry-pregame-sr-only">ประลองความรู้ คำศัพท์ในกระบวนการยุติธรรม — How to play</h2>
|
||
<div class="quiz-carry-pregame-art">
|
||
<img id="quiz-carry-pregame-howto-img" class="quiz-carry-pregame-howto-img" src="/Game/img/quiz-carry/howto.png" width="900" height="520" alt="HOW TO PLAY — ประลองความรู้ คำศัพท์ในกระบวนการยุติธรรม" loading="lazy" decoding="async" />
|
||
</div>
|
||
<div class="quiz-carry-pregame-footer">
|
||
<p id="quiz-carry-pregame-status" class="quiz-carry-pregame-status" aria-live="polite"></p>
|
||
<div class="quiz-carry-pregame-actions">
|
||
<button type="button" id="quiz-carry-pregame-primary" class="quiz-carry-pregame-primary-btn" aria-pressed="false" title="READY">
|
||
<img id="quiz-carry-pregame-primary-img" src="/Game/img/quiz-carry/btn-ready.png" width="220" height="56" alt="READY" decoding="async" />
|
||
</button>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="quiz-carry-embed-countdown" class="is-hidden" role="alert" aria-live="assertive" aria-atomic="true" aria-hidden="true">
|
||
<div id="quiz-carry-embed-countdown-inner">
|
||
<p id="quiz-carry-embed-countdown-kicker" class="quiz-carry-embed-countdown-kicker">คำถาม · Question</p>
|
||
<p id="quiz-carry-embed-countdown-q" class="quiz-carry-embed-countdown-q"></p>
|
||
<span id="quiz-carry-embed-countdown-num">3</span>
|
||
</div>
|
||
</div>
|
||
<div id="quiz-carry-embed-q-strip" class="is-hidden" role="status" aria-live="polite" aria-atomic="true" aria-hidden="true">
|
||
<span class="quiz-carry-embed-q-strip-kicker">คำถาม · Question</span>
|
||
<p id="quiz-carry-embed-q-strip-text"></p>
|
||
</div>
|
||
<div id="quiz-game-overlay" class="is-hidden" role="status" aria-live="polite" aria-atomic="true">
|
||
<div class="quiz-game-inner">
|
||
<div class="quiz-game-phase" id="quiz-game-phase-label"></div>
|
||
<p class="quiz-game-q" id="quiz-game-question"></p>
|
||
<div class="quiz-game-timer" id="quiz-game-timer" aria-hidden="true"></div>
|
||
<p class="quiz-play-legend" id="quiz-play-legend"></p>
|
||
</div>
|
||
</div>
|
||
<div id="play-cyber-hud" class="play-cyber-hud is-hidden" aria-hidden="true">
|
||
<aside class="play-cyber-scoreboard">
|
||
<div class="play-cyber-panel-title">SCORE</div>
|
||
<ul id="play-cyber-score-list" class="play-cyber-score-list"></ul>
|
||
</aside>
|
||
<div class="play-cyber-time-block">
|
||
<div class="play-cyber-time-label">TIME</div>
|
||
<div id="play-cyber-time-val" class="play-cyber-time-val">0</div>
|
||
<div id="play-cyber-time-sub" class="play-cyber-time-sub"></div>
|
||
</div>
|
||
<div class="play-cyber-self">
|
||
<div class="play-cyber-self-frame">
|
||
<img id="play-cyber-portrait-img" alt="" width="72" height="72" />
|
||
</div>
|
||
<div id="play-cyber-self-status" class="play-cyber-self-status"></div>
|
||
</div>
|
||
<p id="play-cyber-hint" class="play-cyber-hint"></p>
|
||
<p id="play-cyber-preview-line" class="play-cyber-preview-line is-hidden"></p>
|
||
<div class="play-cyber-mic" title="Voice channel (placeholder)">
|
||
<span class="play-cyber-mic-icon" aria-hidden="true">🎙</span>
|
||
</div>
|
||
<div class="play-cyber-corruption" aria-hidden="true">
|
||
<div class="play-cyber-corruption-scanlines"></div>
|
||
<div class="play-cyber-corruption-text">RAM ERROR · CORRUPTING · DELETE INITIATED · 01001101 01110011 01100101 01100011</div>
|
||
</div>
|
||
</div>
|
||
<div id="quiz-battle-mcq-overlay" class="is-hidden" role="dialog" aria-modal="true" aria-labelledby="quiz-battle-mcq-title">
|
||
<div class="quiz-battle-mcq-backdrop" aria-hidden="true"></div>
|
||
<div class="quiz-battle-mcq-card">
|
||
<h2 id="quiz-battle-mcq-title" class="quiz-battle-mcq-title">QUIZ BATTLE</h2>
|
||
<p id="quiz-battle-mcq-text" class="quiz-battle-mcq-text"></p>
|
||
<div class="quiz-battle-mcq-actions">
|
||
<button type="button" class="quiz-battle-choice" data-idx="0">A</button>
|
||
<button type="button" class="quiz-battle-choice" data-idx="1">B</button>
|
||
<button type="button" class="quiz-battle-choice" data-idx="2">C</button>
|
||
</div>
|
||
<button type="button" id="quiz-battle-mcq-close">ปิด · Close</button>
|
||
</div>
|
||
</div>
|
||
<div id="gauntlet-ended-overlay" class="is-hidden" role="dialog" aria-modal="true" aria-labelledby="gauntlet-ended-title">
|
||
<div class="gauntlet-ended-backdrop" aria-hidden="true"></div>
|
||
<div class="gauntlet-ended-card">
|
||
<h2 id="gauntlet-ended-title">เกมจบ</h2>
|
||
<p id="gauntlet-ended-message"></p>
|
||
<ol id="gauntlet-ended-rankings"></ol>
|
||
<button type="button" id="btn-gauntlet-ended-lobby">กลับห้อง (ล็อบบี้) · Back to room lobby</button>
|
||
</div>
|
||
</div>
|
||
<script src="/Game/socket.io/socket.io.js"></script>
|
||
<script src="js/version.js?v=0.0166"></script>
|
||
<script src="js/play.js?v=0.155"></script>
|
||
<div class="version-tag">v —</div>
|
||
</body>
|
||
</html>
|