* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: #000;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow: hidden;
    user-select: none;
}

/* Header oben links: Schlank für Ordner & Datum */
.filter-container {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 30;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    max-width: 90vw;
}

.filter-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.2);
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #ccc;
}

/* Identisches Styling für Ordner- und Datums-Dropdowns */
select#folderSelect, select#dateSelect {
    background: transparent;
    color: #fff;
    border: none;
    padding: 2px 5px;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    max-width: 130px;
    text-overflow: ellipsis;
}

/* Dunkler Hintergrund für die Dropdown-Optionen auf allen Systemen */
select#folderSelect option, select#dateSelect option {
    background: #111;
    color: #fff;
}

/* Fester TikTok-Style Footer am unteren Bildschirmrand */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 60px;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 40;
    padding-bottom: env(safe-area-inset-bottom); /* iOS Home-Bar Support */
}

.nav-item {
    background: transparent;
    border: none;
    color: #aaa;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-size: 11px;
    cursor: pointer;
    text-decoration: none;
    width: 33%;
    height: 100%;
    transition: color 0.2s ease, transform 0.1s ease;
}

.nav-item .nav-icon {
    font-size: 20px;
}

.nav-item.active, .nav-item:active {
    color: #ffb703;
    font-weight: bold;
}

/* Snap-Scroll Container */
#feed {
    height: 100vh;
    width: 100vw;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#feed::-webkit-scrollbar {
    display: none;
}

.card {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #050505;
}

.media-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Etwas Abstand unten, damit das Bild/Video nicht hinter den Controls hängt */
    padding-bottom: 70px; 
}

.card img, .card video {
    max-height: calc(100vh - 80px);
    max-width: 100%;
    object-fit: contain;
}

/* YouTube Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 15;
}

.video-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.overlay-btn {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(4px);
}

.overlay-btn.play-btn {
    width: 75px;
    height: 75px;
    font-size: 26px;
    background: rgba(255, 183, 3, 0.9);
    color: #000;
    border: none;
}

/* Progress-Bar – Platzierung über dem Footer */
.video-timeline {
    position: absolute;
    bottom: 115px;
    left: 15px;
    right: 80px;
    height: 20px;
    cursor: pointer;
    z-index: 22;
    display: flex;
    align-items: center;
}

.timeline-bg {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.timeline-progress {
    height: 100%;
    background: #ffb703;
    width: 0%;
}

/* Action-Buttons auf der rechten Seite */
.controls {
    position: absolute;
    right: 15px;
    bottom: 110px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 25;
}

.btn {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    color: white;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-fav.active {
    background: rgba(255, 183, 3, 0.9);
    color: #000;
}

/* Dateiname über dem Footer */
.filename {
    position: absolute;
    bottom: 75px;
    left: 15px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    max-width: 65%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
    z-index: 20;
}

.status-msg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #888;
    font-size: 16px;
    text-align: center;
}

/* Vollbild-Sperrbildschirm */
.lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
}

.lock-screen.hidden {
    display: none !important;
}

.lock-content {
    background: #111;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    width: 85%;
    max-width: 300px;
}

.lock-icon {
    font-size: 35px;
    margin-bottom: 10px;
}

.lock-content h3 {
    margin-bottom: 15px;
    font-size: 18px;
    color: #fff;
}

.lock-content input[type="password"] {
    width: 100%;
    padding: 12px;
    background: #222;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 18px;
    text-align: center;
    outline: none;
    margin-bottom: 12px;
}

.lock-content button {
    width: 100%;
    padding: 12px;
    background: #ffb703;
    border: none;
    border-radius: 10px;
    color: #000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
}

.lock-error {
    color: #ff4d4d;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}