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

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

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

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

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

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

.ielts-sn-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-sn-hearts {
    font-size: 22px;
    letter-spacing: 2px;
    color: #c8193c;
}

.ielts-sn-game .ielts-sn-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 #2a9d8f;
    border-radius: 10px;
}

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

.ielts-sn-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-sn-game .ielts-sn-start-button,
.ielts-sn-game .ielts-sn-start-button:focus,
.ielts-sn-game .ielts-sn-new,
.ielts-sn-game .ielts-sn-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-sn-game .ielts-sn-start-button,
.ielts-sn-game .ielts-sn-start-button:focus {
    padding: 12px 40px;
    font-size: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

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

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

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

.ielts-sn-game .ielts-sn-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-sn-done {
    margin-top: 12px;
    padding: 18px;
    text-align: center;
    background-color: white;
    border: 2px solid #9fd8c5;
    border-radius: 14px;
}

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

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

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

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

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

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

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

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

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

.ielts-sn-slots {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    min-height: 40px;
    margin-bottom: 10px;
}

.ielts-sn-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 38px;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    color: black;
    background-color: #f7f7f7;
    border: 2px dashed #9fb8ad;
    border-radius: 8px;
}

.ielts-sn-slot.is-filled {
    background-color: #dcf3e2;
    border: 2px solid #5fb67a;
    animation: ielts-sn-pop 0.2s;
}

.ielts-sn-stage {
    max-width: 448px;
    margin: 0 auto;
    background-color: #eaf6ef;
    border: 3px solid #2a9d8f;
}

.ielts-sn-stage.is-hit {
    animation: ielts-sn-shake 0.3s;
}

.ielts-sn-board {
    display: block;
    width: 100%;
    height: auto;
    touch-action: none;
}

.ielts-sn-controls {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    grid-template-areas: ". up ." "left down right";
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
}

.ielts-sn-up { grid-area: up; }
.ielts-sn-left { grid-area: left; }
.ielts-sn-down { grid-area: down; }
.ielts-sn-right { grid-area: right; }

.ielts-sn-game .ielts-sn-turn,
.ielts-sn-game .ielts-sn-turn:focus {
    width: 56px;
    height: 46px;
    margin: 0;
    padding: 0;
    font-size: 22px;
    font-weight: bold;
    line-height: 1;
    color: white;
    background-color: teal;
    border: 1px solid teal;
    border-radius: 12px;
    box-shadow: none;
    cursor: pointer;
}

.ielts-sn-game .ielts-sn-turn:hover {
    color: white;
    background-color: #0a6b6b;
    border: 1px solid #0a6b6b;
}

.ielts-sn-game .ielts-sn-turn:focus-visible {
    outline: 2px solid black;
    outline-offset: 2px;
}

@keyframes ielts-sn-pop {
    from { transform: scale(0.8); }
    to { transform: scale(1); }
}

@keyframes ielts-sn-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

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

    .ielts-sn-slot {
        width: 30px;
        height: 34px;
        font-size: 18px;
    }
}
