body {
    font-family: 'Arial', sans-serif;
    text-align: center;
    margin: 0;
    padding: 0;
    background-color: #f0f8ff;
}

#count-container {
    font-size: 20px;
    margin: 10px 0;
}

#message-container {
    font-size: 24px;
    height: 40px;
    line-height: 40px;
    color: #333;
}

#game-container {
    display: flex;
    flex-direction: column; /* 縦並びに変更 */
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 400px; /* 横幅400px */
    height: 400px; /* 高さは可変だが、縦に並ぶため十分な高さ */
    margin: 20px auto;
}

.square {
    width: 300px;  /* 幅60px */
    height: 100px; /* 高さ60px */
    border: 2px solid #333;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    background-color: white;
    transition: transform 0.2s;
    cursor: grab;
    margin: 0;
}

.square img {
    object-fit: contain;
    width: auto;
    height: 50px;
}

#button-container {
    margin: 20px;
}

button {
    font-size: 18px;
    padding: 10px 20px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #45a049;
}

#message-container.correct {
    color: #00cc00;
    animation: rainbow 1s infinite;
}

#message-container.wrong {
    color: #ff0000;
}

@keyframes rainbow {
    0% { color: red; }
    25% { color: orange; }
    50% { color: yellow; }
    75% { color: green; }
    100% { color: blue; }
}

@keyframes shake {
    0%, 100% { transform: translateY(0); }
    25% { transform: translateY(-10px); }
    75% { transform: translateY(10px); }
}

/* 画面を揺らすアニメーション */
@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    50% { transform: translateX(10px); }
    75% { transform: translateX(-10px); }
    100% { transform: translateX(10px); }
}

/* 揺れるアニメーションを適用 */
.shake {
    animation: shake 0.5s ease-in-out;
    animation-iteration-count: 1;
}

/* 他のスタイルは変更なし */
