.ielts-bp-game {
    margin: 0 auto 40px auto;
    padding: 18px;
    border-radius: 14px;
    background-color: #fff4f6;
    color: black;
}

.ielts-bp-game [hidden] {
    display: none !important;
}

.ielts-bp-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.ielts-bp-game .ielts-bp-source {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: rgb(80, 80, 80);
}

.ielts-bp-source a {
    color: #006666;
    text-decoration: underline;
}

.ielts-bp-game .ielts-bp-help {
    margin: 0 0 14px 0;
    font-size: 16px;
    line-height: 1.5;
}

.ielts-bp-hud {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
}

.ielts-bp-hearts {
    font-size: 22px;
    letter-spacing: 2px;
    color: #c8193c;
}

.ielts-bp-game .ielts-bp-clue {
    min-height: 54px;
    margin: 0 0 10px 0;
    padding: 10px 14px;
    font-size: 17px;
    line-height: 1.5;
    background-color: white;
    border-left: 4px solid #e85d8a;
    border-radius: 10px;
}

.ielts-bp-stage {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    user-select: none;
    -webkit-user-select: none;
}

.ielts-bp-start {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.35);
}

.ielts-bp-game .ielts-bp-start-button,
.ielts-bp-game .ielts-bp-start-button:focus,
.ielts-bp-game .ielts-bp-new,
.ielts-bp-game .ielts-bp-new:focus {
    margin: 0;
    padding: 8px 20px;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.4;
    text-transform: none;
    color: white;
    background-color: teal;
    border: 1px solid teal;
    border-radius: 999px;
    box-shadow: none;
    cursor: pointer;
}

.ielts-bp-game .ielts-bp-start-button,
.ielts-bp-game .ielts-bp-start-button:focus {
    padding: 12px 40px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.ielts-bp-game .ielts-bp-start-button:hover,
.ielts-bp-game .ielts-bp-new:hover {
    color: white;
    background-color: #0a6b6b;
    border: 1px solid #0a6b6b;
}

.ielts-bp-game .ielts-bp-new:disabled,
.ielts-bp-game .ielts-bp-new:disabled:hover {
    color: white;
    background-color: #5c9c9c;
    border: 1px solid #5c9c9c;
    cursor: wait;
}

.ielts-bp-game .ielts-bp-start-button:focus-visible,
.ielts-bp-game .ielts-bp-new:focus-visible {
    outline: 2px solid black;
    outline-offset: 2px;
}

.ielts-bp-game .ielts-bp-status {
    min-height: 24px;
    margin: 10px 0 0 0;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.5;
    text-align: center;
    color: #1d6a39;
}

.ielts-bp-done {
    margin-top: 12px;
    padding: 18px;
    text-align: center;
    background-color: white;
    border: 2px solid #9fd8c5;
    border-radius: 14px;
}

.ielts-bp-game .ielts-bp-done-text {
    margin: 0 0 12px 0;
    font-size: 20px;
    font-weight: bold;
    line-height: 1.5;
}

.ielts-bp-recap {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.ielts-bp-game .ielts-bp-recap-heading {
    margin: 0;
    font-size: 18px;
    font-weight: bold;
    line-height: 1.5;
}

.ielts-bp-card {
    padding: 12px 16px;
    background-color: white;
    border-left: 4px solid teal;
    border-radius: 10px;
}

.ielts-bp-game .ielts-bp-card p {
    margin: 0;
    line-height: 1.5;
}

.ielts-bp-game .ielts-bp-card .ielts-bp-card-term {
    font-size: 17px;
}

.ielts-bp-card-meta {
    margin-left: 4px;
    font-size: 14px;
    color: rgb(80, 80, 80);
}

.ielts-bp-game .ielts-bp-card .ielts-bp-card-meaning {
    margin-top: 2px;
    font-size: 15px;
}

.ielts-bp-game .ielts-bp-card .ielts-bp-card-example {
    margin-top: 4px;
    font-size: 15px;
    font-style: italic;
    color: rgb(70, 70, 70);
}

.ielts-bp-stage {
    height: 440px;
    background: linear-gradient(#a9dcff, #eaf7ff);
    touch-action: manipulation;
}

.ielts-bp-stage::before,
.ielts-bp-stage::after {
    content: "";
    position: absolute;
    width: 90px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    box-shadow: 30px -12px 0 6px rgba(255, 255, 255, 0.85);
}

.ielts-bp-stage::before {
    top: 60px;
    left: 8%;
}

.ielts-bp-stage::after {
    top: 190px;
    right: 14%;
}

.ielts-bp-game .ielts-bp-balloon,
.ielts-bp-game .ielts-bp-balloon:focus,
.ielts-bp-game .ielts-bp-balloon:hover {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    width: 104px;
    height: 122px;
    margin: 0;
    padding: 0;
    color: black;
    background: transparent;
    border: none;
    box-shadow: none;
    cursor: pointer;
}

.ielts-bp-game .ielts-bp-balloon:disabled {
    color: black;
    background: transparent;
    border: none;
    cursor: default;
}

.ielts-bp-balloon::after {
    content: "";
    position: absolute;
    top: 122px;
    left: 50%;
    width: 2px;
    height: 44px;
    background-color: rgba(0, 0, 0, 0.25);
}

.ielts-bp-skin {
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    padding: 8px;
    font-size: 15px;
    font-weight: bold;
    line-height: 1.2;
    text-align: center;
    word-break: break-word;
    color: black;
    background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 32%), var(--bp-color);
    border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
    box-shadow: inset -6px -8px 0 rgba(0, 0, 0, 0.06);
}

.ielts-bp-color-0 { --bp-color: #ffb3c6; }
.ielts-bp-color-1 { --bp-color: #ffe08a; }
.ielts-bp-color-2 { --bp-color: #a8d8ff; }
.ielts-bp-color-3 { --bp-color: #bdebbd; }

.ielts-bp-balloon:hover .ielts-bp-skin {
    filter: brightness(1.05);
}

.ielts-bp-balloon:focus-visible .ielts-bp-skin {
    outline: 3px solid black;
    outline-offset: 2px;
}

.ielts-bp-balloon.is-leaving {
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ielts-bp-balloon.is-popping::after {
    display: none;
}

.ielts-bp-balloon.is-popping .ielts-bp-skin {
    animation: ielts-bp-pop 0.35s forwards;
}

.ielts-bp-balloon.is-right .ielts-bp-skin {
    background: #7fd89a;
}

.ielts-bp-balloon.is-wrong .ielts-bp-skin {
    background: #cfcfcf;
}

@keyframes ielts-bp-pop {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.9; }
    100% { transform: scale(1.6); opacity: 0; }
}

@media (max-width: 560px) {
    .ielts-bp-game {
        padding: 12px;
    }

    .ielts-bp-stage {
        height: 400px;
    }

    .ielts-bp-game .ielts-bp-balloon,
    .ielts-bp-game .ielts-bp-balloon:focus,
    .ielts-bp-game .ielts-bp-balloon:hover {
        width: 80px;
        height: 98px;
    }

    .ielts-bp-balloon::after {
        top: 98px;
    }

    .ielts-bp-skin {
        padding: 6px;
        font-size: 13px;
    }
}
