* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #4f9c49;
    font-family: 'Trebuchet MS', Arial, sans-serif;
}

#gameCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* ---------- Overlays (menu / game over) ---------- */
.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 30, 50, 0.45);
    z-index: 200;
}
.overlay.hidden { display: none; }

.panel {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 18px;
    padding: 32px 40px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
    max-width: 460px;
    width: 90%;
}
.panel h1 {
    font-size: 42px;
    color: #1b3a5b;
    margin-bottom: 8px;
}
.tag {
    color: #355;
    margin-bottom: 20px;
    font-size: 16px;
}

.choice {
    text-align: left;
    margin: 16px 0;
    padding: 14px 16px;
    background: #eef4fa;
    border-radius: 12px;
}
.choice h3 {
    font-size: 15px;
    color: #1b3a5b;
    margin-bottom: 8px;
}
.choice label {
    display: block;
    padding: 6px 4px;
    font-size: 15px;
    color: #234;
    cursor: pointer;
}
.choice input { margin-right: 8px; transform: scale(1.2); }

.buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 22px;
    flex-wrap: wrap;
}
.btn {
    padding: 14px 24px;
    font-size: 17px;
    font-weight: bold;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    background: #dfe7ef;
    color: #1b3a5b;
    transition: transform 0.12s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { background: #3399ff; color: #fff; }
.btn.primary:hover { background: #1e7fe0; }

.hint {
    margin-top: 14px;
    font-size: 12px;
    color: #678;
}

/* ---------- Pose camera panel(s) (Crossy Road style) ---------- */
#pose-wrapper {
    position: fixed;
    bottom: 16px;
    right: 16px;
    z-index: 150;
    background: rgba(0, 0, 0, 0.55);
    border-radius: 12px;
    padding: 10px;
    color: #fff;
    text-align: center;
}
#pose-wrapper.hidden { display: none; }
#pose-cams {
    display: flex;
    gap: 8px;
    justify-content: center;
}
.pose-cam {
    position: relative;
    width: 240px;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}
.pose-cam.hidden { display: none; }
.pose-cam canvas { display: block; width: 100%; height: 100%; }
.cam-tag {
    position: absolute;
    top: 4px; left: 6px;
    font-size: 13px;
    font-weight: bold;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.55);
}
#pose-cam .cam-tag { color: #00e5ff; }
#pose-cam2 .cam-tag { color: #ff5252; }
#webcam { display: none; }
#pose-status {
    font-size: 12px;
    margin-top: 6px;
    min-height: 28px;
}

@media (max-width: 768px) {
    .panel { padding: 24px; }
    .panel h1 { font-size: 32px; }
    .pose-cam { width: 150px; height: 112px; }
}
