/* Importiere die Noto Sans Schriftart von Google Fonts. Das stylesheet ist jetzt kommentiert und wird vielleicht gleich minimiert. */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans:wght@400;700&display=swap');

/* Grundlegende Styles für body und html */
body,
html {
    margin: 0;
    padding: 0;
    font-family: 'Noto Sans', sans-serif;
    height: 100%;
    background-color: #f0f0f0;
}

/* Container für die gesamte Seite */
.page-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Haupt-Container für den Karteninhalt */
.card-container {
    background-color: white;
    padding: 20px 30px 20px 30px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    max-width: 90%;
    width: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

/* Styles für die Sprachauswahl */
.language-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-bottom: 0px;
    font-size: 28px;
}

.language-switch span {
    cursor: pointer;
}

/* Styles für das Kartenbild */
.card-image {
    max-width: 100%;
    height: auto;
    max-height: 60vh;
    object-fit: contain;
    margin: 10px 0;
}

/* Styles für den Titel */
.title {
    font-size: 28px;
    text-align: center;
    color: #000;
    margin: 0;
    padding-top: 0px;
}

/* Styles für den Copyright-Text */
.copyright {
    font-size: 12px;
    color: #666;
    text-align: center;
    margin-top: 10px;
}

/* Allgemeine Textformatierungen */
h1 {
    font-size: 32px;
    color: #88181A;
    margin: 0;
}

h2 {
    color: #88181A;
    font-size: 20px;
}

p {
    font-size: 20px;
    color: #000;
    margin: 0;
}

/* Styles für die Flaggen */
.flag {
    width: 30px;
    height: 20px;
    display: inline-block;
    margin: 0;
    border: 1px solid #ddd;
    cursor: pointer;
}

/* Spezifische Styles für einzelne Flaggen */
.de-flag { background: linear-gradient(to bottom, #000 33%, #DD0000 33%, #DD0000 66%, #FFCE00 66%); }

/* Komplexer Aufbau für die englische Flagge */
.en-flag {
    background-color: #fff;
    position: relative;
    overflow: hidden;
}

.en-flag .x {
    display: grid;
    grid-template: 1fr 1fr / 1fr 1fr;
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Einzelne Teile der englischen Flagge */
.en-flag .x div:nth-child(1) {
    background: linear-gradient(27deg, #012169 30.2%, #fff 30.2%, #fff 34.9%, #c8102e 34.9%, #c8102e 44.8%, #fff 44.8%, #fff 59.7%, #012169 59.7%);
    margin: 0 15.4% 15.6% 0;
}

.en-flag .x div:nth-child(2) {
    background: linear-gradient(-27deg, #012169 30.2%, #fff 30.2%, #fff 45.1%, #c8102e 45.1%, #c8102e 55%, #fff 55%, #fff 59.7%, #012169 59.7%);
    margin: 0 0 15.6% 15.4%;
}

.en-flag .x div:nth-child(3) {
    background: linear-gradient(-27deg, #012169 40.3%, #fff 40.3%, #fff 45%, #c8102e 45%, #c8102e 54.9%, #fff 54.9%, #fff 69.8%, #012169 69.8%);
    margin: 15.6% 15.4% 0 0;
}

.en-flag .x div:nth-child(4) {
    background: linear-gradient(27deg, #012169 40.3%, #fff 40.3%, #fff 55.2%, #c8102e 55.2%, #c8102e 65.1%, #fff 65.1%, #fff 69.8%, #012169 69.8%);
    margin: 15.6% 0 0 15.4%;
}

.en-flag .plus {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
}

.en-flag .plus div {
    position: absolute;
    background: #c8102e;
}

.en-flag .plus div:nth-child(1) {
    top: 0;
    height: 100%;
    left: 50%;
    transform: translatex(-50%);
    width: 9.8%;
}

.en-flag .plus div:nth-child(2) {
    top: 50%;
    width: 100%;
    left: 0;
    transform: translatey(-50%);
    height: 10%;
}

/* Styles für weitere Flaggen */
.fr-flag { background: linear-gradient(to right, #0055A4 33%, #FFFFFF 33%, #FFFFFF 66%, #EF4135 66%); }
.es-flag { background: linear-gradient(to bottom, #AA151B 25%, #F1BF00 25%, #F1BF00 75%, #AA151B 75%); }
.it-flag { background: linear-gradient(to right, #009246 33%, #FFFFFF 33%, #FFFFFF 66%, #CE2B37 66%); }
.ja-flag { background: white; position: relative; }
.ja-flag::after { content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; background: #BC002D; border-radius: 50%; }
.nl-flag { background: linear-gradient(to bottom, #AE1C28 33%, #FFFFFF 33%, #FFFFFF 66%, #21468B 66%); }
.ru-flag { background: linear-gradient(to bottom, #FFFFFF 33%, #0039A6 33%, #0039A6 66%, #D52B1E 66%); }

/* Fade-Effekt für sanfte Übergänge */
.fade {
    opacity: 0;
    transition: opacity 0.1s ease-in-out;
}

.fade-in {
    opacity: 1;
}

/* Media Query für Landscape-Orientierung auf mobilen Geräten */
@media (max-width: 780px) and (orientation: landscape) {
    .page-container {
        align-items: flex-start;
        padding: 10px;
    }
    .card-container {
        max-height: 100%;
        overflow-y: auto;
        padding: 10px 20px;
        max-width: 90%;
    }
    .card-image {
        max-height: 100%;
        max-width: 100%;
        margin: 10px 0;
    }
    .title {
        font-size: 32px;
        margin: -10px 0 0 0;
    }
    h1 {
        font-size: 32px;
        margin: 0;
    }
    h2 {
        font-size: 18px;
    }
    p {
        font-size: 20px;
        margin: 0;
    }
    .language-switch {
        font-size: 28px;
        margin: 5px 0 5px  0;
    }
    .copyright {
        margin-top: 10px;
    }
}

/* Media Query für sehr kleine Bildschirme */
@media (max-width: 320px) {
    .card-container {
        padding: 15px;
    }
    .title {
        font-size: 24px;
        margin: -10px 0 0 0;
    }
    h1 {
        font-size: 24px;
    }
    h2 {
        font-size: 18px;
    }
    p {
        font-size: 18px;
    }
    .language-switch {
        font-size: 24px;
        margin-bottom: 5px;
    }
    .flag {
        width: 25px;
        height: 15px;
        display: inline-block;
        margin: 0;
        border: 1px solid #ddd;
        cursor: pointer;
    }
}
