@import url('https://fonts.googleapis.com/css2?family=Baloo+2:wght@700&display=swap');

body {
    font-family: 'Baloo 2', cursive, Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(135deg, #0B204A 0%, #040F24 100%) fixed;
    color: #fff;
    padding-top: 80px;
}

h1 {
    font-size: 3.5em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2), 0 4px 10px rgba(0,0,0,0.15);
    margin-bottom: 20px;
}

#game-container {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

#myBoard {
    width: 400px;
    min-width: 300px;
    max-width: 60vh;
    flex-shrink: 0;
}

#game-info {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    box-sizing: border-box;
}

#game-info p {
    margin: 0 0 15px 0;
    font-size: 1.2em;
    font-weight: bold;
}

#fen, #pgn {
    display: none;
}

/* --- ĐỊNH DẠNG CHO CÁC TÍNH NĂNG MỚI --- */

.highlight-selected {
  box-shadow: inset 0 0 3px 3px yellow;
}

.highlight-move {
    position: relative;
}
.highlight-move::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 30%;
    height: 30%;
    background-color: rgba(30, 144, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
}

/* --- HỘP THOẠI (MODAL) --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.hidden {
    display: none;
}

.modal-content {
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    text-align: center;
    color: #333;
    max-width: 90%;
    width: 500px;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 2em;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}
.close-button:hover { color: #333; }

.promotion-choices {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.promotion-piece {
    width: 60px;
    height: 60px;
    background-size: contain;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 5px;
    transition: border-color 0.2s;
}

.promotion-piece:hover {
    border-color: #0074d9;
}

/* --- NHÓM NÚT BẤM --- */
.button-group {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#newGameBtn, #guideBtn {
    padding: 15px 20px;
    font-size: 1.5em;
    font-family: 'Baloo 2', cursive, Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: #fff;
    color: #0056b3;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    width: 100%;
}

#newGameBtn:hover, #guideBtn:hover {
    background-color: #f1f1f1;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

#menu-button {
    position: absolute;
    top: 20px;
    left: 20px;
    padding: 10px 20px;
    font-size: 1.2em;
    font-family: 'Baloo 2', cursive, Arial, sans-serif;
    font-weight: 700;
    cursor: pointer;
    border: none;
    border-radius: 10px;
    background-color: rgba(255, 255, 255, 0.85);
    color: #0056b3;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 10;
}

#menu-button:hover {
    background-color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
