/* =========================================
   V8 ENGINE - GLOBAL CSS - GOLD MASTER
   Features: PWA, Smart Search, True Modal,
   Super Cards, Snap History, Custom Stream UI
   ========================================= */

/* --- 1. CONFIG & VARIABLES --- */
:root {
    /* Dimensions */
    --nav-height: 60px;
    --container-width: 1400px;
    --sidebar-width: 400px;
    --item-height: 60px;
    --font-weight-default: 600;
    
    /* Colors - Fixed Nav (Always Dark) */
    --nav-bg: #1f1f1f;
    --nav-text: #ffffff;
    --nav-accent: #cf4a00;
    --nav-accent-hover: #e65a00;
    
    /* Dynamic Theme Colors (Default: Light) */
    --bg-body: #f4f4f4;
    --bg-card: #ffffff;
    --bg-panel: #ffffff;
    --text-main: #111111;
    --text-muted: #333333;
    --border-color: #dddddd;
    
    /* Shadows */
    --shadow-orig: 9px 9px 26px #dbdbdb, -9px -9px 26px #ffffff;
    --shadow-float: 0 10px 30px rgba(0,0,0,0.1);
    
    /* Utility */
    --transition-time: 0.4s;
}

/* DARK MODE OVERRIDES */
body.dark-mode {
    --bg-body: #121212;
    --bg-card: #1e1e1e;
    --bg-panel: #1e1e1e;
    --text-main: #f0f0f0;
    --text-muted: #aaaaaa;
    --border-color: #333333;
    
    /* Dark Shadows */
    --shadow-orig: 5px 5px 15px #0a0a0a, -5px -5px 15px #252525;
    --shadow-float: 0 10px 30px rgba(0,0,0,0.5);
}

*, *::before, *::after { box-sizing: border-box; }

/* GLOBAL STABILITY (Verhindert das Springen der Navi beim Öffnen von Modals) */
html {
    scrollbar-gutter: stable;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden; /* Mobile Safety */
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: var(--font-weight-default);
}

h3 {
    font-weight: var(--font-weight-default);
    padding: 0 0 2px 20px;
    font-size: 1.5rem;
  text-align: center;
}


img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }


/* --- 2. ICON ENGINE --- */
.icon {
    display: inline-block;
    width: 24px; height: 24px;
    background-color: currentColor; 
    -webkit-mask-size: contain; mask-size: contain;
    -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
    -webkit-mask-position: center; mask-position: center;
    vertical-align: middle;
}

/* Standard Icons */
.icon-heart, .icon-heart-big, .icon-heart-small { 
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z'%3E%3C/path%3E%3C/svg%3E");
}
.icon-close {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='18' y1='6' x2='6' y2='18'%3E%3C/line%3E%3Cline x1='6' y1='6' x2='18' y2='18'%3E%3C/line%3E%3C/svg%3E");
}
.icon-play {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
}
.icon-arrow-down {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    transition: transform 0.3s;
}
.stream-accordion-item.open .icon-arrow-down { transform: rotate(180deg); }

/* Categories & Devices */
.cat-icon { width: 28px; height: 28px; margin-right: 5px; background-color: var(--nav-accent); }
.icon-clock {
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='12' x2='12' y2='6'/%3E%3Cline x1='12' y1='12' x2='16' y2='14'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='12' x2='12' y2='6'/%3E%3Cline x1='12' y1='12' x2='16' y2='14'/%3E%3C/svg%3E");
}
.icon-gamepad { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zm0 9l2.5-1.25L12 8.5l-2.5 1.25L12 11zm0 2.5l-5-2.5-5 2.5L12 22l10-8.5-5-2.5-5 2.5z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M12 2L2 7l10 5 10-5-10-5zm0 9l2.5-1.25L12 8.5l-2.5 1.25L12 11zm0 2.5l-5-2.5-5 2.5L12 22l10-8.5-5-2.5-5 2.5z'/%3E%3C/svg%3E"); }
.icon-tv { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M21 6H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 10H3V8h2v4h2V8h2v4h2V8h2v4h2V8h2v8z'/%3E%3C/svg%3E"); }
.icon-film { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M19.8 4l-1.8 1.8L16.2 4H14l1.8 1.8L14 7.6V20h8V7.6l-1.8-1.8L22 4h-2.2zM8 7.6L6.2 5.8 8 4H5.8L4 5.8 2.2 4H0v16h8V7.6z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Cpath d='M19.8 4l-1.8 1.8L16.2 4H14l1.8 1.8L14 7.6V20h8V7.6l-1.8-1.8L22 4h-2.2zM8 7.6L6.2 5.8 8 4H5.8L4 5.8 2.2 4H0v16h8V7.6z'/%3E%3C/svg%3E"); }
.icon-device-pc { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M21 2H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h7v2H8v2h8v-2h-2v-2h7c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm0 14H3V4h18v12z'/%3E%3C/svg%3E"); width: 14px; height: 14px; opacity: 0.6; background-color: #333; }
.icon-device-mobile { -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z'/%3E%3C/svg%3E"); mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Cpath d='M17 1.01L7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z'/%3E%3C/svg%3E"); width: 14px; height: 14px; opacity: 0.6; background-color: #333; }
body.dark-mode .icon-device-pc, body.dark-mode .icon-device-mobile { background-color: #ccc; }


/* --- 3. THEME TOGGLE (MOBILE SVG ONLY) --- */
.theme-toggle {
    width: 24px; height: 24px; background-color: transparent; border: none; cursor: pointer;
    background-size: contain; background-repeat: no-repeat; background-position: center;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Standard Bild (Mond) für Mobile */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
}

/* Drehung NUR für Mobile (da kein Text dabei ist) */
body.dark-mode .mobile-toggle {
    transform: rotate(180deg);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
}

/* DESKTOP RESET: Button darf sich NICHT drehen (sonst steht Text auf dem Kopf) */
body.dark-mode .desk-toggle {
    transform: none !important; 
    background-image: none !important; /* Kein BG-Bild, da Icon via Span kommt */
}

/* DESKTOP ICON: Nur das Icon dreht sich! */
.desk-toggle .toggle-icon { transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
body.dark-mode .desk-toggle .toggle-icon { transform: rotate(180deg); }


/* --- 4. LAYOUT SYSTEM --- */
.page-wrapper { max-width: var(--container-width); margin: 0 auto; padding: 80px 20px 0px 20px; width: 100%; }
.layout-grid { display: grid; grid-template-columns: 1fr; gap: 40px; margin-bottom: 60px; }
@media (min-width: 1200px) { .layout-grid { grid-template-columns: minmax(0, 1fr) var(--sidebar-width); align-items: start; } }

/* Sidebar */
.sidebar-highlight-wrapper {
    position: relative; background: var(--bg-card); border-radius: 15px;
    box-shadow: var(--shadow-orig); margin-top: 60px; margin-bottom: 40px;
    overflow: hidden; transition: transform 0.3s ease; border: 1px solid transparent;
}
body.dark-mode .sidebar-highlight-wrapper { border-color: var(--border-color); }
.sidebar-highlight-wrapper:hover { transform: translateY(-5px); }
.highlight-badge {
    position: absolute; top: 15px; left: 15px; z-index: 5;
    background: var(--nav-accent); color: white; padding: 5px 12px;
    border-radius: 20px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.highlight-img-box { width: 100%; aspect-ratio: 4/3; overflow: hidden; border-bottom: 1px solid var(--bg-body); }
.highlight-img-box img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.sidebar-highlight-wrapper:hover .highlight-img-box img { transform: scale(1.05); }
.highlight-content { padding: 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.highlight-title { font-size: 1.2rem; font-weight: 800; color: var(--text-main); margin-bottom: 5px; }
.highlight-sub { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; }
.highlight-btn {
    background: var(--text-main); color: var(--bg-card); border: none;
    padding: 10px 25px; border-radius: 50px; font-weight: 700; cursor: pointer; width: 100%;
    transition: background 0.2s;
}
.highlight-btn:hover { background: var(--nav-accent); color: white; }

.sidebar-list { display: flex; flex-direction: column; gap: 15px; }
.sidebar-card {
    display: flex; align-items: center; background: var(--bg-card); padding: 10px;
    border-radius: 12px; box-shadow: var(--shadow-orig); text-decoration: none;
    transition: transform 0.2s ease; border: 1px solid transparent;
    position: relative; overflow: hidden; max-width: 100%;
}
body.dark-mode .sidebar-card { border-color: var(--border-color); }
.sidebar-card:hover { transform: translateX(5px); }
.sidebar-card-img { width: 70px; height: 70px; border-radius: 8px; overflow: hidden; flex-shrink: 0; margin-right: 15px; }
.sidebar-card-img img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-card-info { flex-grow: 1; display: flex; flex-direction: column; gap: 5px; }
.sidebar-card-title { color: var(--text-main); font-size: 0.95rem; }
.sidebar-play-btn {
    font-size: 0.75rem; background: var(--nav-accent); color: white;
    padding: 4px 12px; border-radius: 10px; align-self: flex-start;
    box-shadow: 0 2px 4px rgba(207, 74, 0, 0.2);
}
.sidebar-list.expanded .hidden-row { display: flex; animation: slideInFade 0.3s ease; }
.hidden-row { display: none; }
@keyframes slideInFade { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
.sidebar-more-btn {
    width: 100%; padding: 10px; margin-top: 10px; background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 8px; color: var(--text-muted); font-weight: bold; cursor: pointer;
}
.ad-placeholder {
    width: 100%; height: 250px; background: #e0e0e0; border: 1px dashed #999;
    display: flex; align-items: center; justify-content: center; color: #666;
    margin-bottom: 20px; border-radius: 8px;
}
.sidebar-column { display: none; }
@media (min-width: 1200px) { .sidebar-column { display: block; height: 100%; } }
.sidebar-billboard { margin-bottom: 40px; }
.sidebar-tower { position: sticky; top: 110px; display: flex; flex-direction: column; gap: 20px; }

/* --- 5. NAVIGATION (FINAL ALIGNMENT) --- */
.main-nav {
    display: flex; 
    align-items: center; 
    /* WICHTIG: Alles nach rechts schieben! */
    justify-content: flex-end;
    
    height: var(--nav-height); 
    background-color: var(--nav-bg);
    position: fixed; top: 0; left: 0; width: 100%; z-index: 10000;
    
    /* LOGO (Links im Hintergrund) */
    background-image: url('logo.svg');
    background-repeat: no-repeat;
    background-position: 5px -2px; /* Links 15px Rand */
    background-size: 180px auto;
    
    /* PLATZRESERVIERUNG */
    padding: 0 15px 0 205px; /* Schützt das Logo vor Überlappung */
}

/* Icons weiß machen (Logo ist im BG, also kein Konflikt mehr) */
.main-nav .icon { background-color: white !important; }

/* DESKTOP OPTIMIERUNG */
@media (min-width: 1200px) {
    .main-nav {
        background-size: 220px auto; /* Größeres Marken-Branding auf Desktop */
        padding-left: 260px; /* 220px Logo + 40px Schutzzone für Menü-Links */
                background-position: 15px -8px;
    }
}

/* MOBILE CONTROLS */
.nav-right { display: flex; align-items: center; gap: 20px; }
.nav-search-mobile { display: flex; align-items: center; background: none; border: none; padding: 0; }
.nav-toggle { display: block; background: none; border: none; padding: 10px; cursor: pointer; }
.nav-toggle span {
    display: block; width: 22px; height: 2px; background-color: white !important; margin: 4px 0;
    transition: transform 0.4s, opacity 0.4s;
}
.main-nav.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.main-nav.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.main-nav.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* MENU LIST (Mobile) */
#nav-menu-list {
    list-style: none; margin: 0; padding: 0;
    position: absolute; top: var(--nav-height); left: 0; right: 0;
    background-color: var(--nav-bg);
    transform: translateX(-100%); transition: transform 0.4s ease-out;
    max-height: calc(100vh - var(--nav-height)); overflow-y: auto; padding-bottom: 40px;
}
.main-nav.nav-open #nav-menu-list { transform: translateX(0); }

.nav-item { position: relative; }
.nav-item a {
    display: flex; align-items: center; padding: 0 20px;
    color: var(--nav-text); text-decoration: none; font-size: 1rem;
    height: var(--item-height); position: relative; z-index: 1;
}
.submenu-toggle {
    display: block; position: absolute; right: 0; top: 0; height: var(--item-height); width: 70px;
    background: none; border: none; color: var(--nav-text); font-size: 1.2rem; cursor: pointer; z-index: 2;
}
.submenu-toggle::after { content: '▼'; display: inline-block; transition: transform 0.25s ease; }
.nav-item.submenu-open > .submenu-toggle::after { transform: rotate(180deg); color: #cf4a00; }
.sub-menu {
    list-style: none; padding-left: 0; margin: 0; background-color: #111;
    max-height: 0; overflow: hidden; transition: max-height 0.35s ease;
}
.nav-item.submenu-open > .sub-menu { max-height: none; }
.sub-menu .nav-item a { padding-left: 35px; }

.desktop-only { display: none; }

/* --- DESKTOP MODE (CLEAN & STABLE) --- */
@media (min-width: 1200px) {
    .nav-toggle, .submenu-toggle, .nav-search-mobile, #heart-trigger-mobile, .mobile-toggle { display: none !important; }
    .desktop-only { display: flex; }

    #nav-menu-list {
        position: static; transform: none; display: flex; flex-grow: 1;
        /* Gleichmäßige Verteilung */
        justify-content: space-between; 
        align-items: center; height: 100%;
        max-height: none; overflow-y: visible; gap: 0; padding: 0;
    }
    .main-nav { justify-content: flex-start; }
    
    .nav-item { height: 100%; flex: 1; display: flex; justify-content: center; }
    
    /* Links & Buttons (Einheitlicher Look) */
    .nav-item a, .desk-toggle {
        display: flex; align-items: center; justify-content: center;
        height: 100%; padding: 0 10px; width: 100%;
        
        /* Font Consistency Force */
        color: var(--nav-text); 
        text-decoration: none; 
        font-size: 1rem; 
        font-weight: 600 !important; /* Zwingend Fett für beide! */
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        
        white-space: nowrap; 
        background: transparent; border: none; cursor: pointer;
        transition: background-color 0.2s;
    }
    
    /* Hover: Nur direktes Element, kein Parent-Bleeding */
    .nav-item > a:hover, .desk-toggle:hover { 
        background-color: var(--nav-accent); color: white;
    }

    /* Pfeile */
    .nav-item.has-submenu > a::after, .nav-item.has-arrow > a::after {
        content: ' ▼'; font-size: 0.7rem; margin-left: 6px; opacity: 0.7; position: relative; top: -1px;
    }
    .sub-menu .nav-item.has-submenu > a::after { content: ' ▶'; top: 0; }

    /* SUBMENÜ */
    .sub-menu {
        position: absolute; top: var(--nav-height); left: 0; width: 100%;
        background-color: var(--nav-bg); opacity: 1; visibility: hidden;
        max-height: none; overflow: visible; pointer-events: none; transition: none;
        z-index: 1500;
    }
    /* Öffnen bei Hover */
    .nav-item.has-submenu:hover > .sub-menu {
        opacity: 1; visibility: visible; pointer-events: auto;
    }
    
    .sub-menu.scroll { max-height: 540px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--nav-accent) var(--nav-hover); }
    .sub-menu .nav-item { width: 100%; flex: none; height: auto; }
    .sub-menu .nav-item a { justify-content: flex-start; padding: 0 20px; height: var(--item-height); }
    .sub-menu .nav-item.has-submenu > .sub-menu { top: 0; left: 100%; width: auto; min-width: 220px; }

    /* LICHTSCHALTER (Full Reset & Styling) */
    .desk-toggle { 
        /* 1. Button Reset (Browser-Styles killen) */
        background: transparent !important;
        background-image: none !important; /* Mobile SVG löschen */
        border: none; 
        cursor: pointer; 
        
        /* 2. Layout & Text (Identisch zu .nav-item a) */
        display: flex; align-items: center; justify-content: center;
        width: 100%; height: 100%;
        padding: 0 20px; 
        color: var(--nav-text); 
        font-size: 1rem; font-weight: 500; font-family: inherit;
        gap: 10px; /* Abstand Icon <-> Text */
        
        /* 3. Animation Reset */
        transform: none !important; /* Kein Drehen des ganzen Buttons! */
        transition: background-color 0.2s;
    }
    
    /* HOVER (Orange wie der Rest) */
    .desk-toggle:hover { 
        background-color: var(--nav-accent) !important; 
        color: white !important; 
    }

    /* TEXT TOGGLE LOGIK */
    .toggle-text-dark { display: none; }
    body.dark-mode .toggle-text-light { display: none; }
    body.dark-mode .toggle-text-dark { display: inline; }
    
    /* ICON (Nur das kleine Icon dreht sich) */
    .desk-toggle .toggle-icon {
        width: 18px; height: 18px; background-color: currentColor; /* Nimmt Textfarbe an */
        
        /* Masken für Umfärbung */
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
        
        -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
        -webkit-mask-position: center; mask-position: center;
        background-image: none !important; /* Sicherstellen, dass kein Bild da ist */
        
        transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }
    
    /* Drehung im Dark Mode (Nur Icon!) */
    body.dark-mode .desk-toggle .toggle-icon {
        transform: rotate(180deg);
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
    }
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z'%3E%3C/path%3E%3C/svg%3E");
        background-image: none !important;
    }
    body.dark-mode .desk-toggle .toggle-icon {
        -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
        mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='5'%3E%3C/circle%3E%3Cline x1='12' y1='1' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='23'%3E%3C/line%3E%3Cline x1='4.22' y1='4.22' x2='5.64' y2='5.64'%3E%3C/line%3E%3Cline x1='18.36' y1='18.36' x2='19.78' y2='19.78'%3E%3C/line%3E%3Cline x1='1' y1='12' x2='3' y2='12'%3E%3C/line%3E%3Cline x1='21' y1='12' x2='23' y2='12'%3E%3C/line%3E%3Cline x1='4.22' y1='19.78' x2='5.64' y2='18.36'%3E%3C/line%3E%3Cline x1='18.36' y1='5.64' x2='19.78' y2='4.22'%3E%3C/line%3E%3C/svg%3E");
    }
}


/* --- HEART & BADGE SYSTEM --- */

/* Wrapper für Mobile (in nav-right) & Desktop */
.nav-heart-wrapper { 
    position: relative; 
    display: flex; align-items: center; justify-content: center; 
    color: var(--nav-text); cursor: pointer; margin-right: 15px; 
}

/* Der rote Zähler-Punkt (Fixed Position) */
.nav-badge { 
    position: absolute; 
    
    /* WICHTIG: Zurück zur harten Ecke! */
    top: -6px; 
    right: -8px;
    
    /* Reset der alten Versuche (Sicherheit) */
    left: auto !important; 
    margin: 0 !important;
    
    /* Styling */
    background-color: #ff3b30; 
    color: white; 
    font-size: 9px; font-weight: 800; 
    height: 16px; min-width: 16px; 
    border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    
    border: none; /* Kein Rand (sieht besser aus auf Orange) */
    z-index: 2;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Sicherstellen, dass der Wrapper der Anker ist */
.nav-heart-wrapper {
    position: relative !important;
    display: inline-flex !important; /* Zieht sich auf Icon-Größe zusammen */
    vertical-align: middle;
}

/* --- 6. DASHBOARD (TRUE MODAL - POLISHED) --- */
.dashboard-panel {
    display: none; 
    position: fixed; top: var(--nav-height); left: 0; right: 0; bottom: 0;
    background-color: var(--bg-body); 
    z-index: 2000;
    overflow-y: auto; 
    padding: 40px 20px 80px 20px; 
    animation: fadeIn 0.3s ease-out;
    
    /* SCROLLBAR STABILIZATION (Anti-Jerk Engine) */
    overflow-y: auto;           /* Scrollt nur wenn nötig */
    scrollbar-gutter: stable;   /* WICHTIG: Reserviert den Platz IMMER -> Kein Springen! */
    
    /* Firefox Styling */
    scrollbar-width: thin;
    scrollbar-color: var(--nav-accent) transparent; /* Track ist unsichtbar */
}

/* Webkit Scrollbar Styling (Chrome, Edge, Safari) */
.dashboard-panel::-webkit-scrollbar {
    width: 14px; /* Feste Breite für die Reservierung */
}
.dashboard-panel::-webkit-scrollbar-track {
    background: transparent; /* Track bleibt unsichtbar */
}
.dashboard-panel::-webkit-scrollbar-thumb {
    background-color: var(--nav-accent); /* Der orange Schieber */
    border-radius: 10px;
    border: 4px solid transparent; /* Macht den Schieber optisch schlanker */
    background-clip: content-box;
}

body.dark-mode .dashboard-panel { background-color: #121212; }
.dashboard-panel.active { display: block; }

/* SCROLL LOCK: Verhindert doppelten Scrollbalken & Ruckeln */
body:has(.dashboard-panel.active) {
    overflow: hidden;
}

/* CLOSE BUTTON (Floating & Safe) */
.dashboard-close {
    position: fixed; 
    top: calc(var(--nav-height) + 20px); 
    right: 20px;
    width: 44px; height: 44px; 
    border-radius: 50%; border: 1px solid var(--border-color); 
    background: var(--bg-card); color: var(--text-main);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); 
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 2010;
}
.dashboard-close:hover { 
    transform: rotate(90deg) scale(1.1); 
    background: var(--nav-accent); color: white; border-color: var(--nav-accent);
}

/* CONTENT CONSTRAINTS */
.dashed-header, .dashboard-tabs, .dash-content, .pwa-dash-area {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    width: 100%;
}

.dashed-header {
    text-align: center; font-size: 1.8rem; margin-bottom: 30px;
    color: var(--text-main); font-weight: 800; letter-spacing: -0.5px;
}

.dashboard-tabs { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; flex-wrap: wrap; }
.dash-tab {
    padding: 12px 30px; border: 1px solid transparent; 
    background: var(--bg-card); border-radius: 50px;
    color: var(--text-muted); font-weight: 700; cursor: pointer; 
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
body.dark-mode .dash-tab { background: #1e1e1e; border-color: #333; }
.dash-tab:hover { transform: translateY(-2px); color: var(--text-main); }
.dash-tab.active { 
    background: var(--nav-accent); color: white; 
    box-shadow: 0 4px 15px rgba(207, 74, 0, 0.4); border-color: var(--nav-accent);
}

.dash-content { display: none; animation: slideUpFade 0.4s ease; }
.dash-content.active { display: block; }
@keyframes slideUpFade { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- DASHBOARD LISTS --- */
.favorites-streams-list {
    display: flex; flex-direction: column; gap: 20px; /* Match Main List Gap */
    padding-top: 10px; /* Safety for Tabs */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .dashboard-panel { padding: 80px 15px 80px 15px; } /* More top padding for Close Button */
}


/* --- 7. V8 SUPER CARDS --- */
.games-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 30px; padding: 0 15px; margin-bottom: 50px; }
@media (min-width: 900px) { .games-grid { padding: 0; } }

.game-card-wrapper {
    position: relative; border-radius: 15px;
    box-shadow: var(--shadow-orig); background: linear-gradient(145deg, var(--bg-card), var(--bg-body));
    padding: 15px; display: flex; flex-direction: column; gap: 10px;
}
body.dark-mode .game-card-wrapper { background: var(--bg-card); border: 1px solid var(--border-color); }

.game-card-image-link {
    display: block; border-radius: 8px; overflow: hidden;
    transform-style: preserve-3d; cursor: pointer;
}
.game-card-image-link img { width: 100%; height: auto; display: block; border-radius: 8px; }

@keyframes rotate360{0%{transform:rotateY(0deg)}100%{transform:rotateY(360deg)}}
.rotate-infinite{animation:rotate360 2s linear infinite}
.rotate-once{animation:rotate360 2s linear 1 forwards}

.index_headline {
    display: block; font-size: 1.1rem; margin: 5px 0; background: var(--bg-body);
    border-radius: 8px; padding: 8px; text-align: center;
    color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.05);
    font-weight: var(--font-weight-default);
}
body.dark-mode .index_headline { background: #2a2a2a; }

.game-card-cockpit {
    display: flex; align-items: center; justify-content: space-between;
    margin-top: auto; padding-top: 5px;
}

/* --- UNIVERSAL HEART ENGINE (Styles for ALL Hearts) --- */

/* 1. Basis-Button (Nur für die Super-Cards) */
.card-heart-action {
    width: 38px; height: 38px; border-radius: 50%; border: none;
    background: var(--bg-body); box-shadow: 3px 3px 6px rgba(0,0,0,0.1), -3px -3px 6px rgba(255,255,255,0.5);
    display: flex; align-items: center; justify-content: center; cursor: pointer; transition: transform 0.1s;
}
body.dark-mode .card-heart-action { background: #2a2a2a; box-shadow: none; border: 1px solid #444; }
.card-heart-action:active { transform: scale(0.9); }

/* CRITICAL FIX: Icons dürfen nicht kollabieren */
.card-heart-action .icon {
    display: block !important; /* Zwingt das Icon zur Sichtbarkeit */
    width: 20px; height: 20px; /* Feste Größe */
    margin: 0 auto; /* Zentrierung */
    flex-shrink: 0;
}


/* 2. Icon Farben (Gilt für ALLE Herz-Typen: Sidebar, Hero, Action) */
.card-heart .icon, 
.card-heart-big .icon, 
.card-heart-action .icon { 
    background-color: #666; /* Standard Grau */
    transition: background-color 0.2s, transform 0.2s; 
} 
/* Dark Mode: Helleres Grau für Sichtbarkeit */
body.dark-mode .card-heart .icon,
body.dark-mode .card-heart-big .icon,
body.dark-mode .card-heart-action .icon { 
    background-color: #aaa; 
}

/* 3. LIKED STATE (Rot - ZWINGEND !important) */
.card-heart.liked .icon,
.card-heart-big.liked .icon,
.card-heart-action.liked .icon,
body.dark-mode .card-heart.liked .icon, 
body.dark-mode .card-heart-big.liked .icon,
body.dark-mode .card-heart-action.liked .icon { 
    background-color: #ff3b30 !important; 
    transform: scale(1.0); /* Reset Scale */
}

/* 4. HOVER LOGIK (Nur Desktop/Maus) */
@media (hover: hover) {
    /* Hover über leeres Herz -> Orange Vorschau */
    .card-heart:hover .icon,
    .card-heart-big:hover .icon,
    .card-heart-action:hover .icon {
        background-color: var(--nav-accent);
    }

    /* Hover über ROTES Herz -> "Löschen" Vorschau (Dunkel) */
    .card-heart.liked:hover .icon,
    .card-heart-big.liked:hover .icon,
    .card-heart-action.liked:hover .icon { 
        background-color: #444 !important; 
        transform: scale(0.8); /* Schrumpft als Signal */
    }
    /* Dark Mode Löschen Vorschau (Hell) */
    body.dark-mode .card-heart.liked:hover .icon,
    body.dark-mode .card-heart-big.liked:hover .icon,
    body.dark-mode .card-heart-action.liked:hover .icon { 
        background-color: #fff !important; 
    }
}

.device-icons-center {
    /* Flexbox Layout */
    display: flex; align-items: center; justify-content: center; gap: 6px;
    
    /* STABILISIERUNG: Erzwingt exakt dieselbe Höhe wie die Buttons daneben */
    height: 38px; 
    
    /* Optik */
    opacity: 0.5;
}

/* --- PLAY BUTTON (PROFESSIONAL SVG APPROACH) --- */
.play-btn-action {
    /* 1. Flexbox Container */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* 2. Feste Dimensionen (Anti-Squash) */
    width: 38px;
    height: 38px;
    min-width: 38px; /* Sicherheitsnetz */
    padding: 0;
    flex-shrink: 0;
    
    /* 3. Design */
    background-color: var(--nav-accent);
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(207, 74, 0, 0.3);
    transition: background-color 0.2s, transform 0.1s;
    
    /* 4. Reset für Link-Verhalten */
    text-decoration: none;
    line-height: 1; /* Verhindert, dass Zeilenhöhe das Layout sprengt */
}

.play-btn-action:hover {
    background-color: var(--nav-accent-hover);
    transform: scale(1.05);
}
.play-btn-action:active {
    transform: scale(0.95);
}

/* DAS ICON: Reines SVG als Background-Image */
.play-btn-action .icon {
    display: block;
    width: 20px;  /* Exakte Größe des Symbols */
    height: 20px;
    
    /* Wir laden ein sauberes SVG direkt im CSS (Data URI) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    
    /* Reset aller alten Styles (Masken, Farben, Before) */
    background-color: transparent;
    -webkit-mask-image: none;
    mask-image: none;
    margin: 0;
    
    /* OPTISCHE KORREKTUR: */
    /* Ein Dreieck wirkt mittig platziert immer zu weit links. */
    /* Wir schieben es 2px nach rechts für die perfekte optische Mitte. */
    margin-left: 2px;
}

/* KILL SWITCH: Sicherstellen, dass keine alten ASCII/Before-Elemente stören */
.play-btn-action .icon::before,
.play-btn-action .icon::after {
    content: none;
    display: none;
}


/* --- 7.1 BREADCRUMBS (PILL STYLE) --- */
.breadcrumb-nav {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    font-size: 0.8rem; margin-bottom: 20px;
}

/* Common Pill Base */
.breadcrumb-nav a, .breadcrumb-nav .curr {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 6px 16px; border-radius: 50px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted); text-decoration: none;
    font-weight: 600; transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
}

/* Hover State (Links) */
.breadcrumb-nav a:hover {
    color: var(--nav-accent);
    border-color: var(--nav-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.08);
}

/* Active State (Current) */
.breadcrumb-nav .curr {
    background: transparent; border-color: transparent;
    color: var(--text-main); box-shadow: none;
    padding-left: 5px; /* Optische Anpassung */
}

/* Separator ausblenden (Pills trennen optisch selbst) */
.breadcrumb-nav .sep { display: none; }


/* --- 8. SMART SEARCH (MAIN) --- */
.main-search-wrapper { margin: 20px 0 30px 0; width: 100%; }
.main-search-form {
    position: relative; display: flex; align-items: center; background: var(--bg-card);
    border-radius: 60px; height: 60px; 
    box-shadow: var(--shadow-orig); border: 1px solid transparent;
    transition: transform 0.2s, box-shadow 0.2s;
}
body.dark-mode .main-search-form { border-color: var(--border-color); }
.main-search-form:focus-within { transform: translateY(-2px); box-shadow: var(--shadow-float); }

.main-search-form input {
    width: 100%; height: 100%; border: none; background: transparent; outline: none;
    font-size: 1.1rem; color: var(--text-main); padding: 0 60px 0 25px; border-radius: 60px;
}
.search-submit-btn {
    position: absolute; right: 6px; top: 6px; bottom: 6px; width: 48px; height: 48px;
    border-radius: 50%; border: none; background: var(--nav-accent); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 2px 6px rgba(207, 74, 0, 0.3);
}
.search-submit-btn:active { transform: scale(0.90); background: var(--nav-accent-hover); }

.css-search-icon {
    display: block; position: relative; width: 16px; height: 16px;
    border: 2px solid white; border-radius: 50%; box-sizing: border-box;
    margin-top: -2px; margin-left: -2px;
}
.css-search-icon::after {
    content: ''; position: absolute; width: 2px; height: 7px; background: white;
    bottom: -6px; right: -3px; transform: rotate(-45deg);
}

.search-ghost-text {
    position: absolute; left: 25px; top: 0; bottom: 0; display: flex; align-items: center;
    font-size: 1.1rem; color: var(--text-muted); pointer-events: none;
    white-space: nowrap; overflow: hidden; z-index: 5; opacity: 0;
}
.ghost-in { animation: slideInUp 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.ghost-out { animation: slideOutUp 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
@keyframes slideInUp { 0% { transform: translateY(20px); opacity: 0; } 100% { transform: translateY(0); opacity: 1; } }
@keyframes slideOutUp { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(-20px); opacity: 0; } }
.main-search-form.user-active .search-ghost-text { display: none !important; }


/* --- 9. HERO SECTION --- */
.hero-wrapper {
    display: block; width: 100%; position: relative;
    min-height: 200px; /* Safety */
    background-color: #000;
}
.hero-wrapper img { width: 100%; height: auto; display: block; min-height: 200px; object-fit: cover; }
.hero-pulse-btn {
    position: absolute; bottom: 30px; left: 30px; background: #ff0055; color: white;
    padding: 12px 30px; border-radius: 50px; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; border: none; cursor: pointer; text-decoration: none;
    box-shadow: 0 0 0 0 rgba(255, 0, 85, 0.7); animation: heroPulse 2s infinite; z-index: 2;
}


/* --- 10. HISTORY & LISTS (RESPONSIVE) --- */
#retention-bar-anchor:empty { display: none; }

.retention-list-wrapper {
    margin: 0 0 20px;
    max-width: calc(100vw - 40px); /* Mobile Limit */
    position: relative;
}

.retention-list-scroller-original-doppelt {
    display: flex !important; 
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto; 
    gap: 15px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 0; 
    scroll-padding-left: 0; 
    justify-content: flex-start;
    align-items: stretch;
    scrollbar-width: none; -ms-overflow-style: none;
    width: 100%; box-sizing: border-box;
}

.retention-list-scroller {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 25px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 0 30px;
    -ms-overflow-style: none;
}
.retention-list-scroller::-webkit-scrollbar { display: none; }

.retention-list-scroller .game-card-wrapper {
    min-width: 65vw; width: 65vw; /* Mobile */
    flex-shrink: 0;
    scroll-snap-align: start;
    margin: 0;
    min-width: calc(100vh - 50px));
    width: calc(100vh - 50px))
}
@media (min-width: 768px) {
    .retention-list-scroller .game-card-wrapper {
        min-width: 240px; width: 240px; /* Desktop */
    }
}

/* History Header Controls */
#retention-bar-anchor .cat-header {
    display: flex !important; align-items: center !important; justify-content: space-between !important;
}

.history-controls { margin-left: auto; display: flex; gap: 10px; }
.hist-btn {
    width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-color);
    background: var(--bg-card); display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; opacity: 0.5;
}
.hist-btn.active { opacity: 1; border-color: var(--nav-accent); color: var(--nav-accent); }
.hist-btn:hover { background: var(--nav-accent); color: white; border-color: var(--nav-accent); }
.hist-arrow {
    width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
    display: block; transform: rotate(-45deg); margin-left: -3px;
}
.hist-prev .hist-arrow { transform: rotate(135deg); margin-left: 3px; }



/* =========================================
   11. STREAM ACCORDION & LISTS (STABLE & LINKED)
   No Wobble | Full Body Click
   ========================================= */

.stream-list-container { 
    display: flex; flex-direction: column; gap: 20px; margin-bottom: 60px; 
}

.stream-accordion-item {
    background: var(--bg-card); 
    border-radius: 12px; 
    box-shadow: var(--shadow-orig);
    overflow: visible; 
    border: 1px solid transparent;
    position: relative;
    margin-top: 10px; 
    /* KEIN Transform/Gewackel mehr */
    transition: box-shadow 0.2s ease, border-color 0.2s; 
}

body.dark-mode .stream-accordion-item { border-color: var(--border-color); }

/* Nur Schatten verstärken bei Hover, keine Bewegung */
.stream-accordion-item:hover { 
    box-shadow: var(--shadow-float); 
    border-color: rgba(0,0,0,0.1); 
}
body.dark-mode .stream-accordion-item:hover { border-color: #555; }


/* --- HEADER (SAFE LAYOUT & HIT AREA) --- */
.stream-header { 
    display: flex; 
    align-items: center; 
    /* Wir lassen das Padding EXAKT so, wie es funktioniert hat */
    padding: 15px 20px; 
    background: var(--bg-card); 
    border-radius: 12px; 
    
    /* WICHTIG: Relativ für den Klick-Teppich */
    position: relative; 
    z-index: 1;
    
    gap: 20px;
    min-height: 80px;
}
.stream-accordion-item.open .stream-header {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

/* Linke Gruppe */
.stream-left-group { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

/* Rank & Rating (Standard) */
.stream-rank-box {
    width: 42px; height: 42px; 
    background: #e9ecef; color: #495057; 
    border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.1rem; font-weight: 700;
}
body.dark-mode .stream-rank-box { background: #333; color: #ccc; }

.stream-rating-box {
    width: 48px; height: 42px; 
    background: var(--nav-accent); color: white; 
    border-radius: 8px; 
    display: flex; align-items: center; justify-content: center; 
    font-size: 1.1rem;
    position: relative; overflow: hidden;
}
.rating-play-icon { 
    display: none; position: absolute; inset: 0; 
    background: var(--nav-accent-hover); 
    align-items: center; justify-content: center;
}
.rating-play-icon .icon-play { background-color: white !important; width: 16px; height: 16px; }

/* MAIN LINK (Mit unsichtbarem Klick-Teppich) */
.header-main-link {
    flex-grow: 1; display: flex; align-items: center; 
    text-decoration: none; gap: 15px; min-width: 0; color: inherit;
    /* Kein Padding hier, Layout bleibt beim Eltern-Element */
}

/* DER TRICK: Spannt den Link über den ganzen Header */
.header-main-link::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}

/* Hover Logic */
@media (hover: hover) { 
    .header-main-link:hover .rating-play-icon { display: flex; }
    .header-main-link:hover .stream-title { color: var(--nav-accent); }
}

.stream-info-group { display: flex; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden; }
.stream-title { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stream-actors { font-size: 0.85rem; color: var(--nav-accent); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ACTIONS (Müssen über dem Teppich schweben) */
.stream-actions { 
    display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto;
    position: relative; 
    z-index: 5; /* WICHTIG: Damit Herz & Pfeil klickbar bleiben */
}

/* Actions (Rechts) */
.stream-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }

.btn-action-icon {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid transparent; 
    background: var(--bg-body); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center; 
    cursor: pointer; 
    transition: background 0.2s, color 0.2s; /* Nur Farbe, keine Bewegung */
}
/* Statischer Hover */
.btn-action-icon:hover { background: #e2e2e2; color: #000; }
body.dark-mode .btn-action-icon { background: #2a2a2a; border-color: #333; }
body.dark-mode .btn-action-icon:hover { background: #444; color: #fff; }

/* Desktop Tabs */
.safety-tabs {
    position: absolute; top: -22px; right: 20px; 
    display: flex; gap: 5px; z-index: 1; pointer-events: none;
}
.safety-tab {
    background: #f1f3f5; color: #868e96; 
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; 
    padding: 4px 12px 6px; border-radius: 6px 6px 0 0; 
}
body.dark-mode .safety-tab { background: #2a2a2a; color: #888; }
.mobile-safety-row { display: none; }


/* --- BODY (JETZT EIN LINK!) --- */
.stream-body {
    max-height: 0; opacity: 0; overflow: hidden; 
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    background: var(--bg-card); 
    border-radius: 0 0 12px 12px;
}
.stream-accordion-item.open .stream-body { opacity: 1; }

/* Der innere Container ist jetzt ein A-Tag */
.stream-body-inner { 
    display: block; /* Macht den Link zum Block */
    padding: 0 20px 20px 20px; 
    text-decoration: none; /* Unterstreichung weg */
    color: inherit;
    cursor: pointer;
    position: relative;
}

/* Hover Effekt für den ganzen Body (Feedback: "Ich bin klickbar") */
.stream-body-inner:hover .stream-desc-text {
    background-color: var(--bg-body); /* Leichte Abdunklung simulieren */
    border: 1px solid var(--nav-accent); /* Optional: Feiner Rahmen */
    color: var(--text-main);
}
/* Damit der Text nicht wie ein Link aussieht */
.stream-desc-text { 
    font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); 
    background: var(--bg-body); border-radius: 8px; padding: 20px; 
    margin-bottom: 20px; border: 1px solid transparent;
    transition: border-color 0.2s, background-color 0.2s;
}
body.dark-mode .stream-desc-text { background: #1a1a1a; }

.stream-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 0; /* Margin weg, da Button fehlt */ }
.stream-pill {
    background: #fff; border: 1px solid var(--border-color); color: #666; 
    font-weight: 600; font-size: 0.8rem; border-radius: 20px; padding: 6px 16px; 
}
body.dark-mode .stream-pill { background: #222; color: #aaa; }


/* --- MOBILE STACK (Clean & Static) --- */
@media (max-width: 767px) {
    .safety-tabs { display: none; }
    .mobile-safety-row { display: flex; gap: 5px; margin-bottom: 6px; }
    .safety-pill { 
        font-size: 0.65rem; background: #f0f0f0; padding: 2px 8px; 
        border-radius: 4px; color: #666; font-weight: 700; text-transform: uppercase; 
    }
    body.dark-mode .safety-pill { background: #333; color: #999; }

    .stream-header {
        display: flex; flex-wrap: wrap; padding: 15px; gap: 12px; 
        align-items: flex-end; height: auto;
    }
    .header-main-link { display: contents; }

    /* ZONE 1 */
    .stream-info-group { order: 1; width: 100%; margin-bottom: 5px; }
    .stream-title { font-size: 1.05rem; white-space: normal; margin-bottom: 3px; }
    .stream-actors { white-space: normal; font-size: 0.8rem; }

    /* ZONE 2 */
    .stream-left-group { order: 2; margin-right: auto; }
    .stream-rank-box { width: 38px; height: 38px; font-size: 1rem; }
    .stream-rating-box { width: 44px; height: 38px; font-size: 1rem; }

    /* ZONE 3 */
    .stream-actions { order: 3; margin-left: 0; gap: 8px; }
    .btn-action-icon { width: 38px; height: 38px; background: #f4f4f4; }
    body.dark-mode .btn-action-icon { background: #333; }
}




/* --- 12. PWA MODULE --- */
.pwa-dash-area { display: none; margin-bottom: 20px; text-align: center; }
.pwa-dash-btn {
    width: 100%; padding: 12px; background: #333; color: #fff;
    border: 1px dashed #555; border-radius: 8px; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: 0.2s; font-size: 0.95rem; font-weight: 500;
}
.pwa-dash-btn:hover { background: #444; border-color: #777; }

.pwa-popup-wrapper {
    display: none; position: fixed; bottom: 30px; left: 50%; transform: translateX(-50%);
    z-index: 9999; align-items: center; gap: 15px;
}
.pwa-close-btn {
    width: 50px; height: 50px; background: #333; color: #ffffff;
    border: none; border-radius: 50%; cursor: pointer; font-size: 24px;
    /* V8 FIX: Perfect Centering */
    display: flex; align-items: center; justify-content: center;
    padding: 0; line-height: 1;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2); transition: transform 0.2s;
}
.pwa-close-btn:hover { transform: scale(1.25); background-color: #000; }
.pwa-install-btn {
    height: 50px; padding: 0 30px; background: var(--nav-accent); color: #fff;
    border: none; border-radius: 50px; cursor: pointer; font-size: 16px; font-weight: 700;
    display: flex; align-items: center; gap: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    white-space: nowrap; transition: transform 0.1s;
}
.pwa-install-btn:hover { transform: scale(1.05); background: var(--nav-accent-hover); }

.pwa-ios-hint {
    display: none; position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
    z-index: 9999; width: 90%; max-width: 400px; text-align: left;
    border: 1px solid var(--border-color); padding: 15px;
    border-radius: 12px; background: var(--bg-card);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2); color: var(--text-main);
}
.pwa-ios-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pwa-ios-summary { cursor: pointer; font-weight: 700; outline: none; list-style: none; }
.pwa-ios-close {
    background: var(--bg-body); border: none; width: 30px; height: 30px;
    border-radius: 50%; font-size: 18px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; color: var(--text-main);
}
.pwa-ios-content { font-size: 14px; line-height: 1.6; }
.pwa-ios-content ol { padding-left: 20px; margin: 0; }
.pwa-ios-content li { margin-bottom: 5px; }


/* --- 13. FOOTER --- */
.main-footer {
    background-color: var(--nav-bg); color: #fff; 
     padding-bottom: 0; /* Bottom 0 für Trust Bar */
    margin-top: 60px; border-top: 4px solid var(--nav-accent);
    display: flex; flex-direction: column;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 25px; margin-bottom: 20px; padding: 0 20px; }
.main-footer a { color: #ccc; font-size: 0.95rem; transition: color 0.3s; }
.main-footer a:hover { color: var(--nav-accent); }
.footer-copy { text-align: center; color: #666; font-size: 0.85rem; margin: 0 0 40px 0; }

/* --- 14. V8 TRUST BAR (INFORMANT) --- */
.v8-trust-bar {
    width: 100%;
    background-color: #111; /* Noch dunkler als Footer */
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 15px 0;
    font-size: 0.85rem;
    color: #888;
    margin-top: auto; /* Drückt sich ans Ende */
}
.v8-trust-inner {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 25px;
}
.trust-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #555;
    margin-right: 5px;
}
.trust-item {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.trust-item strong {
    color: #fff;
    font-weight: 700;
    font-variant-numeric: tabular-nums; /* Verhindert Springen bei Zahlen */
}
.trust-icon {
    font-size: 1rem;
    opacity: 0.7;
    filter: grayscale(100%);
    transition: filter 0.3s, opacity 0.3s;
}
.trust-item:hover .trust-icon {
    filter: grayscale(0%);
    opacity: 1;
}
@media (max-width: 768px) {
    .v8-trust-inner { gap: 15px; justify-content: space-between; }
    .trust-label { width: 100%; text-align: center; margin-bottom: 5px; }
    .trust-item { font-size: 0.8rem; }
}
/* --- 15. V8 TRENDING SIDEBAR (GOLD MASTER - CLEANED) --- */

/* CONTAINER (Randlos für Hit-Area) */
.sidebar-card.trend-card {
    position: relative;
    overflow: visible !important; /* Wichtig für Tabs oben drauf */
    margin-top: 25px !important;  /* Abstand nach oben für Tabs */
    
    /* HIT AREA FIX: Padding weg, damit Link wachsen kann */
    padding: 0 !important; 
    
    display: flex; flex-direction: column;
    background: var(--bg-card);
    border: 1px solid transparent;
    border-radius: 12px;
    box-shadow: var(--shadow-orig);
    transform: none !important; /* Kein Wackeln */
    transition: border-color 0.2s, box-shadow 0.2s;
}
body.dark-mode .sidebar-card.trend-card { border-color: var(--border-color); }

.sidebar-card.trend-card:hover {
    border-color: var(--nav-accent);
    box-shadow: var(--shadow-float);
}

/* TABS (Oben auf der Kante) */
.safety-tabs.sidebar-mode {
    position: absolute;
    top: -22px;
    right: 10px;
    display: flex;
    gap: 2px;
    z-index: 5;
}
.safety-tabs.sidebar-mode .safety-tab {
    font-size: 0.6rem;
    padding: 3px 8px;
    border-radius: 0 0 0 6px; 
    background: #f0f0f0;
    color: #888;
    text-transform: uppercase;
    font-weight: 700;
}
.safety-tabs.sidebar-mode .safety-tab:first-child { border-radius: 0; }
.safety-tabs.sidebar-mode .safety-tab:last-child { border-radius: 0 0 0 6px; }
body.dark-mode .safety-tabs.sidebar-mode .safety-tab { background: #2a2a2a; color: #999; }

/* LINK AREA (Die lebendige Zone) */
.trend-row { display: flex; align-items: center; width: 100%; }

.trend-link {
    display: flex; align-items: center; flex-grow: 1; 
    text-decoration: none; color: inherit; min-width: 0;
    cursor: pointer;
    
    /* TRICK: Padding gehört zum Link -> Klickbar bis zum Rand */
    padding: 12px; 
    width: 100%;
}

/* RANK BOX (Geometrie & Animation) */
.stream-rank-box.sidebar-rank {
    position: relative;
    width: 40px; height: 40px; /* Symmetrie */
    min-width: 40px;
    margin-right: 15px;
    background: #e9ecef;
    color: #495057;
    border-radius: 8px;
    font-weight: 800;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
body.dark-mode .stream-rank-box.sidebar-rank { background: #333; color: #ccc; }

/* Hover Trigger: Box wird Orange */
.sidebar-card.trend-card:hover .stream-rank-box.sidebar-rank {
    background-color: var(--nav-accent);
    color: white;
}

/* ANIMATION ENGINE (La Voila) */
.rank-num, .rank-icon {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* State 1: Nummer da, Icon weg */
.rank-num { opacity: 1; transform: scale(1); }
.rank-icon { opacity: 0; transform: scale(0.5); }
.rank-icon .icon-play { width: 16px; height: 16px; background-color: white !important; }

/* State 2 (Hover): Nummer weg, Icon da */
.sidebar-card.trend-card:hover .rank-num { opacity: 0; transform: scale(0.5); }
.sidebar-card.trend-card:hover .rank-icon { opacity: 1; transform: scale(1); }

/* TEXT INFO */
.sidebar-card-info { display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden; }
.sidebar-card-title { 
    font-size: 0.95rem; font-weight: 700; color: var(--text-main); 
    line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trend-score { font-size: 0.75rem; color: var(--nav-accent); font-weight: 600; }

/* HERZ ABSTAND (Weil Container kein Padding mehr hat) */
.trend-row .card-heart-action {
    margin-right: 12px; 
    z-index: 2;
}

/* --- ANIMATION LOGIC (GHOST FIX) --- */
.sidebar-card.trend-hidden {
    display: none !important; 
    opacity: 0;
    transform: translateY(-20px);
}
.sidebar-list.expanded .sidebar-card.trend-hidden {
    display: flex !important; 
    animation: slideDownFade 0.5s forwards;
}
/* Staggered Animation */
.sidebar-list.expanded .trend-hidden:nth-child(6) { animation-delay: 0.05s; }
.sidebar-list.expanded .trend-hidden:nth-child(7) { animation-delay: 0.1s; }
.sidebar-list.expanded .trend-hidden:nth-child(8) { animation-delay: 0.15s; }
.sidebar-list.expanded .trend-hidden:nth-child(9) { animation-delay: 0.2s; }
.sidebar-list.expanded .trend-hidden:nth-child(10) { animation-delay: 0.25s; }

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- HISTORY SHOW MORE --- */
.history-hidden { display: none !important; }
.stream-list-container.expanded .history-hidden {
    display: flex !important;
    animation: slideDownFade 0.5s forwards;
}