/* Kursraum – Basis-Stylesheet */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f0f2f5;
}

/* Navigation */
.nav {
    background: #1a1a2e;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.nav-brand { color: white; text-decoration: none; font-weight: bold; font-size: 1.1rem; }
.nav-links a { color: #bbb; text-decoration: none; margin-left: 1.5rem; }
.nav-links a:hover { color: white; }

/* Main */
.main { max-width: 860px; margin: 2rem auto; padding: 0 1.5rem; }

/* Überschriften */
h1 { font-size: 1.6rem; margin-bottom: 0.25rem; }
h2 { font-size: 1.15rem; margin: 1.75rem 0 0.75rem; color: #333; }
h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: #888; margin-bottom: 0.6rem; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; }
.page-header h1 { margin-bottom: 0; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.45rem 1rem;
    background: #374151;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    font-family: inherit;
}
.btn:hover { background: #4b5563; }
.btn-primary { background: #2563eb; }
.btn-primary:hover { background: #1d4ed8; }
.btn-block { display: block; width: 100%; text-align: center; padding: 0.6rem; }
.btn-gross { padding: 0.8rem 2.5rem; font-size: 1.1rem; }

/* Listen */
.liste {
    list-style: none;
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}
.liste li {
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.liste li:last-child { border-bottom: none; }
.liste a { color: #1a1a1a; text-decoration: none; font-weight: 500; }
.liste a:hover { color: #2563eb; }

/* Formulare */
.login-box {
    max-width: 360px;
    margin: 4rem auto;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.login-box h1 { text-align: center; margin-bottom: 1.5rem; }
.formular-box {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    max-width: 520px;
}
.feld { margin-bottom: 1rem; }
label { display: block; margin-bottom: 0.3rem; font-weight: 500; font-size: 0.9rem; }
input[type="text"], input[type="password"], textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}
input:focus, textarea:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.fehler { color: #dc2626; font-size: 0.85rem; margin-top: 0.25rem; }
.formular-aktionen { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; }
.link-zurueck { color: #6b7280; text-decoration: none; font-size: 0.9rem; }
.link-zurueck:hover { color: #1a1a1a; }

/* Themenblöcke */
.thema-block {
    background: white;
    border-radius: 8px;
    padding: 1.1rem 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.thema-block ol { padding-left: 1.4rem; }
.thema-block li { padding: 0.2rem 0; color: #374151; }

/* Badges */
.typ-badge {
    font-size: 0.72rem;
    background: #f3f4f6;
    color: #6b7280;
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    margin-left: 0.4rem;
}
.status-badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 10px; }
.status-vorbereitung { background: #fef3c7; color: #92400e; }
.status-aktiv { background: #d1fae5; color: #065f46; }
.status-beendet { background: #f3f4f6; color: #6b7280; }

/* Vorbereitung */
.vorbereitung-box {
    background: white;
    border-radius: 10px;
    padding: 2.5rem 2rem;
    margin: 1.5rem 0;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.teilnehmer-zaehler { margin-bottom: 1.5rem; }
.teilnehmer-zaehler .zahl { display: block; font-size: 3.5rem; font-weight: 700; color: #2563eb; line-height: 1; }
.teilnehmer-zaehler .label { color: #9ca3af; font-size: 0.9rem; }
.url-hinweis { color: #6b7280; margin-bottom: 1.5rem; font-size: 0.95rem; }
.status-aktiv-text { color: #059669; font-weight: 600; font-size: 1.1rem; }

/* Hilfsstile */
.meta { color: #9ca3af; font-size: 0.85rem; }
.beschreibung { color: #6b7280; margin-bottom: 0.5rem; }
.leer-hinweis { background: white; border-radius: 8px; padding: 2rem; text-align: center; color: #6b7280; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.leer-hinweis p { margin-bottom: 1rem; }
.leer-hinweis code { display: block; background: #f3f4f6; padding: 0.75rem; border-radius: 5px; font-size: 0.85rem; margin-top: 0.5rem; }
.zurueck { margin-top: 1.5rem; }
.zurueck a { color: #6b7280; text-decoration: none; font-size: 0.9rem; }
.zurueck a:hover { color: #1a1a1a; }

/* Sync-Button & Ergebnis */
.section-header { display: flex; align-items: center; justify-content: space-between; margin: 1.75rem 0 0.75rem; }
.section-header h2 { margin: 0; }
.btn-klein { padding: 0.3rem 0.75rem; font-size: 0.85rem; background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.btn-klein:hover { background: #e5e7eb; }
.sync-ergebnis { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 6px; padding: 0.75rem 1rem; margin-bottom: 1rem; font-size: 0.875rem; }
.sync-ergebnis pre { white-space: pre-wrap; font-family: inherit; color: #166534; }

/* Live-Ansicht */
.aktive-uebung { background: #eff6ff; border: 2px solid #3b82f6; border-radius: 8px; padding: 1rem 1.25rem; margin-bottom: 1.5rem; }
.aktive-uebung-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 0.75rem; }
.aktive-uebung-aktionen { display: flex; gap: 0.5rem; }
.aktiv-badge { background: #2563eb; color: white; font-size: 0.75rem; padding: 0.2rem 0.6rem; border-radius: 10px; }
.uebung-zeile { display: flex; align-items: center; justify-content: space-between; padding: 0.3rem 0; }
.btn-start { background: #059669; }
.btn-start:hover { background: #047857; }
.btn-grau { background: #9ca3af; }
.btn-grau:hover { background: #6b7280; }

/* Teilnehmer */
.warteraum { text-align: center; padding: 4rem 1rem; }
.warteraum-inhalt h1 { font-size: 2rem; margin-bottom: 0.75rem; }
.warteraum-hinweis { color: #9ca3af; font-size: 0.9rem; margin-top: 0.75rem; }
.teilnehmer-seite { max-width: 600px; margin: 0 auto; }
.uebung-aktiv-hinweis { background: #d1fae5; border: 2px solid #34d399; border-radius: 10px; padding: 2rem; text-align: center; margin-top: 1.5rem; }
.uebung-aktiv-hinweis p { color: #065f46; margin-bottom: 0.5rem; }
.uebung-aktiv-hinweis h2 { font-size: 1.4rem; margin-bottom: 1.25rem; }

/* Skala */
.uebung-selbsteinschaetzung { text-align: center; padding: 1rem 0; }
.uebung-beschreibung { color: #6b7280; margin-bottom: 1.5rem; }
.skala { display: flex; gap: 0.5rem; justify-content: center; flex-wrap: wrap; margin-bottom: 1rem; }
.skala-wert {
    width: 3rem; height: 3rem;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    background: white;
    font-size: 1.1rem; font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}
.skala-wert:hover { border-color: #2563eb; color: #2563eb; }
.skala-wert.aktiv { background: #2563eb; border-color: #2563eb; color: white; }
.skala-hinweis { color: #9ca3af; font-size: 0.9rem; }

/* Übungsansicht Teilnehmer */
.uebung-inhalt { background: white; border-radius: 10px; padding: 2rem; margin: 1rem 0; box-shadow: 0 1px 3px rgba(0,0,0,0.08); }
.hinweis-geschlossen { background: #fef3c7; color: #92400e; padding: 0.6rem 1rem; border-radius: 6px; margin-bottom: 1rem; text-align: center; }
.bestaetigung { background: #d1fae5; color: #065f46; padding: 0.75rem 1rem; border-radius: 6px; margin-top: 1rem; text-align: center; font-weight: 500; }

/* Balkendiagramm */
.ergebnis-balken { background: white; border-radius: 10px; padding: 1.5rem; box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin: 1rem 0; }
.balken-zeile { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.6rem; }
.balken-label { width: 1.5rem; text-align: right; font-weight: 600; color: #374151; }
.balken-aussen { flex: 1; background: #f3f4f6; border-radius: 4px; height: 1.75rem; overflow: hidden; }
.balken-innen { height: 100%; background: #2563eb; border-radius: 4px; transition: width 0.4s; min-width: 2px; }
.balken-anzahl { width: 2rem; color: #6b7280; font-size: 0.9rem; }

/* Domain-Übung – URL-Segmente */
.uebung-domain { text-align: center; padding: 1rem 0; }
.url-box {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-size: 1.15rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin: 1rem 0;
    gap: 0;
}
.url-segment {
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
    user-select: none;
}
.url-protokoll { color: #6b7280; }
.url-subdomain { color: #374151; }
.url-domain    { color: #374151; }
.url-pfad      { color: #9ca3af; }
.url-segment:hover:not(.aktiv) { background: #dbeafe; color: #1d4ed8; }
.url-segment.aktiv    { background: #2563eb; color: white; border-radius: 5px; }
.url-tipp {
    min-height: 1.4em;
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    margin: 0.25rem 0 0.75rem;
}
.url-hinweis { color: #9ca3af; font-size: 0.9rem; margin-top: 0.75rem; }

/* Vertrauensfrage */
.vertrauen-bereich { margin-top: 1.5rem; }
.vertrauen-frage { font-weight: 600; margin-bottom: 0.75rem; }
.vertrauen-optionen { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }
.vertrauen-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: border-color 0.15s, background 0.15s;
}
.vertrauen-label input[type="radio"] { display: none; }
.vertrauen-label:hover { border-color: #2563eb; }
.vertrauen-label.aktiv { background: #2563eb; border-color: #2563eb; color: white; }

/* Domain-Ergebnis */
.domain-balken .balken-zeile-richtig { background: #f0fdf4; border-radius: 6px; }
.balken-label-domain { width: 10rem; text-align: right; font-size: 0.85rem; font-family: 'Courier New', monospace; }
.balken-innen-richtig { background: #059669; }
.balken-innen-vertrauen { background: #7c3aed; }
.richtig-badge {
    font-size: 0.8rem;
    background: #059669;
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    margin-left: 0.25rem;
}

/* Session-Analyse */
.analyse-block {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.analyse-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.analyse-header h2 { margin: 0; }

/* Session-Aktionen in Kursliste */
.session-aktionen {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Auswahl (Multiple Choice) */
.uebung-auswahl { text-align: center; padding: 1rem 0; }
.auswahl-frage { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.5rem; color: #1a1a1a; }
.auswahl-optionen { display: flex; flex-direction: column; gap: 0.6rem; max-width: 480px; margin: 0 auto; }
.auswahl-btn {
    padding: 0.75rem 1.25rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.auswahl-btn:hover { border-color: #2563eb; }
.auswahl-btn.aktiv { background: #2563eb; border-color: #2563eb; color: white; }
