/* Container für das Pop-up: überlagert alles und zentriert den Inhalt */
#popup-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Sichtbarer Zustand des Containers */
#popup-container:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

/* Das eigentliche Pop-up-Fenster */
#popup-content {
    background-color: var(--color-border);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-align: center;
    position: relative;
    max-width: 80%;
}

/* Die Überschrift im Pop-up */
#popup-headline {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--color-font);
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--color-borderline);
    padding-bottom: 10px;
}

/* Der Text im Pop-up */
#popup-text {
    font-size: 1.2rem;
    margin: 0;
}

/* Der Schließen-Button */
#close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: var(color-footer);
}

#close-btn:hover {
    color: #000;
}

/* Container für den Timerbalken */
#timer-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px; /* Höhe des Balkens */
    background-color: #e0e0e0; /* Hintergrundfarbe des Containers */
}

/* Der eigentliche Timerbalken, der schrumpft */
#timer-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, #FFFFFF, #007DFF); /* Farbverlauf des Balkens */
}

/* Die Klasse, die die Animation startet */
#timer-bar.shrinking {
    /* Name, Dauer, Timing-Funktion, Endzustand */
    animation: grow 9s linear forwards;
}

/* Definition der @keyframes-Animation */
@keyframes grow {
    from {
        width: 0%;
    }
    to {
        width: 100%;
    }
}
/* Dark Mode Anpassungen für das Pop-up */
body.dark #popup-content {
    background-color: var(--color-borderdark);
    color: var(--color-fontdark);
}

body.dark #popup-headline,
body.dark #popup-text {
    color: var(--color-fontdark);
}

body.dark #close-btn {
    color: var(--color-footerdark);
}

body.dark #popup-headline {
    border-bottom: 2px solid var(--color-borderlinedark);
}
