/* GLOBAL RESET + OVERFLOW FIX */
*, *::before, *::after { box-sizing: border-box; }
html {
    overflow-y: scroll;
}
html, body {
    margin: 0; padding: 0; width: 100%; max-width: 100%;
    overflow-x: hidden !important;
    font-family: 'Open Sans', sans-serif;
    background: #fff; color: #000;
}
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Regular.woff2') format('woff2'),
         url('../fonts/OpenSans-Regular.woff') format('woff');
    font-weight: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Open Sans';
    src: url('../fonts/OpenSans-Bold.woff2') format('woff2'),
         url('../fonts/OpenSans-Bold.woff') format('woff');
    font-weight: bold;
    font-display: swap;
}
body { transition: 0.3s; }
.wrapper {
    max-width: 1000px; width: 100%;
    margin: 0 auto; text-align: center; padding: 0 16px;
}
.site-header {
    position: sticky; top: 0;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    padding: 15px 20px; border-bottom: 2px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1); z-index: 100;
}
.header-content {
    display: flex; align-items: center; justify-content: center;
    gap: 15px; flex-wrap: wrap; max-width: 1000px; margin: 0 auto;
}
.logo { font-size: clamp(22px,4vw,32px); animation: pulse 2s infinite; }
@keyframes pulse {0%{transform:scale(1);}50%{transform:scale(1.1);}100%{transform:scale(1);}}
.title h1 { margin: 0; font-size: clamp(20px,3vw,28px); }
.title p  { margin: 2px 0 0 0; font-size: clamp(12px,1.8vw,14px); opacity: 0.9; }
@media (max-width: 600px) { .header-content { flex-direction: column; gap: 8px; } }
.webcam-full {
    position: relative; display: flex; justify-content: center;
    margin: 20px auto 0; max-width: 100%; overflow: hidden;
    border-radius: 6px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
}
.webcam-full img {
    width: 100%; max-width: 1000px; height: auto;
    border-radius: 6px; display: block;
    animation: fadeIn 0.6s ease;
}
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.99); }
    to   { opacity: 1; transform: scale(1); }
}
.status-overlay {
    position: absolute; bottom: 12px; left: 12px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 14px; border-radius: 20px;
    font-size: clamp(12px,2vw,15px);
    display: flex; flex-direction: row; align-items: center;
    gap: 12px; pointer-events: none; z-index: 10;
    border: 1px solid rgba(255,255,255,0.15);
}

/* STATUS MOBILE */
.status-mobile {
    display: none;
    text-align: center;
    padding: 8px 12px;
    font-size: 13px;
    gap: 10px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin: 8px 16px 0;
}
body.night .status-mobile {
    background: rgba(255,255,255,0.06);
    color: #e6e6e6;
}

.live    { color: #0a8f2a; }
.offline { color: #c40000; }
.status-weather-separator { height: 40px; }
.weather-container {
    max-width: 1000px; margin: 0 auto 40px auto;
    padding: 0 16px; overflow-x: hidden;
}
.weather-container, .weatherwidget-io, .weatherwidget-io iframe {
    max-width: 100% !important; width: 100% !important;
    box-sizing: border-box !important; display: block !important;
}
.weatherwidget-io iframe { min-width: 0 !important; }
.wrapper-content {
    max-width: 1000px; width: 100%; margin: 20px auto;
    text-align: left; padding: 0 16px; line-height: 1.6;
}
.wrapper-content h1 {
    text-align: center; font-size: clamp(24px,4vw,32px); margin-bottom: 20px;
}
.site-footer {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    box-sizing: border-box;
    background: linear-gradient(to bottom, #ffffff, #f9f9f9);
    padding: 15px 20px; border-top: 2px solid #eee;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15); text-align: center;
}
.site-footer a {
    color: #000; text-decoration: none; margin: 0 10px;
    font-size: clamp(12px,1.8vw,16px);
}
.site-footer a:hover { text-decoration: underline; }
body.night { background: #0f1115; color: #e6e6e6; }
body.night .site-header,
body.night .site-footer { background: linear-gradient(to bottom,#222,#333); border-color: #444; }
body.night .site-footer a { color: #e6e6e6; }
body.night .status-overlay { background: rgba(0,0,0,0.55); }
body.night .live    { color: #4cd964; }
body.night .offline { color: #ff5f57; }
body.night .weatherwidget-io { filter: invert(0.85) hue-rotate(180deg); }
body.night .webcam-full {
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}
.theme-toggle {
    position: fixed; top: 12px; right: 12px; border: none;
    background: #eee; padding: 8px 10px; border-radius: 8px;
    cursor: pointer; z-index: 999;
}
body.night .theme-toggle { background: #222; color: #fff; }

/* ZURÜCK NACH OBEN BUTTON */
#backToTop {
    position: fixed; bottom: 24px; right: 16px;
    background: #333; color: #fff;
    border: none; border-radius: 50%;
    width: 44px; height: 44px;
    font-size: 20px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 998; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
#backToTop.visible { opacity: 1; pointer-events: auto; }
#backToTop:hover { transform: translateY(-3px); }
body.night #backToTop { background: #555; }

/* COOKIE BANNER */
#cookieOverlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.35);
    display: flex; justify-content: center; align-items: flex-end;
    z-index: 9999; opacity: 0; pointer-events: none;
    transition: opacity 0.4s ease;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
#cookieOverlay.active { opacity: 1; pointer-events: auto; }
#cookieBanner {
    background: #fff;
    width: 100%; max-width: 100%;
    padding: 20px 24px 28px;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
    border-top: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.12);
}
#cookieOverlay.active #cookieBanner { transform: translateY(0); }
#cookieBanner p {
    margin: 0 0 14px;
    font-size: 13px; color: #555; line-height: 1.5; max-width: 700px;
}
#cookieBanner .buttons {
    display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 0;
}
#cookieBanner .buttons button {
    flex: 1; min-width: 120px; padding: 10px 16px;
    border: none; border-radius: 8px;
    font-size: 13px; font-weight: bold;
    cursor: pointer; transition: opacity 0.2s, transform 0.15s;
}
#cookieBanner .buttons button:hover { opacity: 0.85; transform: translateY(-1px); }
#acceptAll       { background: #4cd964; color: #fff; }
#acceptSelection { background: #f0f0f0; color: #333; }
#rejectAll       { background: #f0f0f0; color: #333; }
.cookie-options {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px solid #eee; display: none;
}
.cookie-options.open { display: block; }
.cookie-options label {
    display: flex; align-items: center; gap: 8px;
    margin: 6px 0; font-size: 13px; color: #444; cursor: pointer;
}
.cookie-options input { transform: scale(1.2); accent-color: #4cd964; }
.cookie-options button {
    margin-top: 10px; padding: 10px 16px;
    border-radius: 8px; background: #333; color: #fff;
    width: auto; font-size: 13px;
    font-weight: bold; cursor: pointer; border: none;
    transition: opacity 0.2s;
}
.cookie-options button:hover { opacity: 0.8; }
body.night #cookieBanner {
    background: #1e2128;
    border-top-color: rgba(255,255,255,0.08);
    box-shadow: 0 -8px 32px rgba(0,0,0,0.4);
}
body.night #cookieBanner p { color: #aaa; }
body.night #acceptSelection,
body.night #rejectAll { background: #2e3240; color: #e6e6e6; }
body.night .cookie-options { border-top-color: #333; }
body.night .cookie-options label { color: #ccc; }
body.night .cookie-options button { background: #555; }
@media (max-width: 600px) {
    #cookieBanner { padding: 16px 16px 24px; }
    #cookieBanner .buttons { flex-direction: column; }
    #cookieBanner .buttons button { width: 100%; }
}

/* ZEITRAFFER */
.timelapse-wrap {
    position: relative; max-width: 100%; margin: 0 auto;
    border-radius: 6px; overflow: hidden;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.10);
}
.timelapse-wrap img {
    width: 100%; height: auto; display: block; border-radius: 6px;
}
.tl-overlay {
    position: absolute; bottom: 12px; left: 12px;
    background: rgba(0,0,0,0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff; padding: 8px 14px; border-radius: 20px;
    font-size: clamp(12px,2vw,15px);
    display: flex; gap: 12px; align-items: center;
    border: 1px solid rgba(255,255,255,0.15);
    pointer-events: none;
}
.tl-controls {
    margin-top: 16px; display: flex;
    flex-direction: column; gap: 12px; align-items: center;
}
.tl-controls input[type=range] { width: 100%; accent-color: #4cd964; }
.tl-buttons { display: flex; gap: 10px; }
.tl-buttons button {
    padding: 10px 20px; border: none; border-radius: 8px;
    background: #333; color: #fff;
    font-size: 16px; cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.tl-buttons button:hover { opacity: 0.8; transform: translateY(-1px); }
.tl-speed label, .tl-filter label {
    font-size: 14px; display: flex; align-items: center; gap: 8px;
}
.tl-speed select {
    padding: 6px 10px; border-radius: 6px;
    border: 1px solid #ccc; font-size: 14px;
}
.tl-filter {
    display: flex; flex-wrap: wrap;
    gap: 10px; align-items: center; justify-content: center;
}
.tl-filter input[type=date] {
    padding: 6px 10px; border-radius: 6px;
    border: 1px solid #ccc; font-size: 14px;
}
.tl-filter button {
    padding: 8px 16px; border: none; border-radius: 8px;
    background: #333; color: #fff; font-size: 13px; cursor: pointer;
}
.tl-filter button:hover { opacity: 0.8; }

/* ZEITRAFFER LINK BUTTON */
.timelapse-link { margin: 16px auto 0; text-align: center; }
.timelapse-link a {
    display: inline-block; padding: 10px 24px;
    background: #333; color: #fff;
    border-radius: 8px; text-decoration: none;
    font-size: 15px; transition: opacity 0.2s, transform 0.15s;
}
.timelapse-link a:hover { opacity: 0.8; transform: translateY(-1px); }
body.night .tl-buttons button,
body.night .tl-filter button { background: #555; }
body.night .tl-speed select,
body.night .tl-filter input[type=date] {
    background: #2e3240; color: #e6e6e6; border-color: #444;
}
body.night .timelapse-wrap {
    box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 2px 8px rgba(0,0,0,0.3);
}
body.night .timelapse-link a { background: #555; }

/* SPONSOREN / WERBEBANNER */
.sponsor-wrap {
    margin: 20px auto 0;
    max-width: 1000px;
    text-align: center;
}
.sponsor-label {
    font-size: 12px;
    color: #333;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    text-align: left;
    padding-left: 2px;
}
.sponsor-slider {
    position: relative;
    width: 100%; height: auto;
    border-radius: 8px;
    overflow: hidden;
}
.sponsor-slide { display: none; width: 100%; }
.sponsor-slide.active {
    display: block;
    width: 100%;
    line-height: 0;
}
.sponsor-slide img {
    width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 8px;
    transition: opacity 0.4s ease;
    display: block;
}
.sponsor-slide img:hover { opacity: 0.9; }
.sponsor-dots {
    display: flex; justify-content: center;
    gap: 6px; margin-top: 8px;
}
.sponsor-dot {
    width: 8px; height: 8px;
    border-radius: 50%; background: #ccc;
    cursor: pointer; transition: background 0.3s;
}
.sponsor-dot.active { background: #333; }
body.night .sponsor-dot { background: #555; }
body.night .sponsor-dot.active { background: #fff; }
body.night .sponsor-label { color: #bbb; }

/* RESPONSIVE – Mobile: Status-Overlay verstecken, Mobile-Block zeigen */
@media (max-width: 600px) {
    .status-overlay { display: none; }
    .status-mobile  { display: flex; }
}
