/* Grundlegende Stile */
body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000;
    color: #fff;
    font-family: Helvetica, sans-serif;
    overflow: hidden;
}

body.light-theme {
    background-color: #fff;
    color: #000;
}

/* Container für den Teleprompter */
#teleprompter {
    position: relative;
    width: 100%;
    height: 100%;
    overflow-y: scroll;
}

/* Textinhalt */
#text-content {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    font-size: 60px;
    line-height: 1.8;
    padding-bottom: 80px;
}

body.light-theme #text-content {
    color: #000;
}

/* Lesemarker */
#reading-marker {
    position: fixed;
    top: 50%;
    left: 0;
    width: 100%;
    border-top: 2px solid #BB86FC;
    pointer-events: none;
    z-index: 1;
}

body.light-theme #reading-marker {
    border-top-color: #6200EE;
}

/* Steuerungsbereich */
#controls {
    position: fixed;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(93, 72, 96, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
}

body.light-theme #controls {
    background-color: rgba(200, 200, 200, 0.7);
}

/* Buttons und Slider */
#controls button,
#file-label {
    appearance: none !important;
    background-color: rgb(45, 4, 50);
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.light-theme #controls button,
body.light-theme #file-label {
    background-color: #ccc;
    color: #000;
}

#controls button:hover {
    background-color: #2E2E2E;
}

/* Slider-Container */
#speed-control-container,
#font-size-control-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Allgemeine Stile für Slider */
#controls input[type="range"] {
    -webkit-appearance: none;
    width: 150px;
    height: 8px;
    background: #2E2E2E;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

/* Slider-Thumb (Schieberegler) */
#controls input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 24px;
    width: 24px;
    background: #BB86FC;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -8px;
    border: none;
}

#controls input[type="range"]::-moz-range-thumb {
    height: 24px;
    width: 24px;
    background: #BB86FC;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

/* Slider-Track (Hintergrund) */
#controls input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    background: #2E2E2E;
    border-radius: 4px;
}

#controls input[type="range"]::-moz-range-track {
    height: 8px;
    background: #2E2E2E;
    border-radius: 4px;
}

/* Anpassungen für Light Theme */
body.light-theme #controls input[type="range"] {
    background: #ccc;
}

body.light-theme #controls input[type="range"]::-webkit-slider-thumb,
body.light-theme #controls input[type="range"]::-moz-range-thumb {
    background: #6200EE;
}

body.light-theme #controls input[type="range"]::-webkit-slider-runnable-track,
body.light-theme #controls input[type="range"]::-moz-range-track {
    background: #ccc;
}

/* Verstecke das Dateieingabefeld */
#file-input {
    display: none;
}

/* Timer-Anzeige */
#timer-display {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 30, 30, 0.7);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 18px;
    z-index: 2;
}

body.light-theme #timer-display {
    background-color: rgba(220, 220, 220, 0.7);
    color: #000;
}

/* Inhaltsverzeichnis */
#toc {
    position: fixed;
    top: 60px;
    right: 10px;
    background-color: rgba(30, 30, 30, 0.7);
    padding: 10px;
    border-radius: 5px;
    z-index: 2;
}

body.light-theme #toc {
    background-color: rgba(220, 220, 220, 0.7);
}

#toc button {
    display: block;
    margin-bottom: 5px;
    background-color: #BB86FC;
    color: #fff;
    border: none;
    padding: 10px;
    cursor: pointer;
    border-radius: 5px;
    width: 100%;
}

body.light-theme #toc button {
    background-color: #6200EE;
}

#toc button:hover {
    background-color: #9b59b6;
}

/* Fortschrittsbalken */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: #444;
}

body.light-theme #progress-bar {
    background-color: #ccc;
}

#progress {
    width: 0%;
    height: 100%;
    background-color: #BB86FC;
}

body.light-theme #progress {
    background-color: #6200EE;
}

/* Shortcut-Legende */
#shortcut-legend {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
    max-width: 300px;
    z-index: 1;
}

body.light-theme #shortcut-legend {
    background-color: rgba(220, 220, 220, 0.7);
    color: #000;
}

/* Anpassungen für kleinere Bildschirme */
@media (max-width: 768px) {
    #controls {
        flex-direction: column;
        gap: 15px;
        bottom: 80px;
        /* UI höher anzeigen */
    }

    #controls button,
    #controls input[type="range"] {
        padding: 15px;
        font-size: 14px;
    }

    #shortcut-legend {
        top: 10px;
        bottom: auto;
    }

    #text-content {
        padding-bottom: 150px;
        /* Zusätzlicher Abstand am Textende */
    }
}