/* styles for jukugo-quiz game */
body {
    background: #fafafa;
    font-family: Meiryo, "ヒラギノ角ゴ ProN", sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
}

#page-header {
    width: 360px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 18px;
}

#page-title {
    font-weight: bold;
}

#home-link {
    text-decoration: none;
    font-size: 20px;
}

#page-footer {
    width: 360px;
    margin: 20px auto 0;
    text-align: center;
    font-size: 12px;
    color: #666;
}

#page-footer a {
    color: inherit;
    text-decoration: none;
}

#page-footer a:hover {
    text-decoration: underline;
}

#game {
    width: 360px;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-align: center;
    margin: 0 auto 20px;
    /* center and separate from description */
}

#status {
    margin-bottom: 12px;
    font-size: 14px;
    color: #555;
}

/* ensure game and description stack vertically */
#description {
    width: 360px;
    margin: 0 auto;
    text-align: center;
    padding: 10px 0;
}

#question {
    font-size: 48px;
    margin: 20px 0;
}

/* tablet size increase */
@media (min-width: 768px) and (max-width: 1024px) {
    #question {
        font-size: 60px;
    }

    .choice {
        width: 90px;
        height: 90px;
        line-height: 90px;
        font-size: 36px;
    }
}

.choice {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 8px;
    border: 2px solid #888;
    border-radius: 8px;
    font-size: 32px;
    cursor: pointer;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    transition: background .2s, border-color .2s;
}

.choice.disabled {
    cursor: default;
    opacity: 0.4;
}

.choice:hover {
    background: #eee;
}

#message {
    height: 24px;
    margin-top: 12px;
    font-weight: bold;
}

.correct-bg {
    animation: flashGreen 0.6s forwards;
}

.wrong-bg {
    animation: flashRed 0.6s forwards;
}

@keyframes flashGreen {
    0% {
        background: #fff;
    }

    50% {
        background: #c8e6c9;
    }

    100% {
        background: #fff;
    }
}

@keyframes flashRed {
    0% {
        background: #fff;
    }

    50% {
        background: #ffcdd2;
    }

    100% {
        background: #fff;
    }
}