/* 전체 루트 컨테이너 */
#slot3-root {
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}

/* 게임판 전체 비율 (d2.png 형태의 와이드 화면) */
#game-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 0 auto;
    overflow: hidden;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

#game-container img {
    position: absolute;
    filter: drop-shadow(6px 8px 10px rgba(0, 0, 0, 0.55));
}

/* 1. 배경 꽉 채우기 */
#bg-layer {
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    filter: none;
    z-index: 1;
}

/* 2. 상단 간판 */
#top-sign {
    top: 4%;
    left: 50%;
    transform: translateX(-50%);
    width: 52%;
    z-index: 8;
}

/* 3. 룰렛 위치 (가운데보다 살짝 왼쪽) */
#roulette-area {
    position: absolute;
    top: 22%;
    left: 34%;
    transform: translateX(-50%);
    width: 38%;
    z-index: 5;
}

#wheel {
    width: 100%;
    transform-origin: 50% 50%;
}

/* (포인터는 현재 사용하지 않음) */

/* 4. 등장인물 위치 */
#person {
    width: 24%;
    top: 16%;
    right: 20%;
    z-index: 6;
}

#monkey {
    width: 14%;
    bottom: 30%;
    right: 8%;
    z-index: 7;
}

/* 5. 보드판 위치 */
#round-board {
    width: 22%;
    bottom: 26%;
    left: 18%;
    z-index: 5;
}

#time-board {
    width: 14%;
    bottom: 26%;
    right: 25%;
    z-index: 5;
}

#bug {
    width: 9%;
    bottom: 29%;
    left: 47%;
    transform: translateX(-50%);
    z-index: 6;
}

/* 6. 바닥 조작판 (배경은 그대로 두고, 단상처럼 중앙 하단에 배치) */
#bottom-board {
    width: 68%;
    bottom: 2%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* 6-1. 오른쪽 초록 버튼 (ttable 위에 겹치기) */
#green-btn {
    width: 18%;
    bottom: 11%;
    right: 15%;
    z-index: 11;
    cursor: pointer;
}

/* 6-2. 왼쪽 빨강 버튼 (ttable 위에 겹치기) */
#red-btn {
    width: 18%;
    bottom: 16%;
    left: 23%;
    z-index: 11;
    cursor: pointer;
}

/* 7. UI 오버레이 레이어 */
#ui-layer {
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
}

/* 정보 패널 (좌상단 보드 느낌) */
#info-panel {
    position: absolute;
    top: 13%;
    left: 8%;
    padding: 10px 14px;
    min-width: 190px;
    background: rgba(15, 18, 30, 0.8);
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
    color: #f4f6ff;
    font-size: 13px;
    pointer-events: auto;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.info-row:last-child {
    margin-bottom: 0;
}

.info-label {
    opacity: 0.8;
}

.info-value {
    font-weight: 700;
    color: #ffe46a;
}

#result-text {
    color: #a7ffb2;
}

/* 베팅 칩 패널 (하단 중앙 왼쪽) */
#bet-panel {
    position: absolute;
    bottom: 14%;
    left: 16%;
    display: flex;
    gap: 6px;
    pointer-events: auto;
}

.chip-btn,
#bet-reset-btn,
#spin-btn {
    border: none;
    border-radius: 16px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #ffd86a, #ffb347);
    color: #40220b;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.45);
    transition: transform 0.06s ease-out, box-shadow 0.06s ease-out, filter 0.06s;
}

.chip-btn:hover,
#bet-reset-btn:hover,
#spin-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.55);
    filter: brightness(1.05);
}

.chip-btn:active,
#bet-reset-btn:active,
#spin-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#bet-reset-btn {
    background: linear-gradient(135deg, #ffd6e3, #ff8ba7);
    color: #3f1422;
}

/* 스핀 버튼 (하단 중앙) */
#control-panel {
    position: absolute;
    bottom: 10%;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: auto;
}

#spin-btn {
    min-width: 140px;
    font-size: 15px;
    background: radial-gradient(circle at 30% 20%, #ffffff, #ffe66d 45%, #ff9f43 100%);
    color: #4b1b00;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

/* 반응형 축소 시 폰트/간격 조정 */
@media (max-width: 640px) {
    #info-panel {
        font-size: 11px;
        padding: 8px 10px;
        min-width: 150px;
    }

    .chip-btn,
    #bet-reset-btn,
    #spin-btn {
        padding: 5px 10px;
        font-size: 11px;
        border-radius: 14px;
    }

    #spin-btn {
        min-width: 110px;
    }
}