body {
    overflow: hidden;
}

#header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    text-align: center;
    color: rgb(255, 106, 0);
    background-color: #b4d2ff;
    font-size: 70px;
    font-family: "Ultra", serif;
    font-weight: 400;
    font-style: normal;
    padding-top: 10px;
}

#allLections {
    font-family: "Parkinsans", serif;
    font-style: normal;
    margin: 150px 20px 20px 20px;
    display: flex;
    gap: 20px;
    width: auto;
    height: calc(100vh - 150px);
    overflow-x: auto;
    overflow-y: hidden;
    align-items: flex-start;
    position: relative;
}

.lection {
    margin: 10px 20px;
    flex-shrink: 0;
    width: 430px;
    max-height: 95%;
    overflow-y: auto;
    border-radius: 15px;
    background-color: rgb(180, 210, 255);
    padding: 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h2 {
    text-align: center;
    color: rgb(255, 106, 0);
    font-family: "Ultra", serif;
    font-weight: 200;
    padding-top: 10px;
}

h5 {
    text-align: center;
    font-family: "Ultra", serif;
    font-weight: 400;
}

.accordion-body {
    max-width: 100%;
    box-sizing: border-box;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.part {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.part .icon {
    flex-shrink: 0;
    width: 100px;
    height: auto;
    object-fit: contain;
    display: block;
    margin-right: 15px;
}

.part .description {
    flex-grow: 1;
    margin: 0;
    line-height: 1.5;
}

button, p {
    font-family: "Roboto", sans-serif;
    font-style: normal;
}

/* Einheitliches Kartendesign */
.card, .flip-card {
    width: 350px;
    height: 300px;
    background-color: #fff;
    border-radius: 1rem;
    overflow: hidden;
    flex-shrink: 0;
    flex-grow: 0;
    margin: 10px;
}

.card-body {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
}

.card .btn, .flip-card-back .btn {
    background-color: #b4d2ff;
    color: white;
    padding: 10px 20px;
    border-radius: 0.5rem;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

.card.player-card {
    width: 310px; /* 350px - 20px links - 20px rechts */
    height: 260px; /* 300px - 20px oben - 20px unten */
    background-color: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    flex-shrink: 0;
    flex-grow: 0;
    margin: 30px 0px 50px 0px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.player-card h3 {
    text-align: center;
    font-family: "Ultra", serif;
    font-weight: 400;
    color: rgb(143, 185, 249);
}

/* Flip-Card Struktur */
.flip-card {
    background-color: transparent;
    perspective: 1000px;
    padding: 20px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    transform: rotateY(0deg);
}

.flip-card.flipped .flip-card-inner {
    transform: rotateY(180deg);
}

@media (hover: hover) and (pointer: fine) {
    .flip-card:hover .flip-card-inner {
        transform: rotateY(180deg);
    }
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 1rem;
    overflow: hidden;
}

.flip-card-front {
    background-color: #fff;
}

.flip-card-back {
    background-color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.card-img {
    padding: 5px;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: #fff;
    border-radius: 1rem;
}

.card-text {
    max-height: 250px;
    overflow-y: auto;
}

@keyframes nudge {
    0% { transform: rotateY(0deg); }
    30% { transform: rotateY(8deg); }
    60% { transform: rotateY(-8deg); }
    100% { transform: rotateY(0deg); }
}

@media (max-width: 1224px) {
    body {
        overflow: auto;
        overflow-x: hidden;
    }

    #header {
        height: 60px;
        font-size: 40px;
        padding: 5px 0;
    }

    #allLections {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
        height: auto;
        margin: 80px 0 0 0;
        width: calc(100% - 20px);
        overflow-x: hidden;
    }

    .lection {
        width: calc(100% - 20px);
        max-height: none;
    }

    .card, .flip-card {
        width: calc(100% - 10px);
        height: 300px;
    }

    .card.player-card {
        width: calc(100% - 30px);
        height: 260px;
        margin: 20px auto;
    }

    h1 {
        font-size: 30px;
    }

    .part {
        flex-direction: column;
        align-items: flex-start;
    }

    .part .icon {
        width: 80px;
        height: 80px;
        margin-bottom: 10px;
    }

    .part .description {
        text-align: left;
    }

    .toggle-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        font-size: 1.5rem;
        cursor: pointer;
        user-select: none;
        padding: 10px;
        font-weight: bold;
    }

    .toggle-header .title {
        flex: 1;
        text-align: center;
    }

    .toggle-header .arrow {
        display: inline-block;
        transition: transform 0.3s ease;
        width: 0;
        height: 0;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 8px solid black;
    }

    .lection.active .toggle-header .arrow {
        transform: rotate(180deg);
    }

    .toggle-content {
        display: none;
        width: 100%;
        overflow: visible;
        padding: 10px;
        box-sizing: border-box;
    }

    .lection.active .toggle-content {
        display: block;
    }
}
