/* 全体設定 */
body {
    font-family: Arial, sans-serif;
    background: #f0f8ff;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
}

#game-container {
    text-align: center;
    width: 80%; /* 横幅固定 */
    max-width: 600px; /* 最大幅指定 */
    min-width: 300px; /* 最小幅指定 */
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

#message-area {
    min-height: 80px;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 20px;
    overflow: hidden;
}

#options-container {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
}

button {
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    background-color: #007BFF;
    color: white;
    transition: transform 0.2s, background-color 0.3s;
}

button:hover {
    background-color: #0056b3;
    transform: scale(1.1);
}

button.correct {
    background-color: #28a745 !important;
    color: white;
}

button.wrong {
    background-color: #dc3545 !important;
    color: white;
}

.hidden {
    display: none;
}

/* アニメーション用コンテナ */
#animation-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

/* ポップアップアニメーション */
.popup {
    position: absolute;
    width: 20%; /* 画像をさらに大きく */
    max-width: 150px; /* 最大サイズ指定 */
    height: auto;
    animation: flyAround 3s ease-in-out forwards;
    opacity: 0;
}

@keyframes flyAround {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    10% {
        transform: translate(0, 0) scale(1.5); /* 少し拡大して静止 */
    }
    20% {
        transform: translate(0, 0) scale(1);
    }
    100% {
        transform: translate(var(--end-x), var(--end-y)) scale(0.8);
        opacity: 0;
    }
}
