* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body {
    background-color: #0b0b0b;
    color: white;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: rgba(0,0,0,0.95);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 10;
    border-bottom: 1px solid #333;
}

.logo {
    color: #E50914;
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-right: auto;
    margin-left: 40px;
}

.nav-links a {
    color: #888;
    text-decoration: none;
    font-size: 16px;
    font-weight: bold;
    transition: color 0.3s;
    padding-bottom: 5px;
}

.nav-links a:hover {
    color: #e5e5e5;
}

.active-tab {
    color: white !important;
    border-bottom: 2px solid #E50914;
}

.search-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

#search-input {
    padding: 8px 15px;
    border-radius: 4px;
    border: 1px solid #444;
    background-color: #222;
    color: white;
    width: 250px;
}

#search-btn {
    background-color: #E50914;
    color: white;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.page-section.hidden {
    display: none;
}

.movie-row-container {
    padding: 10px 50px 20px 50px;
}

.movie-row-container h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    font-weight: bold;
    color: #e5e5e5;
}

.movie-row {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-behavior: smooth;
    align-items: flex-start;
}

.movie-row::-webkit-scrollbar {
    height: 8px;
}

.movie-row::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}

.movie-poster-wrapper {
    position: relative;
    width: 160px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.movie-poster-wrapper:hover {
    transform: scale(1.05);
    z-index: 10;
}

.movie-poster {
    width: 160px;
    height: auto;
    display: block;
    border-radius: 4px;
}

.poster-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 10px;
    text-align: center;
}

.movie-poster-wrapper:hover .poster-hover-overlay {
    opacity: 1;
}

.overlay-type {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #E50914;
    font-weight: bold;
}

.overlay-rating {
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.history-card-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 160px;
    flex-shrink: 0;
}

.delete-history-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(0,0,0,0.8);
    color: #ff4a4a;
    border: 1px solid rgba(255,74,74,0.4);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.history-card-wrapper:hover .delete-history-btn {
    opacity: 1;
}

.delete-history-btn:hover {
    background-color: #ff4a4a;
    color: white;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.98); /* Etwas dunkler für besseren Fokus */
    z-index: 99999; /* Zwingt das Fenster über ALLE anderen Elemente auf der Seite */
    display: flex;
    justify-content: center;
    align-items: center;
}

.hidden {
    display: none !important;
}

.close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 40px;
    cursor: pointer;
    z-index: 10;
}

.details-content {
    width: 90%;
    max-width: 900px;
    background-color: #141414;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 0 50px rgba(0,0,0,0.8);
    max-height: 90vh;
    overflow-y: auto;
}

.trailer-container {
    position: relative;
    width: 100%;
    padding-bottom: 50%;
    background-color: black;
}

.trailer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.trailer-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, #141414 0%, transparent 100%);
	pointer-events: none;
}

.details-info {
    position: relative;
    padding: 30px 50px 50px 50px;
    margin-top: 0px;
    z-index: 2;
}

#details-title {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

#details-rating {
    color: #46d369;
    font-weight: bold;
    margin-bottom: 15px;
}

#details-desc {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #d2d2d2;
    margin-bottom: 25px;
    max-width: 800px;
}

.action-buttons-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.watchlist-btn {
    background-color: rgba(109,109,110,0.6);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.watchlist-btn:hover {
    background-color: rgba(109,109,110,0.4);
    border-color: white;
}

.tv-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.custom-select {
    background-color: #222;
    color: white;
    padding: 12px 15px;
    border: 1px solid #444;
    border-radius: 6px;
    font-size: 14px;
    font-weight: bold;
    outline: none;
    cursor: pointer;
    min-width: 150px;
}

.btn {
    padding: 10px 24px;
    font-size: 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.play-btn {
    background-color: white;
    color: black;
}

.modal-content {
    width: 90%;
    max-width: 1000px;
    position: relative;
    z-index: 100000; /* Stellt sicher, dass das Video im Modal ganz oben liegt */
    background: #141414;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #333;
}

.server-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px; /* Schiebt die Buttons mit Abstand ÜBER das Video */
    width: 100%;
}

.server-btn {
    background-color: transparent;
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
}

.active-server {
    background-color: white;
    color: black;
    border-color: white;
}

.iframe-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    background-color: black;
    border-radius: 8px;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.related-container {
    padding: 0 50px 50px 50px;
}

.related-container h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    border-left: 4px solid #E50914;
    padding-left: 10px;
}

/* ==========================================================
   DROPDOWN & TOGGLE UI STYLES
   ========================================================== */
.interactive-header-section {
    position: relative;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 15px;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    user-select: none;
    color: #e5e5e5;
}

.red-bar {
    width: 4px;
    height: 24px;
    background-color: #e50914;
    margin-right: 12px;
    border-radius: 2px;
}

.chevron {
    font-size: 14px;
    margin-left: 10px;
    color: #888;
}

/* Toggle Buttons */
.toggle-group {
    display: flex;
    background-color: #1a1a1a;
    border-radius: 20px;
    border: 1px solid #333;
    overflow: hidden;
}

.toggle-btn {
    background: none;
    border: none;
    color: #888;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
}

.toggle-btn.active {
    color: #fff;
    background-color: #333;
    border-radius: 20px;
}

/* Floating Menus */
.dropdown-menu {
    position: absolute;
    top: 50px;
    left: 50px; /* Aligns with your 50px container padding */
    background-color: #1c1c1c;
    border-radius: 8px;
    width: 260px;
    padding: 10px 0;
    z-index: 50; /* Places it over the movie posters */
    box-shadow: 0 10px 30px rgba(0,0,0,0.9);
    border: 1px solid #333;
}

.hidden-menu {
    display: none !important;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    cursor: pointer;
    color: #ddd;
    font-size: 15px;
    font-weight: bold;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background-color: #2a2a2a;
    color: white;
}

/* Icons */
.icon-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}
.genre-icon { font-size: 18px; margin-right: 15px; width: 28px; text-align: center; }

/* Platform Colors */
.bg-netflix { background-color: #e50914; }
.bg-prime { background-color: #00a8e1; }
.bg-max { background-color: #002be7; }
.bg-disney { background-color: #00146b; }
.bg-apple { background-color: #000; border: 1px solid #444; }

/* MOBILE SUPPORT */
@media (max-width: 768px) {
    
    /* --- NEW NAVBAR FIXES --- */
    
    /* Hide the 2nd (Movies) and 3rd (Series) links in the navbar */
    .nav-links li:nth-child(2),
    .nav-links li:nth-child(3) {
        display: none;
    }

    /* Shrink the overall padding of the navbar so it fits */
    .navbar {
        padding: 15px 15px;
    }

    /* Make the logo slightly smaller */
    .logo {
        font-size: 20px;
    }

    /* Bring the Home button closer to the logo */
    .nav-links {
        margin-left: 15px;
        gap: 0;
    }

    /* Shrink the search bar so it doesn't break to a new line */
    #search-input {
        width: 120px;
        padding: 6px 10px;
    }

    #search-btn {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    /* --- YOUR EXISTING MOBILE FIXES BELOW --- */

    .movie-row-container {
        padding: 10px 20px 20px 20px; 
    }
    .dropdown-trigger { font-size: 1.2rem; }
    .dropdown-menu { left: 20px; width: calc(100% - 40px); }
    .toggle-btn { padding: 5px 10px; font-size: 11px; }
    .header-row { padding-right: 0; }
}
/* --- FINAL YOUTUBE LAYOUT FIX --- */
.trailer-container {
    position: relative !important;
    width: 100%;
    padding-bottom: 56.25% !important; /* Forces a perfect 16:9 YouTube aspect ratio */
    background-color: black;
    z-index: 1 !important; /* Puts the video back in the normal background layer */
}

#yt-placeholder {
    position: absolute !important; /* Forces the video to stretch and fill the black box */
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: auto !important;
}

/* --- SHOW ALL PAGE & GRID STYLES --- */
.show-all-btn {
    background: none;
    border: none;
    color: #888;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    margin-left: 15px;
}

.show-all-btn:hover {
    color: #fff;
}

.back-nav {
    padding: 20px 50px 0 50px;
    display: flex;
    align-items: center;
    gap: 15px;
}
.back-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.back-btn:hover {
    background-color: #555;
}

.movie-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 20px;
    padding: 20px 50px 50px 50px;
    justify-items: center;
}

@media (max-width: 768px) {
    .back-nav { padding: 10px 20px 0 20px; }
    .movie-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        padding: 15px 20px 50px 20px;
        gap: 10px;
    }
}
/* ==========================================================
   YTV+ STYLE FOOTER STYLING (FORCIERT)
   ========================================================== */
.ytv-footer {
    background-color: #0b0b0b !important;
    color: #e5e5e5 !important;
    padding: 60px 20px 40px 20px !important;
    text-align: center !important;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    margin-top: 80px !important;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Rotes 'T' im Logo-Stil */
.ytv-footer .footer-logo {
    font-size: 24px !important;
    font-weight: 900 !important;
    letter-spacing: 2px !important;
    color: #ffffff !important;
    margin-bottom: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.ytv-footer .footer-logo .red-letter {
    color: #E50914 !important;
    font-style: italic !important;
    margin-right: 2px !important;
    transform: skewX(-10deg) !important;
    display: inline-block !important;
}

.ytv-footer .footer-subtitle {
    color: #666666 !important;
    font-size: 13px !important;
    margin-bottom: 35px !important;
    font-weight: 500 !important;
    letter-spacing: 0.5px !important;
}

/* Flexbox erzwingen, damit die Buttons nebeneinander stehen */
.ytv-footer .footer-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 30px !important;
    flex-wrap: wrap !important;
    margin-bottom: 40px !important;
    list-style: none !important;
}

/* Styling für die Social-Buttons überschreibt globale Link-Styles */
.ytv-footer .footer-btn {
    color: #888888 !important;
    text-decoration: none !important;
    font-size: 13px !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: none !important;
    border: none !important;
    padding: 0 !important;
    transition: color 0.2s ease, transform 0.2s ease !important;
}
.ytv-footer .footer-btn i {
    font-size: 14px !important;
    display: inline-block !important;
}
.ytv-footer .footer-btn:hover {
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.ytv-footer .footer-divider {
    border: 0 !important;
    border-top: 1px solid #1c1c1c !important;
    max-width: 700px !important;
    margin: 0 auto 30px auto !important;
    display: block !important;
}

/* Untere Menü-Links */
.ytv-footer .footer-links {
    display: flex !important;
    justify-content: center !important;
    gap: 25px !important;
    margin-bottom: 25px !important;
    flex-wrap: wrap !important;
}
.ytv-footer .footer-links a {
    color: #666666 !important;
    text-decoration: none !important;
    font-size: 12px !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    transition: color 0.2s ease !important;
}
.ytv-footer .footer-links a:hover {
    color: #aaaaaa !important;
}

.ytv-footer .footer-copyright {
    color: #444444 !important;
    font-size: 12px !important;
    letter-spacing: 0.5px !important;
}
.ytv-footer .footnote-trigger {
    color: #E50914 !important;
    text-decoration: none !important;
    font-weight: bold !important;
}

/* Unauffällige Fußnote ganz unten */
.ytv-footer .footer-footnote {
    font-size: 11px !important;
    color: #2a2a2a !important;
    max-width: 500px !important;
    margin: 20px auto 0 auto !important;
    line-height: 1.5 !important;
    text-align: center !important;
}
.ytv-footer .footer-footnote a {
    color: #444444 !important;
    text-decoration: underline !important;
}
.ytv-footer .footer-footnote a:hover {
    color: #888888 !important;
}