.klassen-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.klassen-overlay.versteckt {
    display: none;
}

.klassen-modal {
    background: #1e1e1e;
    border-radius: 12px;
    width: 640px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.klassen-modal-kopf {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #333;
}

.klassen-modal-kopf h2 {
    color: white;
    font-size: 18px;
    margin: 0;
}

.klassen-modal-kopf button {
    background: none;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
}

.klassen-modal-inhalt {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    overflow: hidden;
    flex: 1;
}

.klassen-liste-bereich,
.schueler-bereich {
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.klassen-liste-bereich {
    border-right: 1px solid #333;
}

.klassen-liste-bereich h3,
.schueler-bereich h3 {
    color: #aaa;
    font-size: 13px;
    text-transform: uppercase;
    margin: 0;
}

.klassen-eingabe-zeile {
    display: flex;
    gap: 6px;
}

.klassen-eingabe-zeile input {
    flex: 1;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #2a2a2a;
    color: white;
    font-size: 14px;
}

.klassen-eingabe-zeile button {
    padding: 6px 12px;
    border-radius: 6px;
    border: none;
    background: #4a90d9;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

#klassen-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#schueler-liste {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

#klassen-liste li,
#schueler-liste li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    border-radius: 6px;
    color: white;
    font-size: 14px;
    cursor: pointer;
    background: #2a2a2a;
}

#klassen-liste li.aktiv {
    background: #4a90d9;
}

#klassen-liste li button,
#schueler-liste li button {
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    padding: 0 4px;
}

#schueler-liste li.ausgewaehlt {
    background: #4a90d9;
}

.schueler-auf-tafel-btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    background: #4a90d9;
    color: white;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
    margin-top: 8px;
}

.schueler-auf-tafel-btn.versteckt {
    display: none;
}

.schueler-widget {
    background: #4a90d9;
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 5 / 2;
    width: 100%;
    box-sizing: border-box;
}

.schueler-widget p {
    margin: 0;
    color: white;
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    word-break: break-word;
}

.schueler-farben {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 10px;
}

.schueler-color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.schueler-color-dot.selected {
    border-color: white;
    transform: scale(1.2);
}