/* StaffLynk Schulungsplayer – Prototyp
   Ein Bildhandbuch, das sich wie ein Video verhaelt. */

:root {
    --bg: #11141a;
    --bg-panel: #181c25;
    --bg-panel-hi: #212736;
    --line: #2b3242;
    --fg: #e7eaf0;
    --fg-dim: #96a0b5;
    --accent: #4d8dff;
    --accent-soft: rgba(77, 141, 255, .16);
    --ok: #35c28b;
    --stage: #f4f6fa;
    --radius: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --ui: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
}

body {
    background: var(--bg);
    color: var(--fg);
    font: 15px/1.55 var(--ui);
    -webkit-font-smoothing: antialiased;
    overflow: hidden;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    cursor: pointer;
}

/* ---------------------------------------------------------------- Layout */

.app {
    display: grid;
    grid-template-columns: 300px 1fr;
    grid-template-rows: 56px 1fr auto;
    grid-template-areas:
        "kopf   kopf"
        "inhalt buehne"
        "inhalt steuerung";
    height: 100vh;
}

.kopf {
    grid-area: kopf;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line);
    background: var(--bg-panel);
}

.kopf__marke {
    font-weight: 650;
    letter-spacing: -.01em;
}

.kopf__marke span {
    color: var(--fg-dim);
    font-weight: 400;
}

.kopf__titel {
    margin-left: auto;
    color: var(--fg-dim);
    font-size: 13.5px;
    text-align: right;
    line-height: 1.3;
}

.kopf__titel b {
    display: block;
    color: var(--fg);
    font-weight: 600;
}

/* ------------------------------------------------------------ Schrittliste */

.inhalt {
    grid-area: inhalt;
    border-right: 1px solid var(--line);
    background: var(--bg-panel);
    overflow-y: auto;
    padding: 12px 0 24px;
}

.inhalt__kapitel {
    padding: 16px 18px 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--fg-dim);
}

.schritt {
    display: grid;
    grid-template-columns: 26px 1fr;
    gap: 10px;
    width: 100%;
    padding: 9px 18px;
    text-align: left;
    border-left: 2px solid transparent;
    color: var(--fg-dim);
    transition: background .12s, color .12s;
}

.schritt:hover { background: var(--bg-panel-hi); }

.schritt[aria-current="step"] {
    background: var(--accent-soft);
    border-left-color: var(--accent);
    color: var(--fg);
}

.schritt__nr {
    font-variant-numeric: tabular-nums;
    font-size: 12.5px;
    text-align: right;
    padding-top: 1px;
    opacity: .75;
}

.schritt[data-erledigt="ja"] .schritt__nr { color: var(--ok); }

.schritt__text {
    font-size: 13.5px;
    line-height: 1.4;
}

/* ------------------------------------------------------------------ Buehne */

.buehne {
    grid-area: buehne;
    position: relative;
    display: grid;
    place-items: center;
    padding: 14px 18px 6px;
    overflow: hidden;
}

.rahmen {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--stage);
    /* Der Zoom wird per Transform auf diesem Element gefahren. */
    transition: transform 900ms cubic-bezier(.22, .61, .36, 1);
    transform-origin: center center;
}

.rahmen__bild {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 232px);
    width: auto;
    height: auto;
    transition: opacity 260ms ease;
}

.rahmen__bild--wechsel { opacity: 0; }

/* Mauszeiger + Klick-Ring */

.zeiger {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    margin: -2px 0 0 -2px;
    pointer-events: none;
    opacity: 0;
    transition: transform 620ms cubic-bezier(.33, .9, .3, 1), opacity 200ms;
    z-index: 3;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5));
}

.zeiger--sichtbar { opacity: 1; }

.ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 28px;
    height: 28px;
    margin: -14px 0 0 -14px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
    z-index: 2;
}

.ring--klick { animation: klick 620ms ease-out; }

@keyframes klick {
    0%   { opacity: .9; transform: scale(.35); }
    70%  { opacity: .5; transform: scale(2.1); }
    100% { opacity: 0;  transform: scale(2.7); }
}

/* Markierung eines Bereichs (z.B. ein Formularblock) */

.markierung {
    position: absolute;
    border: 2px solid var(--accent);
    border-radius: 6px;
    box-shadow: 0 0 0 9999px rgba(10, 13, 20, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease;
    z-index: 1;
}

.markierung--an { opacity: 1; }

/* -------------------------------------------------------------- Untertitel */

.untertitel {
    max-width: 900px;
    margin: 0 auto;
    padding: 14px 22px 0;
    text-align: center;
    font-size: 16.5px;
    line-height: 1.6;
    color: var(--fg);
    min-height: 58px;
}

.untertitel__wort--aktiv {
    background: var(--accent-soft);
    border-radius: 3px;
    box-shadow: 0 0 0 2px var(--accent-soft);
}

/* --------------------------------------------------------------- Steuerung */

.steuerung {
    grid-area: steuerung;
    border-top: 1px solid var(--line);
    background: var(--bg-panel);
    padding: 10px 18px 14px;
}

.fortschritt {
    display: flex;
    gap: 3px;
    height: 4px;
    margin-bottom: 12px;
}

.fortschritt__stueck {
    flex: 1;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
}

.fortschritt__fuell {
    display: block;
    height: 100%;
    width: 0;
    background: var(--accent);
    border-radius: 2px;
}

.fortschritt__stueck[data-zustand="fertig"] .fortschritt__fuell { width: 100%; }

.knopfleiste {
    display: flex;
    align-items: center;
    gap: 8px;
}

.knopf {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    color: var(--fg-dim);
    transition: background .12s, color .12s;
}

.knopf:hover {
    background: var(--bg-panel-hi);
    color: var(--fg);
}

.knopf:disabled {
    opacity: .3;
    cursor: default;
    background: none;
}

.knopf--haupt {
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
}

.knopf--haupt:hover { background: #6a9fff; color: #fff; }

.knopf svg { width: 19px; height: 19px; }

.knopf--haupt svg { width: 21px; height: 21px; }

.zaehler {
    font-variant-numeric: tabular-nums;
    font-size: 13px;
    color: var(--fg-dim);
    margin-left: 4px;
    min-width: 62px;
}

.rechts {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feld {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    color: var(--fg-dim);
}

.feld select {
    font: inherit;
    font-size: 12.5px;
    color: var(--fg);
    background: var(--bg-panel-hi);
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 5px 7px;
    max-width: 190px;
}

/* -------------------------------------------------------------- Startseite */

.start {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 50% 35%, #1d2433, var(--bg) 70%);
}

.start__karte {
    max-width: 560px;
    padding: 0 28px;
    text-align: center;
}

.start__augbraue {
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 14px;
}

.start__titel {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -.02em;
}

.start__text {
    color: var(--fg-dim);
    margin: 0 0 8px;
}

.start__meta {
    color: var(--fg-dim);
    font-size: 13px;
    margin: 18px 0 26px;
}

.start__knopf {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 26px;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

.start__knopf:hover { background: #6a9fff; }

.start__hinweis {
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--fg-dim);
    line-height: 1.5;
}

.verborgen { display: none !important; }

/* ------------------------------------------------------------------ Schmal */

@media (max-width: 900px) {
    .app {
        grid-template-columns: 1fr;
        grid-template-areas: "kopf" "buehne" "steuerung";
    }
    .inhalt { display: none; }
    .rechts .feld--stimme { display: none; }
}
