/* ベーススタイル */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

#game-container {
    text-align: center;
    max-width: 90%;
    width: 500px;
}

#message-area {
    font-size: 24px;
    text-align: center;
    margin: 10px 0;
    height: 40px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.default-message {
    color: black; /* 「たべられるものをみつけてね！」は黒字 */
}

#streak-container {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    margin: 10px 0;
}

#images-area {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    justify-content: center;
    margin-top: 20px;
}

.image {
    width: 100px;
    height: 100px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.image.grayed-out {
    opacity: 0.5;
    pointer-events: none;
}

#restart-button {
    font-size: 18px;
    padding: 10px 20px;
    margin-top: 20px;
    cursor: pointer;
}

/* 正解演出 */
.star {
    position: absolute;
    background-size: cover;
    background-position: center;
    pointer-events: none;
    z-index: 999;
    animation: move-out 2s ease, fade-out 2s ease;
}

/* 虹色のアニメーション */
.rainbow-text {
    animation: rainbow 1.5s infinite linear;
}

@keyframes rainbow {
    0% { color: red; }
    16% { color: orange; }
    32% { color: yellow; }
    48% { color: green; }
    64% { color: blue; }
    80% { color: indigo; }
    100% { color: violet; }
}

@keyframes move-out {
    from {
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        transform: translate(-50%, calc(-100vh)) scale(2);
    }
}

@keyframes fade-out {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}
