* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    background: #f4f6f8;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    min-height: 100vh;
    margin: 0;
    color: #111;
}

/* CARD */
.container {
    background: white;
    padding: 28px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 420px;
    text-align: center;
    margin: 16px;
}

/* TYPO */
h1 {
    font-size: 22px;
    margin-bottom: 10px;
}

h1:not(#mainhead) {
    margin-top: -10px;
}

h4 {
    font-size: 14px;
    margin: 10px 0 18px;
    color: #444;
}

/* INPUTS */
input,
select {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0;
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    outline: none;
    font-size: 15px;
    background: #fff;
    transition: all 0.2s ease;
}

/* FOCUS */
input:focus,
select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

/* BUTTON */
button {
    /* width: 100%; */
    padding: 12px;
    margin-top: 10px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

button:not(.nav-btn) {
    width: 100%;
}

button:hover {
    background: #357abd;
}

button:active {
    transform: scale(0.98);
}

/*new for adventure*/
.list {
    border: 1px solid #e2e2e2;
    border-radius: 14px;
    padding: 10px;
    max-height: 180px;
    overflow-y: auto;
    text-align: left;
}

.list label {
    display: block;
    padding: 6px;
    border-radius: 10px;
    cursor: pointer;
}

.list label:hover {
    background: #f1f6ff;
}

.tag {
    display: inline-block;
    background: #e0e7ff;
    color: #333;
    padding: 6px 10px;
    border-radius: 12px;
    margin: 4px;
    font-size: 13px;
}

/* STATUS */
.correct {
    background: #e9ffe9 !important;
    border-color: #2ecc71 !important;
    animation: pop 0.2s ease-out;

    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform-origin: center center;
}

@keyframes pop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-6px);
    }

    40% {
        transform: translateX(6px);
    }

    60% {
        transform: translateX(-4px);
    }

    80% {
        transform: translateX(4px);
    }

    100% {
        transform: translateX(0);
    }
}

.wrong {
    background: #ffecec !important;
    border-color: #e74c3c !important;
    animation: shake 0.3s ease;
}

.modern-select {
    width: 100%;
    padding: 12px 40px 12px 14px;

    border-radius: 16px;
    border: 1px solid #e2e2e2;

    background: #fff;
    font-size: 15px;

    cursor: pointer;
    outline: none;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    transition: 0.2s ease;

    /* custom arrow */
    /* background-image: url("data:image/svg+xml;utf8,<svg fill='%234a90e2' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5 7l5 5 5-5z'/></svg>"); */
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
}

/* Focus nicer */
.modern-select:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}

/* Hover */
.modern-select:hover {
    border-color: #4a90e2;
}

.nav-buttons {
    display: flex;
    flex-direction: row;
    /* wichtig */
    gap: 10px;
    margin-top: 12px;
    width: 100%;
}

.nav-btn {
    flex: 1;
    /* beide gleich breit */
    min-width: 0;
    /* verhindert Umbruch-Bugs */

    padding: 12px;

    border-radius: 14px;
    border: 1px solid #ddd;

    background: #f7f9fc;
    color: #333;

    font-size: 18px;
    font-weight: bold;

    cursor: pointer;
    transition: all 0.2s ease;

    display: flex;
    justify-content: center;
    align-items: center;

    user-select: none;
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
}

.noten-kreis {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: inline-flex;
    /* Nebeneinander darstellbar */
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
    font-size: 24px;
    font-weight: bold;
    color: white;
    margin: 10px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    /* Erhöht die Lesbarkeit */
}

#resetbutton {
    background-color: red;

}

/* MOBILE */
@media (max-width: 480px) {
    .container {
        padding: 18px;
        border-radius: 14px;
        box-shadow: none;
    }

    h1 {
        font-size: 18px;
    }

    h4 {
        font-size: 13px;
    }

    input,
    select,
    button {
        font-size: 16px;
        padding: 12px;
    }
}

/* DARK MODE */
@media (prefers-color-scheme: dark) {

    body {
        background: #121212;
        color: #eee;
    }

    .container {
        background: #1c1c1c;
        box-shadow: none;
    }

    h4 {
        color: #bbb;
    }

    input,
    select {
        background: #2a2a2a;
        color: #fff;
        border: 1px solid #444;
    }

    input:focus,
    select:focus {
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
    }

    button {
        background: #357abd;
    }

    button:hover {
        background: #2a5f94;
    }

    /*new for adventure*/
    .list {
        border: 1px solid #444;
    }

    .list label:hover {
        background: #2a3a55;
    }

    .tag {
        background: #2a3a55;
        color: #fff;
    }

    .correct {
        background: #1f3d2a !important;
        border-color: #2ecc71 !important;
    }

    .wrong {
        background: #3a1f1f !important;
        border-color: #e74c3c !important;
    }

    .modern-select {
        background: #2a2a2a;
        color: #fff;
        border: 1px solid #444;

        /* background-image: url("data:image/svg+xml;utf8,<svg fill='%23ffffff' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'><path d='M5 7l5 5 5-5z'/></svg>"); */
    }

    .modern-select:focus {
        box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.25);
    }

    .nav-btn {
        background: #2a2a2a;
        color: #ddd;
        border: 1px solid #444;
    }

    .nav-btn:hover {
        color: #4a90e2;
        border-color: #4a90e2;
    }
}