html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
}

#player-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: calc(var(--vh, 1vh) * 100);
    background-color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 1000;
}

.full-screen-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    border-radius: 8px;
}

.full-screen-video.longform-mode {
    object-fit: contain;
}

#player-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1006;
    background-color: transparent;
    transition: background-color 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
}

#logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px 20px;
    background-color: transparent;
    box-sizing: border-box;
    width: 100%;
}

#logo-container img {
    height: 40px;
    width: auto;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
}

#bottom-ui-container {
    position: absolute;
    bottom: calc(20px + env(safe-area-inset-bottom));
    left: 20px;
    right: 20px;
    z-index: 1005;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

#video-title {
    color: #ffffff;
    font-size: 1.2em;
    font-weight: bold;
    text-align: left;
    width: 100%;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(1.2em * 2);
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.2em;
}


/* --- Theme Anpassungen --- */
#player-header.noz-theme #logo-container {
    background-color: rgba(255, 255, 255, 1);
    padding: 5px 20px;
    border-radius: 0;
    width: 100%;
}
#player-header.noz-theme #logo-container img { filter: none; }
#player-header.kleinezeitung-theme::after {
    content: '';
    display: block;
    width: 95%;
    height: 2px;
    background-color: #c30712;
    margin-top: 5px;
}

/* --- Pre-roll & Overlay UI --- */
#preroll-info-container {
    position: absolute;
    top: 65px;
    right: 20px;
    z-index: 1007;
    background-color: rgba(0, 0, 0, 0.4);
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}
#preroll-info-container.hidden { display: none; }
#player-header.noz-theme ~ #preroll-info-container {
    top: 75px;
}


#loading-overlay, #play-button-overlay, #mute-overlay {
    position: absolute;
}
#loading-overlay {
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    color: white; display: flex; justify-content: center;
    align-items: center; font-size: 2em; z-index: 1002;
    transition: opacity 0.3s ease;
}
#loading-overlay.hidden { display: none; }
#play-button-overlay {
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); color: white;
    display: flex; justify-content: center; align-items: center;
    font-size: 4em; cursor: pointer; z-index: 1003;
}
#play-button-overlay.hidden { display: none; }
#mute-overlay {
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 1004; transition: opacity 0.3s ease;
}
#mute-icon { width: 25vw; height: auto; filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.7)); }
#mute-overlay.hidden { opacity: 0; pointer-events: none; }


/* --- Call-to-Action Button --- */
#call-to-action-overlay {
    width: auto; max-width: calc(100% - 40px);
    text-align: left; display: flex;
    justify-content: flex-start; align-items: center; gap: 10px;
}
#call-to-action-overlay.hidden { display: none; }
#cta-button {
    background-color: rgba(102, 102, 102, 0.5);
    color: white; border: none; padding: 5px 15px 5px 5px;
    border-radius: 20px; font-size: 0.9em;
    cursor: pointer; backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px); transition: background-color 0.3s ease;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
#cta-button.longform-back-button { padding-left: 15px; padding-right: 15px; }
#cta-button img { height: 1.8em; width: auto; vertical-align: middle; }


/* --- GENERALISIERTES TOOLTIP-SYSTEM --- */
.tooltip-overlay {
    position: absolute;
    width: 200px; /* Standardbreite für Konsistenz mit Anforderung */
    max-width: 80vw;
    z-index: 1008;
    filter: drop-shadow(1px 1px 3px rgba(0,0,0,0.4));
    pointer-events: auto;
    cursor: pointer;
    /* Position wird dynamisch per JS gesetzt */
}
.tooltip-overlay.hidden { display: none; }

#tooltip-content-wrapper {
    background-color: #ffffff;
    color: #111111;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.9em;
    text-align: left;
}

.tooltip-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 5px;
}

.tooltip-header img {
    width: 16px;
    height: 16px;
}

#tooltip-content-wrapper strong {
    font-size: 1em;
    font-weight: bold;
}

#tooltip-content-wrapper p {
    margin: 0;
    line-height: 1.3;
}

#tooltip-pointer {
    width: 0;
    height: 0;
    position: absolute;
    /* Position wird durch Modifikator-Klassen gesetzt */
}


/* --- Spezifische Tooltip-Modifikatoren --- */

.tooltip-overlay.tooltip-centered {
    top: 25%; /* GEÄNDERT */
    left: 50%;
    transform: translate(-50%, -50%);
}
.tooltip-overlay.tooltip-centered #tooltip-content-wrapper {
    text-align: left;
}

.tooltip-overlay.longform-tooltip,
.tooltip-overlay.tooltip-wide,
.tooltip-overlay.tooltip-medium-wide { /* KORRIGIERTE REGEL */
    width: 240px;
}

.tooltip-overlay.tooltip-extra-wide {
    width: 280px; /* Neue Klasse für den Doku-Teaser */
}

/* Pfeil-Positionierung */
.tooltip-pointer.pointer-left-25 {
    top: 100%;
    left: 25%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
}

.tooltip-pointer.pointer-bottom-center {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ffffff;
}


/* --- Landscape & Sonstiges --- */
body.landscape-fullscreen #video-player { object-fit: contain; }
body.landscape-fullscreen #player-header,
body.landscape-fullscreen #mute-overlay,
body.landscape-fullscreen #play-button-overlay,
body.landscape-fullscreen .tooltip-overlay {
    opacity: 0;
    pointer-events: none;
}
body.landscape-fullscreen #call-to-action-overlay:not(.hidden) {
    opacity: 1;
    pointer-events: auto;
}