/* Allgemeines Styling */
body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #fdf1dc;
    margin: 0;
    padding: 20px;
}

/* Spielinformationen */
.game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 18px;
    margin-bottom: 20px;
}

#reset {
    padding: 8px 16px;
    font-size: 16px;
    background-color: #8b4513;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

#reset:hover {
    background-color: #a0522d;
}

/* Spielfeld */
.memory-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 420px;
    margin: 20px auto;
}

/* Karten-Design */
.card {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    perspective: 1000px;
    cursor: pointer;
}

/* Karten-Inhalt */
.card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.5s ease;
}

/* Umdreh-Effekt */
.card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* Vorder- und Rückseite */
.card-front, .card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 10px;
}

/* Kartenvorderseite mit Bild */
.card-front {
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(180deg);
}

.card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

/* Kartenrückseite */
.card-back {
    background-color: #8b4513;
    transform: rotateY(0deg);
}

/* Leaderboard */
.leaderboard {
    margin-top: 20px;
    text-align: left;
    max-width: 300px;
    margin: 20px auto;
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}

.leaderboard h2 {
    margin: 0;
    font-size: 18px;
}

.leaderboard ul {
    list-style: none;
    padding: 0;
}

.leaderboard li {
    padding: 5px;
    border-bottom: 1px solid #ddd;
}

.leaderboard li:last-child {
    border-bottom: none;
}
