/* 全体の基本設定 */
body {
    background: linear-gradient(to top, #302b63 0%, #24243e 100%);
    font-family: 'Arial Rounded MT Bold', sans-serif;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    margin: 0;
    transform: scale(0.9); /* 全体のサイズを90%に変更 */
    transform-origin: center;
}

/* ゲーム全体を囲むラッパー */
.game-wrapper {
    display: flex;
    gap: 30px;
    align-items: center;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ゲーム盤面コンテナ（オーバーレイの基準） */
.game-board-container {
    position: relative;
    border: 10px solid rgba(255, 255, 255, 0.2);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

canvas#game-board {
    display: block;
    border-radius: 5px;
}

/* スタート/ポーズ画面のオーバーレイ */
#game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border-radius: 5px;
}

#start-button {
    padding: 15px 40px;
    font-size: 24px;
    font-family: 'Arial Rounded MT Bold', sans-serif;
    color: #5b559e;
    background-color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s;
}

#start-button:hover {
    transform: scale(1.1);
}

#pause-text {
    font-size: 40px;
    font-weight: bold;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}

/* 右側のサイドバー */
.sidebar {
    width: 200px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}

.sidebar h1 {
    font-size: 2rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

/* スコアやNEXTを入れるボックス */
.ui-box {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    padding: 15px;
}

.ui-box h2 {
    margin: 0 0 10px 0;
    font-size: 1.2rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 5px;
}

.ui-box p {
    margin: 0;
    font-size: 2.5rem;
    font-weight: bold;
}

canvas#next-canvas,
canvas#hold-canvas {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

/* 遊び方の表示 */
#instructions {
    color: white;
    text-align: center;
    margin-bottom: 30px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 10px 25px 20px 25px;
    border-radius: 15px;
    box-sizing: border-box;
    width: 280px;
}

#instructions h2 {
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    padding-bottom: 8px;
}

#instructions p {
    margin: 8px 0;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#instructions span {
    font-weight: bold;
    margin-right: 10px;
}