h4{
    color: orangered;
}
#board {
    max-width: 600px;
    position: relative;
}
.settings-accordion {
    /*max-width: 400px;*/
    margin-top: -1.25rem; /* Align the top of the accordion with the top of the chessboard */
}
.full-width-bar {
    width: 100%;
    background-color: #f8f9fa;
    font-size:  smaller;
    max-width: 600px;
    /* display: none; */
}
#game-result{
    min-height: 20px;
}
#score-bar-container {
    position: absolute;
    left: 75px;
    /*left: 0px;*/

    top: 0;
    width: 10px;
    height: 100%;
    background-color: #3b4252ff;
    display: none;
}
#score-bar {
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: #d8dee9ff;
}
.button-container {
    display: flex;
    justify-content: space-between;
    width: 100%;
    max-width: 600px; /* Ensure buttons do not surpass the width of the board */
}
.button-container .btn {
    flex: 1;
    margin: 0 5px;
}
.button-container.second-row .btn {
    margin-top: 10px; /* Space between button rows */
}

.button-container > .btn:first-child {
    margin-left: 0;
}

.button-container > .btn:last-child {
    margin-right: 0;
}
/* Apply to your chess area container */
#board {
    touch-action: none;          /* Disable scrolling/zooming from touch here */
    overscroll-behavior: contain;/* Don't propagate scroll to parent */
    user-select: none;           /* Optional: avoid text selecting while dragging */
    margin: auto;
}

/* squares in chessboard.js */
.white-1e1d7 { background-color: var(--board-white) !important; }
.black-3c85d { background-color: var(--board-black) !important; }

/* default */
#board-wrapper{
    --board-white: #eeeed2;
    --board-black: #769656;
}

/* highlight last move */
.last-move {
    box-shadow: inset 0 0 0 3px rgba(255, 193, 7, 0.85);
}

.black-3c85d.last-move {
    box-shadow: inset 0 0 0 3px rgba(255, 220, 120, 0.9);
}

/* =========================
CLOCK PANEL
========================= */
/*.clock-panel {*/
/*    width: 100%;*/
/*    background: #f8f9fa;*/
/*    border-radius: 8px;*/
/*    padding: 10px 12px;*/
/*    font-size: 0.9rem;*/
/*}*/

/* Row chứa select + buttons */
.clock-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}


/* =========================
   CLOCK DISPLAY
   ========================= */
.clock-display {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.clock-box {
    flex: 1;
    background: #212529;
    color: #ffffff;
    border-radius: 6px;
    padding: 6px 0;
    text-align: center;
    transition: all 0.15s ease-in-out;
}

.clock-label {
    /*font-size: 0.7rem;*/
    /*text-transform: uppercase;*/
    letter-spacing: 0.5px;
    opacity: 0.75;
}

.clock-time {
    /*font-size: 1.4rem;*/
    font-weight: bold;
    /*font-family: "Courier New", monospace;*/
    /*line-height: 1.2;*/
}

/* =========================
   ACTIVE SIDE HIGHLIGHT
   ========================= */
.clock-time.active {
    color: #ffc107;
    animation: clock-pulse 1s infinite;
}

@keyframes clock-pulse {
    0%   { opacity: 1; }
    50%  { opacity: 0.75; }
    100% { opacity: 1; }
}

/* =========================
   LOW TIME WARNING
   ========================= */
.clock-time.low-time {
    color: #dc3545;
}

/* =========================
   CLOCK STATUS
   ========================= */
.clock-status {
    margin-top: 6px;
    font-size: 0.75rem;
    text-align: center;
    color: #6c757d;
}

.clock-box .clock-label {
    margin-left: 20px;
    float: left;
}

/* =========================
   RESPONSIVE
   ========================= */
@media (max-width: 576px) {
    .clock-display {
        gap: 6px;
    }

    .clock-time {
        /*font-size: 1.2rem;*/
    }

    .clock-row {
        gap: 4px;
    }


}

@media (max-width: 1400px) {
    #score-bar-container {
        left: 0;
    }
}
