/* 全体的なコンテナ */
#number-sort-game-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* モダンなフォント */
    text-align: center;
    margin: 40px auto; /* 上下の余白を増やす */
    padding: 30px;
    background-color: #ffffff;
    border-radius: 12px; /* 角を丸く */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); /* 柔らかい影 */
    max-width: 800px;
    position: relative;
    overflow: hidden; /* 子要素の影がはみ出さないように */
}

h2 {
    color: #333;
    margin-bottom: 25px;
    font-size: 2.2em;
    font-weight: 600;
}

/* ゲーム説明エリア */
#game-description {
    padding: 20px;
    background-color: #e8f5e9; /* 柔らかい緑の背景 */
    border-radius: 8px;
    margin-bottom: 30px;
    line-height: 1.6;
    color: #333;
    font-size: 1.1em;
}

#game-description p {
    margin-bottom: 10px;
}

/* ゲームエリア */
#game-area {
    width: 600px; /* ゲームエリアの幅 */
    height: 400px; /* ゲームエリアの高さ */
    border: 1px solid #ddd; /* 細いボーダー */
    margin: 20px auto;
    position: relative;
    background-color: #f8f8f8; /* 明るい背景 */
    overflow: hidden;
    border-radius: 8px; /* 角を丸く */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05); /* 内側の影 */
}

/* 数字ボックス */
.number-box {
    position: absolute;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    background-color: #66bb6a; /* アクセントカラーの緑 */
    color: white;
    font-size: 24px; /* 数字を大きく */
    font-weight: 700; /* 太字 */
    border: 2px solid #4285F4; /* はっきりと見える青い枠線を追加 */
    border-radius: 8px; /* 角を丸く */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* 影 */
    cursor: pointer;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease, transform 0.1s ease; /* アニメーションを滑らかに */
}

.number-box:hover {
    background-color: #4caf50; /* ホバー時の色 */
    transform: translateY(-2px); /* 少し浮き上がる */
}

.number-box.correct {
    background-color: #42a5f5; /* 正解時の青 */
    box-shadow: 0 4px 8px rgba(66, 165, 245, 0.4);
}

.number-box.wrong {
    background-color: #ef5350; /* 不正解時の赤 */
    box-shadow: 0 4px 8px rgba(239, 83, 80, 0.4);
    animation: shake 0.3s; /* 揺れるアニメーション */
}

/* 揺れるアニメーション */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}

/* ボタン */
#start-game-button {
    padding: 12px 28px;
    font-size: 1.2em;
    cursor: pointer;
    background-color: #2196F3; /* 青色 */
    color: white;
    border: none;
    border-radius: 8px; /* 角を丸く */
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
    margin-top: 20px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

#start-game-button:hover {
    background-color: #1976D2; /* ホバー時の色 */
    box-shadow: 0 6px 12px rgba(33, 150, 243, 0.4);
}

/* タイム表示 */
p#game-time { /* pタグにIDを付与 */
    font-size: 2.5em;
    font-weight: 700;
    color: #424242;
    margin-top: 25px;
}

/* ランキングボード */
#ranking-board {
    margin-top: 40px;
    border-top: 1px solid #eee;
    padding-top: 30px;
}

#ranking-board h3 {
    font-size: 1.8em;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

#ranking-list {
    list-style: none;
    padding: 0;
    max-width: 450px; /* 幅を少し広げる */
    margin: 0 auto;
}

#ranking-list li {
    background-color: #f5f5f5; /* 明るい背景 */
    margin-bottom: 10px;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.1em;
    color: #555;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

#ranking-list li:nth-child(odd) {
    background-color: #eceff1; /* 奇数行の背景色 */
}

#ranking-list li:hover {
    background-color: #e0e0e0;
}

#ranking-list li:first-child {
    background-color: #ffeb3b; /* 1位の背景色 */
    font-weight: 700;
    color: #333;
    box-shadow: 0 4px 8px rgba(255, 235, 59, 0.4);
}

#ranking-list li:nth-child(2) {
    background-color: #bdbdbd; /* 2位の背景色 */
    font-weight: 600;
    color: #444;
}

#ranking-list li:nth-child(3) {
    background-color: #ffcc80; /* 3位の背景色 */
    font-weight: 600;
    color: #444;
}