/* style.css */

/* .game-goldminer {
    font-family: 'Arial', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    max-height: 120vh;
    background-color: #282c34;
    margin: 0;
    color: #eee !important;
    overflow: hidden;
} */

#game-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #3a3f47;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
    position: relative; /* Cho các modal */
    /* width: 1000px;
    height: 600px; */
}

/* MỚI: Kiểu cho header chứa điểm cao nhất và nút nhạc */
#game-header {
    width: 100%; /* Đảm bảo chiếm toàn bộ chiều rộng của game-container */
    display: flex;
    justify-content: flex-end; /* Căn chỉnh các phần tử con sang phải */
    align-items: center; /* Căn chỉnh theo chiều dọc */
    padding-bottom: 10px; /* Khoảng cách với canvas */
    box-sizing: border-box; /* Bao gồm padding trong width */
    color: white;
}

#game-header p {
    margin: 0 15px; /* Khoảng cách giữa các phần tử trong header */
    font-size: 1.1em;
    font-weight: bold;
}

#game-header button {
    /* Kiểu dáng cho nút bật/tắt nhạc */
    padding: 8px 15px;
    font-size: 1em;
    cursor: pointer;
    background-color: #007bff; /* Màu xanh của bootstrap primary */
    color: white !important;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#game-header button:hover {
    background-color: #0056b3;
}

#gameCanvas {
    /* background-color: #000; */
    border: 2px solid #61dafb;
    display: block; /* Loại bỏ khoảng trắng dưới canvas */
    width: 1000px;
}

@media (max-width: 768px) {
  #gameCanvas {
    width: 420px;
    margin-left: 39px;
  }
}

#game-stats {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-top: 15px;
    font-size: 1.2em;
    color: white;
    font-weight: bold;
}

#game-stats p {
    margin: 0 10px;
}

#start-game-btn,
#pause-continue-game-btn { /* Áp dụng kiểu cho cả hai nút */
    /* margin-top: 15px; */
    padding: 10px 20px;
    font-size: 1.5em;
    cursor: pointer;
    background-color: #4CAF50;
    color: white !important;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

#start-game-btn:hover,
#pause-continue-game-btn:hover {
    background-color: #45a049;
}

/* Kiểu cho nút Start game, có thể bỏ nếu không cần hiệu ứng riêng */
/* #start-game-btn:hover {
    background-color: #21a1f1;
} */

/* --- Modal Styles (Tái sử dụng từ game trước) --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background-color: #444b55;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
    text-align: center;
    max-width: 500px;
    width: 90%;
    color: #eee;
}

#modal-options {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal-option-item {
    background-color: #555c66;
    padding: 12px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    border: 1px solid #666;
}

.modal-option-item:hover {
    background-color: #61dafb;
    color: #282c34;
}

.modal-option-item.selected {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.modal-option-item.correct {
    background-color: #28a745;
    color: white;
    border-color: #28a745;
}

.modal-option-item.wrong {
    background-color: #dc3545;
    color: white;
    border-color: #dc3545;
}

#modal-feedback {
    margin-top: 15px;
    font-weight: bold;
    font-size: 1.1em;
}

#modal-feedback.correct {
    color: #28a745;
}

#modal-feedback:not(.correct) {
    color: #dc3545;
}

#modal-submit-btn, #modal-close-btn, #restart-game-btn, #restart-game-btn-congrats {
    margin-top: 20px;
    padding: 10px 20px;
    background-color: #61dafb;
    color: #282c34;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: background-color 0.2s ease;
}

#modal-submit-btn:hover, #modal-close-btn:hover, #restart-game-btn:hover, #restart-game-btn-congrats:hover {
    background-color: #21a1f1;
}

#modal-submit-btn.hidden,
#modal-close-btn.hidden {
    display: none;
}
/* .hidden {
    display: none;
} */

/* MỚI: Kiểu cho container của các nút điều khiển game */
#game-controls {
    margin-top: 15px; /* Khoảng cách từ canvas/game-stats */
    display: flex;
    justify-content: center; /* Căn giữa các nút */
    gap: 10px; /* Khoảng cách giữa các nút */
    width: 100%; /* Chiếm toàn bộ chiều rộng của game-container */
    flex-wrap: wrap; /* Cho phép các nút xuống dòng trên màn hình nhỏ */
}

/* MỚI: Kiểu cho nút "Kéo" mobile */
.mobile-only-btn {
    display: none; /* Mặc định ẩn trên desktop */
    padding: 10px 20px;
    font-size: 1.5em;
    background-color: #007bff; /* Hoặc màu khác phù hợp */
    color: white !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.mobile-only-btn:hover {
    background-color: #0056b3;
}

/* Media Query để hiển thị nút "Kéo" trên mobile */
@media (max-width: 768px) {
    #gameCanvas {
        width: 420px;
        /* margin-left: 39px; */ /* Bạn có thể cần điều chỉnh lại margin nếu bố cục bị lệch */
        /* Căn giữa canvas trong container cha */
        margin-left: auto;
        margin-right: auto;
    }

    #game-controls {
        flex-direction: column; /* Xếp các nút theo cột trên mobile */
        align-items: center; /* Căn giữa các nút theo chiều ngang */
        gap: 15px; /* Khoảng cách lớn hơn giữa các nút khi xếp cột */
    }

    /* Hiển thị nút "Kéo" trên mobile (nó vẫn cần class 'hidden' để JS điều khiển) */
    .mobile-only-btn:not(.hidden) { /* Chỉ hiện khi nó không có class 'hidden' */
        display: block;
    }

    /* Điều chỉnh các nút khác trên mobile để không chồng chéo */
    #start-game-btn,
    #pause-continue-game-btn {
        width: 80%; /* Cho các nút chiếm phần lớn chiều rộng */
        max-width: 300px; /* Giới hạn chiều rộng tối đa */
    }
}