html {
            height: 100dvh;
            margin: 0;
            padding: 0;
        }
        .bungee-regular {
            font-family: "Bungee", sans-serif;
            font-weight: 400;
            font-style: normal;
        }
        :root {
            --bg-color: #2c3e50; /* CLOUD WISP #F1FAFF / CANDY FLOSS #FEECEB / CREAME #FFF5EA / MOJITO BREEZE #FBFFF4 / COLD STEEL #F8F7F4             */
            --board-bg: #DAC6CC;
            --accent-color: #FDFBF6;

            --folder-color: #e2b05e; /* 파일철 황토색 */
            --paper-color: #ffffff;
            --text-color: #333;
        }

        body {
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            
            /* 1. 높이 설정: vh 대신 dvh를 사용해 주소창 문제를 해결합니다. */
            height: 100vh; /* 구형 브라우저 대비 */
            height: 100dvh; /* 최신 브라우저: 화면에 딱 맞게 조절 */
            
            /* 2. 넘침 방지 */
            overflow: hidden;
            font-family: 'Pretendard', sans-serif;

            /* background-image: url('../img/background-img.png'); */
            background-position: center;
            background-repeat: no-repeat;
            
            /* 3. 배경 고정 해제: fixed는 때때로 모바일에서 계산 오류를 일으킵니다. 
            화면 전체가 배경이라면 fixed를 지우는 것이 더 정확하게 맞습니다. */
            /* background-attachment: fixed; */

            /* 4. 비율 무시하고 꽉 채우기 */
            background-size: 100% 100%;
        }

        #game-container { position: relative; display: flex; align-items: center; justify-content: center; }

        canvas { 
            background: var(--board-bg); 
            /* border: 3px solid #34495e;  */
            border-radius: 0px;
            /* box-shadow: 0 10px 30px rgba(0,0,0,0.5); */

            
            /* background-image: url('img/background-img.png');
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed; */
            
            
            /* background-size: cover; */

        }

        #leaderboard {
            position: absolute; top: 10%; left: 10%; font-weight: bold;

            width: 10%;
            background: rgba(255, 255, 255, 0.9);
            border-radius: 5px;
            padding: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            pointer-events: auto; /* 리더보드는 스크롤 가능하게 */
            overflow-y: auto;
        }

        #player-table { 
            width: 100%; border-collapse: collapse; 
            font-size: clamp(12px, 2.5vh, 16px); /* 화면 높이에 따라 폰트 조절 */
        }
        
        #player-table th { border-bottom: 2px solid #ddd; padding: 12px 5px; color: #333; }
        #player-table td { padding: 12px 5px; text-align: center; }
        /* 보드 중앙 내부 UI */
        #inner-ui {
            position: absolute;
            top: 72vh; left: 50%;
            transform: translate(-50%, -50%);
            width: 70%; /* 11x11 보드 중앙 빈 공간에 맞춤 */
            max-height: 55%;
            display: flex;
            flex-direction: column;
            align-items: center;
            pointer-events: none; /* 클릭 방해 금지 */
        }
        /* 상태 메시지 및 결과 텍스트 */
        #status {
            /* transform: translate(-50%, -50%); */
            position: absolute; top: 5%; left:4%; font-weight: bold;
            /* background: rgba(0,0,0,0.5);  */
            color: #000;
            padding: 5px 15px; border-radius: 5px; font-size: 13px;
        }
        #your-turn {
            transform: translate(-50%, -50%);
            position: absolute; top: 65vh; left:50%;
            color: white;
            padding: 5px 15px; border-radius: 5px; font-size: 5vw;

            font-family: "Bungee", sans-serif;
            font-style: "normal";
        }

        #result-textText {
            margin-top: 10px;
            /* background: rgba(0,0,0,0.5);  */
            color: #fff; padding: 5px 10px; border-radius: 5px;
            font-weight: bold; font-size: 1.5vw;
        }

        /* 플로팅 주사위 버튼 */
        /* #roll-btn {
            position: absolute; bottom: 25%; right: 15%;
            width: 100px; height: 100px; border-radius: 50%;
            font-size: 24px; background: var(--accent-color); border: 3px solid #fff;
            color: white; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.3);
            display: flex; justify-content: center; align-items: center;
            z-index: 100;
        }
        #roll-btn:disabled { background: #7f8c8d; opacity: 0.7; } */

        /* 모바일 가로모드 최적화: 주사위 버튼 위치 조정 */
        @media (max-height: 500px) {
            #roll-btn { width: 70px; height: 70px; font-size: 20px; }
            #inner-ui { width: 65%; }
        }

        .bankbook {
            position: fixed;
            bottom: 20px;
            left: 30px;
            min-width: 17vw;
            font-family: 'Courier New', Courier, monospace;
            z-index: 100;
            /* 우측으로 약간 기울어지게 회전 및 원근감 적용 */
            transform: perspective(1000px) rotateY(15deg) rotateX(5deg);    
            box-shadow: -10px 10px 20px rgba(0,0,0,0.3);
            transition: transform 0.3s ease;
        }

        .bankbook:hover {
            transform: perspective(1000px) rotateY(-5deg) rotateX(0deg);
        }

        .bankbook-top {
            background-color: #3498db; /* 통장 커버 색상 */
            color: white;
            padding: 8px 15px;
            border-radius: 10px 10px 0 0;
            font-weight: bold;
            border-bottom: 2px solid rgba(0,0,0,0.1);
        }

        .bankbook-bottom {
            background-color: #fdfae5; /* 통장 속지 색상 (연한 미색) */
            padding: 15px;
            border-radius: 0 0 10px 10px;
            min-height: 8vh;
            border: 1px solid #dcdde1;
        }

        .info-row {
            margin-bottom: 8px;
            border-bottom: 1px dotted #ccc;
            display: flex;
            justify-content: space-between;
        }

        .label {
            color: #7f8c8d;
            font-size: 0.8rem;
        }

        #my-money {
            color: #2c3e50;
            font-weight: bold;
            font-size: 1.1rem;
        }

        .unit { font-size: 0.8rem; margin-left: 2px; }

.dice-button-wrapper {
    position: fixed;
    bottom: 40px;
    right: 50px;
    perspective: 1000px; /* 3D 효과를 위한 원근감 */
}

.isometric-btn {
    position: relative;
    width: 80px;
    height: 80px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    /* Isometric 각도: 오른쪽으로 약간 기울임 */
    transform: rotateX(55deg) rotateZ(-45deg);
    transform-style: preserve-3d;
    transition: transform 0.1s ease, filter 0.2s;
}

/* 버튼의 윗면 (키캡 상단) */
.btn-top {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #F2F2F2; /* 통장 속지와 비슷한 따뜻한 흰색  #fdfae5*/
    border: 2px solid #AAB6BE; /* #b2a3b0 */
    color: #2c3e50;
    font-weight: bold;
    font-size: 1.2rem;
    border-radius: 8px;
    transform: translateZ(20px); /* 위로 띄워서 두께 형성 */
    transition: transform 0.1s ease;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.05);
}

/* 버튼의 옆면 (두께 부분) */
.btn-side {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #AAB6BE; /* 맵 블록 옆면과 통일감 있는 색상 #dac6cc*/
    border: 2px solid #839AA1; /* #888294 */
    border-radius: 8px;
    transform: translateZ(0);
}

/* 버튼을 눌렀을 때의 효과 (키보드 클릭감) */
.isometric-btn:active .btn-top {
    transform: translateZ(5px); /* 눌렀을 때 높이가 낮아짐 */
}

.isometric-btn:disabled {
    filter: grayscale(1);
    cursor: not-allowed;
    opacity: 0.7;
}

/* 버튼 위에 글자나 아이콘 추가 디테일 */
.btn-top::after {
    /* content: "🎲"; */
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 0.8rem;
    opacity: 0.5;
}









/* =============================================================================== - 모달창*/

.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #FBFFF4; padding: 25px; 
    text-align: center; min-width: 300px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    /* border: 4px solid #2c3e50; */
    border-radius: 5px;

    position: relative; /* 자식 요소 배치를 위해 추가 */
    padding: 15px 25px 25px 25px;
}
#modal-title {
    margin: 0;
     margin-bottom: 0px;
    font-size: 1.2em; color: #2c3e50;

    border-left: 5px solid #27ae60;
    padding-left: 15px;
    text-align: left;
}
/* 제목 아래 구분선 스타일 */
.modal-divider {
    width: 100%;              /* 선의 가로 길이 */
    height: 3px;             /* 선의 두께 */
    background: linear-gradient(to right, transparent, #2c3e50, transparent); /* 가운데만 진한 그라데이션 */
    margin: 15px auto;       /* 제목과의 간격 및 중앙 정렬 */
    border-radius: 2px;      /* 선 끝을 살짝 둥글게 */
}
#modal-message {
    font-size: 0.9em; margin-bottom: 20px; color: #34495e;
}

.modal-buttons { margin-top: 20px; display: flex; gap: 10px; justify-content: center; }

button {
    padding: 10px 20px; border: none; border-radius: 5px; cursor: pointer; font-weight: bold;
}

#modal-confirm-btn { background: #c7728b; color: white; }
#modal-cancel-btn { background: #d6b9c2; color: white; }



/* =============================================================================== - 찬스카드 디자인*/


.chance-card-wrapper {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000;
}

.chance-card-inner {
    background: linear-gradient(135deg, #f1c40f, #f39c12); /* 황금색 그라데이션 */
    padding: 20px;
    border-radius: 15px;
    color: white;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    border: 5px solid #fff;
}

.chance-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.chance-title {
    font-size: 1.5rem;
    margin: 0;
}









/* 전체 파일철 컨테이너 */
/* 로비 오버레이: 화면 전체를 덮고 중앙 정렬 */
#lobby-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--board-bg); 
    display: flex; /* 내부 folder를 중앙에 배치 */
    justify-content: center;
    align-items: center;
    z-index: 500; /* start-overlay(1000)보다는 낮고, 게임판보다는 높게 */
    /* display: none;  <-- 나중에 게임 시작 전에는 none으로 제어하세요 */
}
.bunch-btn {
    position: absolute;
    top: 5%;
    right: 5%;
}

/* 방 목록 컨테이너 (여백 조정) */
.room-list {
    list-style: none;
    padding: 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px; /* 카드 사이의 간격 */
}

/* 네이버 스타일 카드 아이템 */
.room-item {
    background: #ffffff;
    border: 1px solid #e0e4e9; /* 부드러운 외곽선 */
    border-radius: 12px;      /* 둥근 모서리 */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03); /* 아주 살짝 보이는 그림자 */
    line-height: normal; /* 기존의 40px 줄무늬 강제 해제 */
}

.room-item:hover {
    border-color: #3498db;    /* 호버 시 파란색 테두리 */
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* 텍스트 영역 */
.room-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.room-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.room-date {
    font-size: 0.85rem;
    color: #95a5a6; /* 이미지 속 날짜처럼 연한 회색 */
}

/* 태그 및 인원수 스타일 */
.room-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.room-tag {
    color: #3498db; /* [일반] 혹은 [업데이트] 느낌의 파란색 */
    font-weight: bold;
    font-size: 0.9rem;
}

.status-tag {
    background: #f1f3f5;
    color: #495057;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    border: 1px solid #dee2e6;
}