* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    overflow: hidden;

    background-image: url("asset/bg3.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover; /* atau contain */
    background-attachment: fixed;
}

#game{
    position:fixed;
    inset:0;
    z-index:1;
}
#game { display: block; }
#ui {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 24px; pointer-events: none; z-index: 10;
}
.ui-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 10px; padding: 8px 18px;
  color: white; font-size: 20px; font-weight: bold;
}
.ui-box span { color: #000000; }
#video {
  position: fixed; width: 180px; right: 12px; bottom: 12px;
  border-radius: 10px; transform: scaleX(-1); opacity: 0.85; z-index: 10;
}
#overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.82);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 20; color: white; text-align: center;
}
#overlay h1 { font-size: 48px; margin-bottom: 10px; }
#overlay .sub { font-size: 20px; color: #aaa; margin-bottom: 32px; }
#hand-status {
  display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px; padding: 18px 32px;
  font-size: 18px; margin-bottom: 20px;
  transition: border-color 0.3s, background 0.3s;
}
#hand-status.detected {
  border-color: #f87171;
  background: rgba(74,222,128,0.1);
}
#hand-icon { font-size: 36px; transition: transform 0.3s; }
#hand-status.detected #hand-icon { transform: scale(1.2); }
#hand-text { color: #ccc; }
#hand-status.detected #hand-text { color: #f87171; }
#countdown-display {
  font-size: 100px; font-weight: bold;
  color: #facc15; display: none;
  animation: pop 0.4s ease;
}
@keyframes pop {
  0% { transform: scale(1.5); opacity: 0.3; }
  100% { transform: scale(1); opacity: 1; }
}
#cam-hint { font-size: 14px; color: #888; margin-top: 16px; }

#guide-box{
    width:min(90%,520px);
    margin:20px auto 0;
    padding:18px 22px;
    background:rgba(255,255,255,.12);
    backdrop-filter:blur(10px);
    border:1px solid rgba(255,255,255,.2);
    border-radius:16px;
    color:#fff;
    text-align:left;
    line-height:1.6;
}

#guide-box h3{
    margin:0 0 12px;
    font-size:22px;
}

#guide-box ol{
    margin:0;
    padding-left:22px;
}

#guide-box li{
    margin-bottom:8px;
}

#cam-hint{
    margin-top:10px;
    opacity:.9;
}

#game-sub{
    margin-bottom:15px;
}

.score-list{
    margin-top:18px;
    display:flex;
    justify-content:center;
    gap:20px;
    flex-wrap:wrap;
}

.score-item{
    width:110px;
    background:rgba(255,255,255,.12);
    border:1px solid rgba(255,255,255,.2);
    border-radius:14px;
    padding:12px;
    text-align:center;
}

.score-item img{
    width:60px;
    height:60px;
    object-fit:contain;
    display:block;
    margin:0 auto 10px;
}

.score-item span{
    display:block;
    font-size:18px;
    color:#fff;
}