* {
    margin: 0;
    padding: 0;
    list-style: none;
    text-decoration: none;
    box-sizing: border-box;
    text-align: center;
    font-family: sans-serif;
}
body {
    background: gold;
    overflow: hidden;
    display: grid;
}
h1 {
    position: absolute;
    top: 15px;
    background: grey;
    outline: 3px solid whitesmoke;
    color: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow:
        inset -5px -5px 15px darkgrey,
        inset 5px 5px 15px whitesmoke;
}
main {
    display: flex;
    justify-content: center;
    justify-items: center;
    align-items: center;
    flex-direction: column;
    width: 90vw;
    height: 90vh;
    place-self: center;
    background: darkgreen;
    background-image: radial-gradient(
        circle,
        rgba(255, 255, 255, 0.2) 5px,
        transparent 5px
    );
    outline: 13px solid saddlebrown;
    border-radius: 2px;
    background-size: 20px 20px;
    box-shadow:
        inset 5px 5px 15px rgba(0, 0, 0, 0.6),
        inset -5px -5px 15px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
    padding: 10px;
    margin: 10px 20px;
    position: relative;
    top: 10px;
}
strong {
    text-shadow: 5px 2px 0 red;
    font-weight: 900;
    color: black;
}
.kotak-permainan {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    width: 300px;
    background: ghostwhite;
    padding: 10px;
    margin: 20px auto;
    border-radius: 10px;
    outline: 5px solid yellowgreen;
    box-shadow:
        inset 5px 5px 15px rgba(0, 0, 0, 0.6),
        inset -5px -5px 15px rgba(255, 255, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.8);
}
.kartu-permainan {
    margin: 1px auto;
    width: 75px;
    height: 100px;
    background: url("../media/backcard.webp") no-repeat center center / cover;
    border-radius: 3px;
    outline: 3px solid rgb(0, 100, 0);
    transition: transform 0.8s;
}
.perhitungan {
    width: 300px;
    padding: 10px;
    margin: 15px auto;
    display: flex;
    gap: 10px;
    border: 2px solid seagreen;
    border-radius: 10px;
    background: greenyellow;
    position: absolute;
    top: 85px;
    justify-content: center;
    align-items: center;
    box-shadow:
        inset -5px -5px 10px #6b9e00,
        inset 5px 5px 10px #d4ff66,
        0 10px 30px rgba(0, 0, 0, 0.8);
}
#skor,
#win {
    width: 100px;
    height: 50px;
    background: whitesmoke;
    border: 2px solid blue;
    display: inline-block;
    border-radius: 10px;
    font-size: 2rem;
    line-height: 50px;
    font-weight: 800;
}
#status {
    display: inline-block;
    padding: 10px;
    margin: 10px auto;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}
.mulailagi {
    opacity: 0;
    border: 2px solid yellow;
    background: rgb(223, 223, 32);
    padding: 10px;
    margin: 10px auto;
    border-radius: 10px;
    font-size: 1.5rem;
    font-weight: bold;
}
.kotak p {
    font-weight: 900;
    font-size: 1.5rem;
}
.kalah {
    outline: 5px solid red;
    background: rgb(255, 0, 0);
}
.menang {
    outline: 5px solid green;
    background: rgb(0, 255, 0);
}
.op {
    opacity: 0.3;
}
.kondisi {
    width: 90vw;
    height: 92vh;
    top: 10;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 5px;
    position: absolute;
    z-index: -1;
    opacity: 0;
}
.bantuan {
    width: 300px;
    display: grid;
    gap: 10px;
    background: greenyellow;
    outline: 2px solid greenyellow;
    padding: 10px;
    border-radius: 10px;
    box-shadow:
        inset -5px -5px 10px #6b9e00,
        inset 5px 5px 10px #d4ff66,
        0 10px 30px rgba(0, 0, 0, 0.8);
    position: absolute;
    bottom: 55px;
}
.bantuan h3 {
    padding: 10px;
    color: white;
    background: green;
    font-size: 2rem;
    border-radius: 5px;
    box-shadow:
        inset -8px -8px 20px rgba(0, 0, 0, 0.5),
        inset 8px 8px 20px rgba(255, 255, 255, 0.3);
}
.tombol_bantuan {
    display: flex;
    gap: 10px;
    justify-content: space-evenly;
}
.tombol {
    display: inline-block;
    padding: 20px;
    outline: 2px solid yellowgreen;
    border-radius: 15px;
    background: grey;
    box-shadow:
        inset -5px -5px 15px darkgrey,
        inset 5px 5px 15px rgba(0, 0, 0, 0.2);
}
.help-blink {
    animation: blink 1s;
    animation-iteration-count: 10;
}
.muncul {
    z-index: 1;
    opacity: 1;
}

.kunci {
    pointer-events: none;
}

.flip {
    transform: rotateY(180deg);
}
.bahaya {
    outline: 3px solid red;
}
.highscore-box {
    position: absolute;
    top: 15px;
    left: 25px;
    background: greenyellow;
    padding: 8px 15px;
    border-radius: 10px;
    border: 2px solid seagreen;
    box-shadow:
        inset -5px -5px 10px #6b9e00,
        inset 5px 5px 10px #d4ff66,
        0 5px 15px rgba(0, 0, 0, 0.5);
}
.highscore-box p {
    font-size: 0.9rem;
    font-weight: 900;
    color: darkgreen;
}
#highscore {
    width: 50px;
    height: 20px;
    background: whitesmoke;
    border: 2px solid blue;
    display: inline-block;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 18px;
    font-weight: 900;
}
.nama-player-box {
    position: absolute;
    top: 15px;
    right: 5px;
    background: greenyellow;
    padding: 15px;
    border-radius: 10px;
    border: 2px solid seagreen;
    box-shadow:
        inset -5px -5px 10px #6b9e00,
        inset 5px 5px 10px #d4ff66,
        0 5px 15px rgba(0, 0, 0, 0.5);
}
#nama-player {
    font-size: 1.2rem;
    font-weight: 900;
    color: black;
    background: white;
    padding: 5px;
    outline: 2px solid blue;
    border-radius: 10px;
}
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}
.modal-nama {
    background: greenyellow;
    border-radius: 15px;
    padding: 30px 25px;
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    outline: 4px solid seagreen;
    box-shadow:
        inset -5px -5px 10px #6b9e00,
        inset 5px 5px 10px #d4ff66,
        0 10px 30px rgba(0, 0, 0, 0.8);
}
.modal-nama h2 {
    font-size: 1.8rem;
    color: darkgreen;
    font-weight: 900;
}
.modal-nama input {
    padding: 10px;
    border-radius: 10px;
    border: 2px solid seagreen;
    font-size: 1.2rem;
    font-weight: bold;
    outline: none;
    text-align: center;
}
.modal-nama input:focus {
    border-color: green;
    box-shadow: 0 0 8px greenyellow;
}
.modal-nama button {
    padding: 12px;
    border-radius: 10px;
    border: 2px solid yellow;
    background: rgb(223, 223, 32);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow:
        inset -3px -3px 8px rgba(0, 0, 0, 0.2),
        inset 3px 3px 8px rgba(255, 255, 255, 0.4);
}
.tombol {
    position: relative;
}
.limit-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: red;
    color: white;
    font-size: 0.75rem;
    font-weight: 900;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    pointer-events: none;
}
.tombol.habis {
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

@keyframes blink {
    0% {
        outline: 10px solid red;
    }
    25% {
        outline: 10px solid red;
    }
    25% {
        outline: 10px solid greenyellow;
    }
    100% {
        outline: 10px solid greenyellow;
    }
}
