/* =========================
   Spiel Marienkäfer zählen
=========================*/

.spiel {
    max-width: 900px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    text-align: center;
}

h1 {
    margin-top: 0;
    color: #d62828;
    font-size: 2.2rem;
}

.untertitel {
    font-size: 1.4rem;
    margin-bottom: 20px;
}

/* Wiese */
.wiese {
    position: relative;
    height: 360px;
    overflow: hidden;
    border-radius: 20px;
    background:
        linear-gradient(to bottom,
            #8ed6ff 0%,
            #c8efff 48%,
            #7ed957 49%,
            #4caf50 100%);
    margin-bottom: 25px;
    border: 4px solid #65a944;
}

/* Wolken */
.wolke {
    position: absolute;
    background: white;
    border-radius: 50px;
    width: 100px;
    height: 35px;
    opacity: 0.9;
}

.wolke::before,
.wolke::after {
    content: "";
    position: absolute;
    background: white;
    border-radius: 50%;
}

.wolke::before {
    width: 45px;
    height: 45px;
    left: 15px;
    top: -20px;
}

.wolke::after {
    width: 55px;
    height: 55px;
    right: 10px;
    top: -25px;
}

.wolke1 {
    top: 45px;
    left: 8%;
}

.wolke2 {
    top: 90px;
    right: 10%;
    transform: scale(0.7);
}

/* Marienkäfer */
.marienkaefer {
    position: absolute;
    width: 58px;
    height: 58px;
    background: #e52521;
    border-radius: 50%;
    border: 3px solid #111;
    cursor: default;
    animation: schweben 2s ease-in-out infinite;
}

.marienkaefer::before {
    content: "";
    position: absolute;
    width: 4px;
    height: 52px;
    background: #111;
    left: 24px;
    top: 0;
}

/* Kopf */
.marienkaefer::after {
    content: "";
    position: absolute;
    width: 23px;
    height: 23px;
    background: #111;
    border-radius: 50%;
    top: -10px;
    left: 15px;
}

/* Punkte */
.punkt {
    position: absolute;
    width: 9px;
    height: 9px;
    background: #111;
    border-radius: 50%;
}

.p1 {
    left: 10px;
    top: 14px;
}

.p2 {
    right: 10px;
    top: 14px;
}

.p3 {
    left: 9px;
    bottom: 12px;
}

.p4 {
    right: 9px;
    bottom: 12px;
}

@keyframes schweben {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

/* Antwortbereich */
.frage {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 15px 0;
}

.antworten {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

.zahl {
    width: 65px;
    height: 65px;
    border: none;
    border-radius: 20px;
    background: #ffd166;
    color: #333;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 5px 0 #d6a900;
    transition: transform 0.15s, background 0.15s;
}

.zahl:hover {
    transform: translateY(-3px) scale(1.05);
    background: #ffe28a;
}

.zahl:active {
    transform: translateY(3px);
    box-shadow: 0 2px 0 #d6a900;
}

/* Ergebnis */
#ergebnis {
    min-height: 55px;
    margin-top: 20px;
    font-size: 1.4rem;
    font-weight: bold;
}

.richtig {
    color: #2e8b57;
}

.falsch {
    color: #e67e22;
}

/* Neues Spiel */
#neu_kaefer {
    margin-top: 10px;
    padding: 13px 25px;
    border: none;
    border-radius: 15px;
    background: #4caf50;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
}

#neu_kaefer:hover {
    background: #3d9141;
}

/* Sterne 
.sterne {
  font-size: 2rem;
  margin-top: 10px;
}
*/
@media (max-width: 600px) {

    .spiel {
        margin: 10px;
        padding: 15px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .wiese {
        height: 330px;
    }

    .zahl {
        width: 65px;
        height: 65px;
    }
}