h1 {
    font-weight: bold;
}
.content {
    padding: 5px;
}
.yturlform {
    max-width: 560px;
}

.karaoke-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
#player {
    width: 100%;
    max-width: 560px;
    height: 315px;
}
/* Hinweis, während die KI reinen Text synchronisiert */
.sync-status {
    margin: 0 0 8px;
    padding: 6px 12px;
    border-radius: 10px;
    background: #8e6f9f;
    color: #fff;
    font-weight: bold;
    animation: sync-pulse 1.6s ease-in-out infinite;
}
@keyframes sync-pulse {
    50% { opacity: .65; }
}

/* Lyrics-Spalte im gleichen Look wie das Vollbild-Overlay */
.lyricsContainer {
    flex: 1;
    min-width: 0;
}
#lyrics {
    font-family: monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    overflow-y: auto;
    line-height: 1.6;
    height: 260px;
    position: relative;
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #000;
    color: #eee; /* für Nur-Text-Lyrics ohne Zeitstempel */
    text-align: center;
}

@media (min-width: 900px) {
    .karaoke-container {
        flex-direction: row;
        align-items: flex-start;
    }
    #lyrics {
        font-size: 1.1rem;
        height: 600px;
    }
    #lyrics .line.current {
        font-size: 1.6rem;
    }
}
.line {
    width: fit-content;
    max-width: 100%;
    margin: 0 auto 8px;
    padding: 7px 14px;
    border-radius: 3px;
    color: #333;
    background-color: rgba(255, 255, 255, .75);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
    transition: font-size .2s, padding .2s, background-color .2s;
}
.line.current {
    font-size: 1.15rem;
    padding: .5em 1em; /* größerer Kasten: Platz für das wachsende Wort */
    font-weight: bold;
    color: #000;
    background-color: rgb(222, 234, 248);
}
/* Alle Wörter haben denselben Innenabstand (per negativem Margin wieder
   ausgeglichen), damit beim Hervorheben nichts nach links/rechts springt. */
.line span,
.ov-current span {
    display: inline-block;
    position: relative;
    padding: 0 .15em;
    margin: 0 -.15em;
    border-radius: 4px;
    /* Rausgehen: ruhig ausblenden */
    transition:
        transform .35s ease-out,
        background-color .35s ease-out,
        color .35s ease-out,
        box-shadow .35s ease-out;
}

/* Das gerade gesungene Wort: soll richtig rausstechen */
.highlight {
    z-index: 1;
    background-color: #8e6f9f;
    color: #fff;
    font-weight: 900;
    /* transform statt font-size: kein Reflow, Zeile und weißer Kasten
       bleiben ruhig stehen, nur das Wort selbst federt. */
    transform: scale(var(--s, 1.2)); /* --s pro Wort aus app.js (wordScale) */
    box-shadow: 0 0 0 2px #fff, 0 0 16px 4px rgba(142, 111, 159, .9);
}
/* Mehr Luft zwischen den Wörtern der aktuellen Zeile, damit das
   vergrößerte Wort auch bei langen Wörtern nicht ins Nachbarwort ragt. */
.line.current,
.ov-current {
    word-spacing: .35em;
}
/* Reinkommen: schnell mit Federeffekt (Überschwinger), damit es kickt */
.line span.highlight,
.ov-current span.highlight {
    transition:
        transform .3s cubic-bezier(.34, 1.8, .64, 1),
        background-color .12s ease-out,
        color .12s ease-out,
        box-shadow .2s ease-out;
}

/* Neue Zeile im Overlay sanft reinschieben */
.ov-current.line-in {
    animation: line-in .25s ease-out;
}
@keyframes line-in {
    from { opacity: .3; transform: translateY(.35em); }
    to   { opacity: 1;  transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .line span,
    .ov-current span,
    .line span.highlight,
    .ov-current span.highlight { transition: none; }
    .ov-current.line-in { animation: none; }
}

.btn {
    border-color: black;
    border-radius: 10px;
    background-color: #918d8d;
}
.btn-primary {
    background-color: #8e6f9f;
    font-weight: bolder;
}
.btn:hover {
    background-color: #624771;
    border-color: black;
}

/***** Video + Lyrics-Overlay (normal und im eigenen Vollbild) ***********/
.stage {
    position: relative;
    width: 100%;
    max-width: 560px;
    container-type: inline-size; /* cqw = 1 % der Video-Breite, für die Overlay-Schrift */
}
.fs-exit {
    display: none;
}
.stage.fs {
    position: fixed;
    inset: 0;
    z-index: 1000;
    max-width: none;
    background: #000;
}
.stage.fs #player {
    max-width: none;
    width: 100%;
    height: 100%;
}
.overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 33%; /* im kleinen Player über Fortschrittsbalken und Steuerleiste */
    padding: 0 4%;
    text-align: center;
    pointer-events: none; /* Klicks gehen weiter an den Player */
}
.stage.fs .overlay {
    bottom: 12%;
    padding: 0 6%;
}
/* Gleicher Look wie die Lyrics-Spalte: Monospace, .line.current, .highlight */
.ov-current,
.ov-next {
    display: block; /* nicht table: Chrome verwirft dort die Leerzeichen zwischen den Wörtern */
    width: fit-content;
    max-width: 100%;
    margin: 0 auto;
    padding: .25em .6em;
    border-radius: 3px;
    font-family: monospace;
    line-height: 1.6;
    box-shadow: 0 4px 18px rgba(0, 0, 0, .45);
}
.ov-current:empty,
.ov-next:empty {
    display: none;
}
.ov-current {
    padding: .5em 1em; /* größerer Kasten: Platz für das wachsende Wort */
    font-size: clamp(.95rem, 4cqw, 3.2rem);
    font-weight: bold;
    color: #000;
    background-color: rgb(222, 234, 248);
}
.ov-next {
    margin-top: .4em;
    font-size: clamp(.75rem, 2.6cqw, 1.9rem);
    color: #333;
    background-color: rgba(255, 255, 255, .75);
}
.stage.fs .fs-exit {
    display: block;
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 6px 12px;
    border: 1px solid black;
    border-radius: 10px;
    background-color: #918d8d;
    color: #fff;
    font-size: 1.4rem;
}
.stage.fs .fs-exit:hover {
    background-color: #624771;
}
