body {
    font-family: Arial, sans-serif;
    background: #f5f5f5;
    margin: 0;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.top-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1rem 15rem;
    background: #f0f0f0;
    border-bottom: 1px solid #ccc;
}

.back-button {
    position: absolute;
    left: 1rem;
    background: #e63946;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    user-select: none;
    transition: background-color 0.3s ease;
}

.back-button:hover {
    background: #c82333;
}

.top-bar h1 {
    margin: 0;
    font-size: 1.5rem;
}
.card-container {
    perspective: 1000px;
    margin: 20px 0;
}

.card {
    width: 700px;
    height: 400px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    position: relative;
    user-select: none;
}

.flipped {
    transform: rotateY(180deg);
}

.card-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.card-back {
    transform: rotateY(180deg);
}

.controls-row {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 10px 0;
    flex-wrap: nowrap;
}

.controls-row button {
    padding: 10px 12px;
    font-size: 16px;
    background: #e63946;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.controls-row button:hover {
    background: #c82333;
}

.options-group {
    margin: 10px 0 30px 0;
    text-align: center;
}

.options {
    display: inline-flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.options label {
    cursor: pointer;
}

.options input {
    display: none;
}

.options span {
    padding: 8px 14px;
    border: 2px solid #ccc;
    border-radius: 20px;
    background: #eee;
    transition: 0.2s;
    user-select: none;
}

.options input:checked + span {
    background: #e63946;
    color: white;
    border-color: #c82333;
}

.word-list {
    margin-top: 20px;
    width: 100%;
    text-align: center;
}

.word-list table {
    margin: 0 auto;
    max-width: 600px;
    width: 100%;
    border-collapse: collapse;
}

.word-list th, .word-list td {
    padding: 8px;
    border: 1px solid #ccc;
    text-align: left;
}

.word-list th {
    background: #eaeaea;
}

@media (max-width: 600px) {
    body {
        padding: 10px;
    }

    .top-bar {
        padding: 1rem;
        flex-direction: column;
        align-items: center;
    }

    .back-button {
        position: static;
        margin-bottom: 0.5rem;
        width: 100%;
        max-width: 300px;
        text-align: center;
    }

    .top-bar h1 {
        font-size: 1.3rem;
        text-align: center;
    }

    .card {
        width: 280px;
        height: 160px;
        font-size: 16px;
        border: 2px solid #e63946;
    }

    .card-face {
        padding: 10px;
        font-size: 14px;
        background-color: white;
        color: black;
        backface-visibility: hidden;
    }

    .card-back {
        transform: rotateY(180deg);
    }

    .controls-row {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
        max-width: 320px;
        margin: 10px auto 0 auto;
    }

    .controls-row button {
        font-size: 13px;
        padding: 8px 0;
        min-width: 0;
        width: 80%;
    }

    .options-group {
        margin-top: 15px;
    }

    .options {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        justify-content: center;
    }

    .options label {
        display: block;
    }

    .options span {
        font-size: 14px;
        padding: 6px 12px;
        white-space: nowrap;
        display: inline-block;
    }

    .word-list table {
        display: none;
    }

    .word-list::before {
        content: "Die Vokabelliste ist nur in der Desktop-Version sichtbar.";
        display: block;
        text-align: center;
        color: #666;
        font-size: 0.95rem;
        padding: 1rem 0;
        font-style: italic;
    }
}