/* pick a category / general styles */
*
{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root
{
    --main-color:#00703c;
    --gold-color: #f0cb00;
    --hover-color: #2f4f4f;
    --skeleton-color: #94a3bb
}

body
{
    font-size: 1.3rem;
    background-color: #f5f5f5;
}

header
{
    background-color: var(--main-color);
    color: var(--gold-color);
    padding: 0.5rem;
    text-align: center;
}

header a
{
    text-decoration: none;
    color: inherit;
}

.card
{
    background-color: #fff;
    width: 90%;
    max-width: 700px;
    margin: 2rem auto;
    color: var(--hover-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    gap: 2rem;
    padding: 3rem 0;
    box-shadow: 0 5px 10px rgba(17, 12, 46, 0.8);
}

.card-header
{
    width: 90%;
    font-size: 2rem;
    font-weight: 900;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.card-body
{
    width: 90%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.category-item
{
    background-color: var(--main-color);
    color: #fff;
    height: 100px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

button
{
    font-size: inherit;
    border: none;
    background-color: var(--main-color);
    color: #fff;
    display: flex;
    padding: 0.9em;
    border-radius: 4px;
    gap: 1rem;
    justify-content: center;
    cursor: pointer;
    align-self: flex-end;
}

/* category card styles */
.category button
{
    grid-column: 1 / -1;
}


.category .card-body
{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, 130px);
    gap: 1rem;
    justify-content: center;
}

.category .card-header, .score .card-header
{
    justify-content: center;
}
/* question card */
.option-item
{
    background-color: var(--main-color);
    color: #fff;
    padding: 1rem;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.skeleton span
{
    width: 30%;
    height: 2rem;
}

.skeleton span, .skeleton .option-item, .skeleton button
{
    background-color: var(--skeleton-color);
}

.skeleton button
{
    width: 15%;
    height: 3rem;
}

/* score card */
.balloon
{
    display: inline-block;
    width: 96px;
    height: 116px;
    border-radius: 80%;
    background-color: #e14916;
    box-shadow: inset -10px -10px 0 rgba(0, 0, 0, 0.07);
    margin: 1rem;
    position: relative;
}
.balloon::before
{
    content: '\25B2';
    color: #e14916;
    position: absolute;
    bottom: -12px;
    left:35px;
}

.balloon::after
{
    height: 70px;
    width: 1px;
    content: '';
    background-color: rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    position: absolute;
    top: 120px;
    left: 45px;
    display: inline-block;
}

.balloon:nth-child(2)
{
    background-color: var(--gold-color);
    animation-duration: 3.5s;
}

.balloon:nth-child(2)::before
{
    color: var(--gold-color);
}

.balloon:nth-child(3)
{
    background-color: var(--main-color);
    animation-duration: 3s;
}

.balloon:nth-child(3)::before
{
    color: var(--main-color);
}

.score .card-body
{
    flex-direction: row;
}

.score-board
{
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stat
{
    background-color: var(--main-color);
    color: #fff;
    padding: 1rem;
    border: 4px;
}

.score button
{
    align-self: stretch;
}

/* hover effects + animations */
.category-item:hover, button:hover, .option-item:hover
{
    background-color: var(--hover-color);
}

.balloon
{
    animation: float 4s ease-in-out infinite;
}

.skeleton span, .skeleton .option-item, .skeleton button
{
    animation: flash 1s infinite linear alternate;
}

@keyframes flash 
{
    0%
    {
        opacity: 1;
    }
    100%
    {
        opacity: 0.5;
    }
}

@keyframes float
{
    0%, 100%
    {
        transform: translateY(0) rotate(-4deg)
    }
    50%
    {
        transform: translateY(-25px) rotate(4deg)
    }
}

/* js controlled styles */
.hidden
{
    display: none;
}

.selected
{
    background-color: var(--hover-color);
}

.correct::after
{
    content: '\2713';
    color: var(--gold-color);
    font-size: 1.5rem;
}

.wrong::after
{
    content: '\00D7';
    color: var(--gold-color);
    font-size: 1.5rem;
    font-weight: 800;
}