body {
    margin: 0;
    padding: 0;
    background: #000;
    color: white;
    font-family: 'Segoe UI', sans-serif;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
    display: flex;
    flex-direction: column;
}

/* Top bar: utility and status */
.top-bar {
    height: 50px;
    background: #222;
    display: none;
    /* Controlled by JS */
    align-items: center;
    padding: 0 15px;
    gap: 15px;
    border-bottom: 2px solid #333;
    z-index: 100;
}

.top-bar-btn {
    background: #3a3a8a;
    border: 1px solid #55a;
    color: #fff;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

.top-bar-btn:hover {
    background: #4a4a9a;
}

.top-bar-stat {
    color: #0cf;
    font-family: monospace;
    font-weight: bold;
    font-size: 14px;
    background: #111;
    padding: 5px 10px;
    border-radius: 4px;
    min-width: 80px;
    text-align: center;
}

/* Middle section containing Side Menu and Canvas */
.game-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-height: 0;
}

.side-menu {
    width: 80px;
    background: #222;
    display: none;
    /* Controlled by JS */
    flex-direction: column;
    align-items: center;
    padding: 15px 5px;
    gap: 12px;
    border-right: 2px solid #333;
    overflow-y: auto;
}

#change-btn {
    width: 50px;
    height: 50px;
    background-color: #3a3a8a;
    background-image: url('images/rotate0.png');
    background-repeat: no-repeat;
    background-position: center;
    background-size: 32px 32px;
    border: 1px solid #55a;
    border-radius: 8px;
    color: transparent;
    cursor: pointer;
    margin-bottom: 10px;
    /* Space between rotate and items */
}

/* Pocket container inside side menu */
.pocket-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pocket-item {
    width: 48px;
    height: 48px;
    background: #333;
    border: 2px solid #555;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
}

.pocket-item.active {
    border-color: #f6b00a;
    background: #444;
    box-shadow: 0 0 10px rgba(246, 176, 10, 0.4);
    transform: scale(1.1);
}

.pocket-item img {
    width: 40px;
    height: 40px;
    /*    image-rendering: pixelated;*/
}

/* Main Area: for the board */
.main-area {
    flex: 1;
    background: #000;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 0;
}

.game-canvas {
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    background: #fff;
    /* Fallback white background */
    display: block;
    /*    image-rendering: pixelated;*/
}