/* Grundstil */
body {
    margin: 0;
    padding: 0;
    background-color: #f8f8f8;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    font-family: sans-serif;
}

/* Orientierungshinweis – standardmäßig ausgeblendet */
#orientation-hint {
    display: none;
}

/* Container für alle Karten */
.card-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

/* Wrapper für einzelne Karte inkl. Info */
.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Styling der Info (nur Flip-State) */
.card-info {
    margin-top: 10px;
    text-align: center;
}
.card-info > div {
    font-size: 16px;
}

/* Karte mit 3D-Perspektive */
.card {
    width: 100px;
    height: 150px;
    perspective: 1000px;
    cursor: pointer;
}
.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.card.flipped .card-inner {
    transform: rotateY(180deg);
}

/* Vorder- und Rückseite */
.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-sizing: border-box;
}
.card-front {
    background-color: #fff;
    display: grid;
    justify-items: center;
    align-items: center;
    padding: 10px;
}

/* Grid-Layouts je nach Anzahl der Punkte (falls Du diese Klassen dynamisch setzt) */
.card-front.dots-1 {
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
}
.card-front.dots-2 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 1fr;
}
.card-front.dots-4 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
}
.card-front.dots-8 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 1fr);
}

.card-back {
    background-color: #333;
    transform: rotateY(180deg);
    display: grid;
    place-items: center;
    color: #fff;
}

/* Dot-Styling für die Punkte (Kreise) */
.dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: #000;
    margin: 2px;
}

/* Gesamtsummen-Bereich */
#totals {
    margin-top: 30px;
    text-align: center;
}
#totals > div {
    font-size: 18px;
    margin: 5px 0;
}

/* Link-Container */
#link-container {
    margin-top: 20px;
}

/* ------------------------- */
/* Media Queries */

/* Hinweis bei Portrait-Ausrichtung (nicht Querformat) */
@media (orientation: portrait) {
    #orientation-hint {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: rgba(255, 255, 0, 0.9);
        color: #000;
        padding: 10px;
        text-align: center;
        font-weight: bold;
        z-index: 1000;
    }
    .card-container,
    #totals,
    #link-container {
        display: none;
    }
}

/* Für sehr kleine Displays (z. B. unter 480px) */
@media (max-width: 480px) {
    .card {
        width: 80px;
        height: 120px;
    }
    .card-front {
        padding: 5px;
        font-size: 16px;
    }
    .dot {
        width: 10px;
        height: 10px;
        margin: 1px;
    }
}

/* Für größere Bildschirme (z. B. ab 1024px) */
@media (min-width: 1024px) {
    .card {
        width: 150px;
        height: 225px;
    }
    .card-front {
        padding: 15px;
        font-size: 28px;
    }
}
