/* Row for moves, score, and timer */
.moves-score-timer-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
    /* Responsive: stack vertically on small screens */
    flex-wrap: wrap;
}
.top-bar-custom {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}
.level-center {
    flex: 1;
    text-align: center;
    color: #3a3a7a;
    font-size: 1.25em;
    font-weight: 700;
    padding: 6px 28px;
    border-radius: 16px;
    /* box-shadow removed */
    letter-spacing: 0.5px;
    margin: 0 12px;
}

.counters-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    gap: 24px;
    margin-bottom: 8px;
}

.moves-horizontal, .score-horizontal, .timer-horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.13em;
    font-weight: 600;
    min-width: 90px;
    border-radius: 18px;
    margin-bottom: 0;
    text-align: center;
    border: 2px solid #e0e0f7;
    background: linear-gradient(90deg, #f3f3fa 80%, #e6eaff 100%);
    padding: 8px 12px;
    box-sizing: border-box;
    transition: font-size 0.2s, padding 0.2s;
}

/* Level indicator bar */
.container {
    padding: 32px 24px 28px 24px;
    border-radius: 18px;
    border: 2px solid #222;
    min-height: 340px;
    width: 95vw;
    max-width: 440px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
}

.counters-row {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-bottom: 18px;
}

.right-bar {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

/* Layout for top bar above game board */

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    padding: 30px;
    border: solid 2px black;
    min-height: 300px;
    width: 90vw;
    max-width: 500px;
    box-sizing: border-box;
}

.menu {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

#playBtn, #howToPlayBtn {
    background-color: blue;
    border: none;
    color: white;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    padding: 15px 35px;
}

.hidden {
    display: none;
}

#gameBoard {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    max-width: 432px;
    margin: 0 auto;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.cell {
    width: 12.5%;
    display: flex;
    aspect-ratio: 1;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    border: 1px solid black;
    font-size: clamp(16px, 4vw, 24px);
    touch-action: none;
    cursor: pointer;
}

#game-board-container {
    text-align: center;
}

#gameBoard .cell {
    background-color: lightgray;
}

.cell.selected {
    background-color: #ffd700;
    border: 3px solid #ff6b00;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

.cell.matched {
    background-color: #ff6b6b;
    transform: scale(1.15);
    transition: transform 0.2s, background-color 0.2s;
}

#movesDisplay, #scoreDisplay {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
}

#movesDisplay, #scoreDisplay, #timerDisplay {
    text-align: center;
    font-size: 1.2em;
    font-weight: bold;
    margin-bottom: 10px;
    background-color: #6c6c96;
    border-radius: 14px;
    color: black;
    padding: 6px 10px;
    min-width: 80px;
    box-sizing: border-box;
    transition: font-size 0.2s, padding 0.2s;
}

.symbol-counters-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 22px;
    background: linear-gradient(90deg, #e6eaff 80%, #cfd8ff 100%);
    border: 2px solid #b6b6e6;
    border-radius: 16px;
    padding: 10px 28px;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(60,60,120,0.07);
    margin-bottom: 18px;
}

/* Responsive styles for mobile */
@media (max-width: 600px) {
    .moves-score-timer-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
    .moves-horizontal, .score-horizontal, .timer-horizontal {
        font-size: 1.05em;
        min-width: 0;
        width: 100%;
        padding: 10px 0;
        margin-bottom: 0;
    }
    #movesDisplay, #scoreDisplay, #timerDisplay {
        font-size: 1.05em;
        min-width: 0;
        width: 100%;
        padding: 10px 0;
        margin-bottom: 0;
    }
    .symbol-counters-row {
        flex-direction: column;
        gap: 10px;
        padding: 10px 8px;
    }
}

