:root { 
            --y: #f1c40f; 
            --y-glow: rgba(241, 196, 15, 0.5);
            --b: #000000; 
            --glass: rgba(20, 20, 20, 0.65);
            --glass-border: rgba(255, 255, 255, 0.08);
            --text: #ffffff;
            --text-muted: #aaaaaa;
            --danger: #e74c3c;
            --pill-bg: #121212;
        }
        * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }

        /* GIF LOADER STYLES */
        #loading-screen {
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background: var(--b);
            display: flex; justify-content: center; align-items: center;
            z-index: 20000;
            transition: opacity 0.5s ease, visibility 0.5s;
        }
        .custom-loader-gif {
            width: 120px;
            height: auto;
            filter: drop-shadow(0 0 15px var(--y-glow));
        }
        .hidden-loader {
            opacity: 0;
            visibility: hidden;
        }

        body {
            font-family: 'Segoe UI', Roboto, Helvetica, sans-serif; 
            background: var(--b);
            color: var(--text);
            margin: 0; padding-bottom: 140px; 
            overflow-x: hidden; 
            min-height: 100vh;
            overscroll-behavior-y: none;
        }

        /* KARNEVAL ANIMATION */
        .carnival-particle {
            position: fixed;
            top: -50px;
            z-index: 10000;
            pointer-events: none;
            animation: carnivalFall linear forwards;
        }
        @keyframes carnivalFall {
            0% { transform: translateY(0) rotate(0deg); opacity: 1; }
            100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
        }

        /* ANIMIERTER HINTERGRUND */
        .bg-anim {
            position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1;
            background: radial-gradient(circle at 10% 20%, #1a1a00 0%, #000 40%),
                        radial-gradient(circle at 90% 80%, #1a1100 0%, #000 40%);
            animation: bgShift 10s ease-in-out infinite alternate;
        }
        @keyframes bgShift { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }

        /* NEUE ANIMATION FÜR TEXT-FARBVERLAUF */
        @keyframes textFlow {
            0% { background-position: 0% 50%; }
            100% { background-position: 200% 50%; }
        }

        /* TICKER */
        .t-wrap {
            position: sticky; top: 0; z-index: 2500;
            background: var(--y); color: #000;
            height: 32px; display: flex; align-items: center;
            box-shadow: 0 5px 20px rgba(241, 196, 15, 0.2);
        }
        .t-l { background: #000; color: var(--y); padding: 0 12px; font-weight: 900; font-size: 10px; z-index: 30; height: 100%; display: flex; align-items: center; text-transform: uppercase; letter-spacing: 1px; }
        .t-container { flex: 1; overflow: hidden; white-space: nowrap; position: relative; height: 100%; background: var(--y); }
        .t-c { display: inline-block; padding-left: 100%; font-size: 12px; font-weight: 800; line-height: 32px; animation: marquee 40s linear infinite; }
        @keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-100%); } }

        /* FADE OVERLAYS */
        .fade-edge {
            position: fixed; left: 0; width: 100%; height: 60px; pointer-events: none; z-index: 2100;
        }
        .fade-top {
            top: 32px; 
            background: linear-gradient(to bottom, var(--b) 0%, transparent 100%);
        }
        .fade-bottom {
            bottom: 0;
            background: linear-gradient(to top, var(--b) 0%, transparent 100%);
        }

        /* HEADER */
        header { 
            padding: 15px 20px; display: flex; align-items: center; justify-content: center;
            position: relative; z-index: 10;
        }
        .menu-btn { font-size: 24px; color: var(--y); cursor: pointer; filter: drop-shadow(0 0 8px var(--y-glow)); transition: 0.2s; }
        .menu-btn:active { transform: scale(0.9); }
        .header-logo { height: 60px; max-width: 200px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,0.8)); cursor: pointer; }

        /* STYLED BUTTONS IN HEADER */
        .st-btn-pill {
            background: rgba(241, 196, 15, 0.15);
            border: 1px solid var(--y);
            padding: 6px 12px;
            border-radius: 20px;
            color: var(--y);
            font-size: 12px;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            display: flex;
            align-items: center;
            gap: 6px;
            cursor: pointer;
            transition: 0.2s;
            box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
        }
        .st-btn-pill:active { transform: scale(0.95); background: var(--y); color: #000; }

        /* AI BUTTON STYLES (bleibt für border-flow, der von der KI-Suchleiste genutzt wird) */
        @keyframes border-flow { from { background-position: 0% 0, 0% 0; } to { background-position: 0% 0, 200% 0; } }


        /* SCROLLTIME TIKTOK OVERLAY */
        #scroll-time-overlay {
            position: fixed; top: 0; left: 0; width: 100%; height: 100dvh;
            background: #000; z-index: 11000; display: none; flex-direction: column;
        }
        .st-feed {
            flex: 1; width: 100%; overflow-y: scroll;
            scroll-snap-type: y mandatory;
            scrollbar-width: none;
        }
        .st-feed::-webkit-scrollbar { display: none; }
        .st-slide {
            width: 100%; height: 100dvh;
            scroll-snap-align: start;
            display: flex; flex-direction: column;
            justify-content: center; align-items: center;
            position: relative;
            padding-bottom: 80px;
        }
        .st-slide img { 
            width: 75vw; height: 75vw; max-width: 300px; max-height: 300px; 
            border-radius: 20px; border: 2px solid var(--y);
            box-shadow: 0 0 30px var(--y-glow); margin-bottom: 25px;
            object-fit: cover;
        }
        .st-slide h2 { color: #fff; font-size: 22px; margin: 0 30px; text-align: center; }
        .st-slide p { color: var(--y); margin: 8px 30px; font-weight: bold; text-align: center; }
        
        .st-ui-overlay {
            position: absolute; bottom: 40px; right: 20px;
            display: flex; flex-direction: column; gap: 20px; align-items: center;
        }
        .st-ui-btn { 
            width: 50px; height: 50px; background: rgba(255,255,255,0.1); 
            border-radius: 50%; display: flex; align-items: center; justify-content: center;
            color: #fff; font-size: 20px; backdrop-filter: blur(10px);
        }

        .st-close { position: absolute; top: 20px; left: 20px; font-size: 24px; color: #fff; z-index: 12000; text-shadow: 0 0 10px #000; }

        /* SIDEBAR */
        #sidebar {
            position: fixed; top: 0; left: 0; width: 280px; height: 100%;
            background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
            z-index: 5000; transform: translateX(-100%);
            transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1); 
            padding: 60px 20px; border-right: 1px solid var(--glass-border);
            box-shadow: 10px 0 40px rgba(0,0,0,0.5);
        }
        #sidebar.open { transform: translateX(0); }
        .side-item { 
            padding: 18px; font-size: 16px; font-weight: 600; color: var(--text-muted); 
            border-radius: 12px; margin-bottom: 8px; cursor: pointer; 
            display: flex; align-items: center; gap: 15px; transition: 0.2s; 
        }
        .side-item:hover, .side-item.active { background: rgba(241, 196, 15, 0.1); color: var(--y); border: 1px solid rgba(241, 196, 15, 0.1); }
        #overlay { position: fixed; top:0; left:0; width:100%; height:100%; background: rgba(0,0,0,0.6); z-index: 4500; display:none; backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.3s; }
        #overlay.show { opacity: 1; }

        /* PAGE ANIMATION defined in iOS26 block above */
        .page { padding: 0 15px; }

        /* HOME SPECIFIC */
        .home-hero { padding: 20px 5px; }
        .home-hero p { color: var(--text-muted); margin: 5px 0 0; font-size: 14px; }
        
        .section-head { display: flex; justify-content: space-between; align-items: center; margin: 25px 0 15px; padding: 0 5px; }
        .section-head h2 { font-size: 18px; margin: 0; color: #fff; }
        .view-all { color: var(--y); font-size: 13px; font-weight: 700; text-decoration: none; }

        .quick-nav { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
        .nav-card { 
            background: var(--glass); border: 1px solid var(--glass-border); border-radius: 15px; 
            padding: 15px 5px; text-align: center; cursor: pointer; transition: 0.2s;
        }
        .nav-card i { font-size: 20px; color: var(--y); margin-bottom: 8px; display: block; }
        .nav-card span { font-size: 12px; font-weight: 600; }
        .nav-card:active { transform: scale(0.95); background: rgba(241, 196, 15, 0.1); }

        /* OFFICIAL STATION CARD */
        .official-card {
            background: linear-gradient(135deg, rgba(241, 196, 15, 0.15), rgba(20, 20, 20, 0.8));
            border: 1px solid var(--y);
            border-radius: 20px;
            padding: 15px 20px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin: 10px 0 25px;
            cursor: pointer;
            box-shadow: 0 8px 25px rgba(241, 196, 15, 0.1);
            transition: 0.3s;
        }
        .official-card:active { transform: scale(0.98); }
        .off-left { display: flex; align-items: center; gap: 15px; }
        .off-img { width: 45px; height: 45px; border-radius: 10px; background: #000; border: 1px solid var(--y); }
        .off-info h3 { margin: 0; font-size: 18px; color: #fff; letter-spacing: 0.5px; }
        .off-info p { margin: 2px 0 0; font-size: 11px; color: var(--y); font-weight: 700; text-transform: uppercase; }
        .off-play { width: 40px; height: 40px; border-radius: 50%; background: var(--y); color: #000; display: flex; align-items: center; justify-content: center; font-size: 16px; box-shadow: 0 0 15px var(--y-glow); }

        /* SEARCH */
        .s-box { padding: 10px 0 25px; position: sticky; top: 32px; z-index: 20; }
        .s-in { 
            display: flex; background: var(--glass); border-radius: 16px; padding: 6px; 
            border: 1px solid var(--glass-border); align-items: center; backdrop-filter: blur(10px);
            box-shadow: 0 8px 20px rgba(0,0,0,0.3); transition: all 0.3s;
        }
        .s-in:focus-within { border-color: var(--y); box-shadow: 0 0 15px rgba(241, 196, 15, 0.15); }
        input { flex: 1; background: 0; border: 0; color: #fff; padding: 12px 15px; outline: 0; font-size: 16px; }
        .s-btn { background: var(--y); border: 0; width: 44px; height: 44px; border-radius: 12px; color: #000; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 18px; transition: 0.2s; }
        .s-btn:active { transform: scale(0.95); }

        /* GRID */
        .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding-bottom: 20px; }
        .card { 
            background: var(--glass); border-radius: 18px; padding: 15px 8px; 
            text-align: center; border: 1px solid var(--glass-border); 
            position: relative; overflow: hidden; transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
            backdrop-filter: blur(5px);
        }
        .card:active { transform: scale(0.95); }
        .card.playing { 
            border-color: var(--y); 
            background: linear-gradient(135deg, rgba(241,196,15,0.15), rgba(0,0,0,0.4)); 
            box-shadow: 0 0 20px rgba(241, 196, 15, 0.1);
        }
        .card img { width: 50px; height: 50px; object-fit: contain; margin-bottom: 10px; border-radius: 8px; filter: drop-shadow(0 4px 6px rgba(0,0,0,0.5)); }
        .card span { font-size: 11px; font-weight: 700; color: #e0e0e0; display: block; line-height: 1.3; height: 2.6em; overflow: hidden; }
        .fav-icon { position: absolute; top: 8px; right: 8px; font-size: 14px; color: rgba(255,255,255,0.3); padding: 5px; z-index: 5; transition: 0.2s; }
        .fav-icon.active { color: var(--y); transform: scale(1.1); filter: drop-shadow(0 0 5px var(--y)); }

        /* NEWS & PODCAST ITEMS */
        .news-card { 
            background: var(--glass); border-radius: 18px; padding: 20px; margin-bottom: 15px; 
            border: 1px solid var(--glass-border); border-left: 4px solid var(--y); 
            cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: 0.2s;
        }
        .news-card:active { transform: scale(0.98); background: rgba(255,255,255,0.05); }
        .news-card h3 { margin: 0 0 8px 0; font-size: 16px; color: #fff; }
        .news-card p { margin: 0; font-size: 13px; color: var(--text-muted); }

        /* news-detail + podcast-detail defined in iOS26 block above */
        
        .news-header-bar {
            flex-shrink: 0; height: 60px; background: rgba(20,20,20,0.95);
            border-bottom: 1px solid #333; display: flex; align-items: center; padding: 0 20px;
            gap: 15px; color: var(--y); font-size: 18px; font-weight: bold; cursor: pointer;
            backdrop-filter: blur(10px);
        }
        .news-content-scroll { flex: 1; overflow-y: auto; padding: 25px 20px 50px; }

        /* ABOUT PAGE */
        .about-box {
            background: var(--glass); border-radius: 18px; padding: 25px; margin-bottom: 20px;
            border: 1px solid var(--glass-border);
        }
        .about-link {
            display: inline-block; background: var(--y); color: #000; font-weight: 700;
            padding: 12px 20px; border-radius: 10px; text-decoration: none; margin-top: 10px;
        }
        .legal-text { font-size: 13px; color: #aaa; line-height: 1.6; }
        .legal-text h3 { color: #fff; margin-top: 20px; font-size: 15px; }

        /* PLAYERS - Spotify Mini Player */
        .player {
            position: fixed; bottom: 62px; left: 8px; right: 8px;
            background: #3a3a1a;
            border-radius: 12px;
            padding: 0 8px 0 8px;
            height: 64px;
            z-index: 4000;
            display: flex; align-items: center; justify-content: space-between;
            gap: 8px;
            transform: translateY(calc(100% + 100px));
            transition: transform 0.42s cubic-bezier(0.32, 0.72, 0, 1), background 1.2s ease;
            will-change: transform;
            cursor: pointer;
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,0,0,0.5);
        }
        .player.visible { transform: translateY(0); }

        /* Thin progress bar at very bottom of mini player */
        .player-progress {
            position: absolute;
            bottom: 0; left: 0;
            height: 3px;
            background: rgba(255,255,255,0.9);
            width: 0%;
            border-radius: 0 0 12px 12px;
            pointer-events: none;
        }
        .player-progress-track {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 3px;
            background: rgba(0,0,0,0.2);
            border-radius: 0 0 12px 12px;
        }

        /* Album art */
        .p-img {
            width: 48px; height: 48px;
            border-radius: 4px;
            flex-shrink: 0;
            object-fit: cover;
            background: #000;
            box-shadow: 0 2px 8px rgba(0,0,0,0.4);
        }

        /* Track info */
        .p-left { display: flex; align-items: center; gap: 10px; overflow: hidden; flex: 1; min-width: 0; }
        .p-info { overflow: hidden; flex: 1; min-width: 0; }
        .p-info h4 {
            margin: 0; font-size: 13px; color: #fff; font-weight: 700;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .track-title {
            font-size: 11px; color: rgba(255,255,255,0.75); font-weight: 400; margin-top: 2px;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }

        /* Right controls */
        .p-controls {
            display: flex; align-items: center; gap: 8px; flex-shrink: 0;
        }
        .p-icon-btn {
            background: none; border: 0; color: rgba(255,255,255,0.9);
            font-size: 21px;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; padding: 6px;
            transition: transform 0.15s, opacity 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .p-icon-btn:active { transform: scale(0.85); opacity: 0.7; }
        .p-icon-btn.p-connect { color: #fff; }
        .p-icon-btn.p-check { color: #1DB954; font-size: 24px; }

        .p-btn {
            background: none; color: #fff; border: 0;
            font-size: 26px;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer; padding: 6px;
            transition: transform 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .p-btn:active { transform: scale(0.85); }

        /* Dynamic background color synced to album art */
        .player.color-1 { background: #8a7a1a; }
        .player.color-2 { background: #1a4a8a; }
        .player.color-3 { background: #4a1a8a; }

        /* ─── BOTTOM NAV ───────────────────────────────── */
        #bottom-nav {
            position: fixed;
            bottom: 0; left: 0; right: 0;
            height: 60px;
            background: transparent;
            display: flex;
            align-items: stretch;
            z-index: 3500;
            padding-bottom: env(safe-area-inset-bottom);
        }
        /* Gradient fade from black at bottom to transparent */
        #bottom-nav::before {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 120px;
            background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.7) 50%, transparent 100%);
            pointer-events: none;
            z-index: -1;
        }
        .bn-item {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 3px;
            cursor: pointer;
            color: #999;
            font-size: 9px;
            font-weight: 500;
            letter-spacing: 0.1px;
            transition: color 0.15s;
            -webkit-tap-highlight-color: transparent;
            padding: 8px 0 6px;
            position: relative;
            z-index: 1;
        }
        .bn-item i { font-size: 20px; display: block; }
        .bn-item.active { color: #fff; }
        .bn-item:active { opacity: 0.5; }

        /* ─── SEARCH SUGGESTION PILLS ────────────────────────────────── */
        .suggest-pill {
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 20px; padding: 8px 16px;
            color: #ccc; font-size: 13px; font-weight: 600;
            cursor: pointer; white-space: nowrap;
            transition: background 0.15s, color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .suggest-pill:active { background: var(--y); color: #000; border-color: var(--y); }

        /* ─── LIBRARY FILTER BUTTONS ─────────────────────────────────── */
        .lib-filter-btn {
            background: #2a2a2a;
            border: none;
            border-radius: 20px;
            padding: 8px 16px;
            color: #ccc;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .lib-filter-btn.active {
            background: #fff;
            color: #000;
        }
        /* Library list rows (Spotify style) */
        .lib-row {
            display: flex;
            align-items: center;
            gap: 14px;
            padding: 10px 0;
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
            border-radius: 8px;
            transition: background 0.15s;
        }
        .lib-row:active { background: rgba(255,255,255,0.05); }
        .lib-row-img {
            width: 56px; height: 56px;
            border-radius: 8px;
            object-fit: cover;
            background: #222;
            flex-shrink: 0;
        }
        .lib-row-img.playlist-img {
            display: flex; align-items: center; justify-content: center;
            background: #282828;
            font-size: 22px;
            color: #aaa;
        }
        .lib-row-info { flex: 1; min-width: 0; }
        .lib-row-title {
            font-size: 15px; font-weight: 700; color: #fff;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            margin-bottom: 3px;
        }
        .lib-row-sub {
            font-size: 12px; color: #aaa;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }

        /* ─── PLAYLIST PICKER SHEET ───────────────────────────────────── */
        #playlist-picker-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 9200;
            display: none; opacity: 0;
            transition: opacity 0.3s;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        #playlist-picker-overlay.show { opacity: 1; }
        #playlist-picker-sheet {
            position: fixed; bottom: 0; left: 0; right: 0;
            background: #1a1a1a;
            border-radius: 20px 20px 0 0;
            z-index: 9300;
            transform: translateY(100%);
            transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
            max-height: 80vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        #playlist-picker-sheet.open { transform: translateY(0); }
        #playlist-picker-scroll { flex:1; overflow-y:auto; padding: 0 0 80px; }

        /* ─── CREATE PLAYLIST SHEET ───────────────────────────────────── */
        #create-playlist-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.7);
            z-index: 9400;
            display: none; opacity: 0;
            transition: opacity 0.3s;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }
        #create-playlist-overlay.show { opacity: 1; }
        #create-playlist-sheet {
            position: fixed; bottom: 0; left: 0; right: 0;
            background: #1a1a1a;
            border-radius: 20px 20px 0 0;
            z-index: 9500;
            transform: translateY(100%);
            transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
            padding: 20px 24px 40px;
        }
        #create-playlist-sheet.open { transform: translateY(0); }

        #playlist-ctx-overlay.show { opacity: 1; }
        #playlist-ctx-sheet.open { transform: translateY(0); }
        #downloads-manager-page.active { transform: translateY(0) !important; }

        /* ─── PLAYLIST DETAIL PAGE ────────────────────────────────────── */
        #playlist-detail-page.active { transform: translateY(0) !important; }
        #playlist-detail-page { z-index: 9600 !important; }

        /* ─── SPEED / SLEEP / CHAPTERS ──────────────────────────────── */
        .fp-sleep-opt {
            background: rgba(255,255,255,0.1); border: none; border-radius: 20px;
            padding: 7px 14px; color: #fff; font-size: 13px; font-weight: 700;
            cursor: pointer; -webkit-tap-highlight-color: transparent;
            transition: background 0.15s;
        }
        .fp-sleep-opt:active, .fp-sleep-opt.active { background: var(--y); color: #000; }
        .fp-chapter-row {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 0; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,0.06);
            -webkit-tap-highlight-color: transparent;
        }
        .fp-chapter-row.active .fp-ch-title { color: var(--y); }
        .fp-ch-time { font-size: 12px; color: rgba(255,255,255,0.4); font-feature-settings:"tnum"; flex-shrink:0; min-width:38px; }
        .fp-ch-title { font-size: 13px; font-weight: 600; color: #fff; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

        /* ─── SEARCH FILTER PILLS ────────────────────────────────────── */
        .search-filter-pill {
            background: #2a2a2a; border: none; border-radius: 20px;
            padding: 7px 14px; color: #ccc; font-size: 13px; font-weight: 700;
            cursor: pointer; white-space: nowrap; flex-shrink: 0;
            -webkit-tap-highlight-color: transparent; transition: background 0.15s, color 0.15s;
        }
        .search-filter-pill.active { background: #fff; color: #000; }

        /* ─── VIDEO FULLSCREEN PLAYER ────────────────────────────────── */
        #vfs-overlay {
            position: fixed; inset: 0; z-index: 10000;
            background: #000;
            display: none;
            flex-direction: column;
        }
        #vfs-overlay.active { display: flex; }
        #vfs-inner {
            position: relative; width: 100%; height: 100%;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer;
        }
        #vfs-video {
            width: 100%; height: 100%; object-fit: contain;
            display: block; pointer-events: none;
        }
        /* Controls: absolutely positioned, always on top, no pointer-events when hidden */
        #vfs-controls {
            position: absolute; inset: 0;
            display: flex; flex-direction: column;
            justify-content: space-between;
            background: linear-gradient(to bottom, rgba(0,0,0,0.65) 0%, transparent 25%, transparent 75%, rgba(0,0,0,0.75) 100%);
            transition: opacity 0.25s;
            pointer-events: none; /* taps pass through to #vfs-inner */
        }
        #vfs-controls.visible {
            pointer-events: all; /* interactive when shown */
        }
        #vfs-controls.hidden { opacity: 0; }
        #vfs-top {
            display: flex; align-items: center; justify-content: space-between;
            padding: 16px 16px 0;
        }
        #vfs-title {
            color: #fff; font-size: 14px; font-weight: 600;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            max-width: 60%; text-align: center;
        }
        .vfs-btn {
            background: none; border: none; color: #fff;
            font-size: 22px; padding: 8px; cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        #vfs-center {
            display: flex; align-items: center; justify-content: center;
            flex: 1;
        }
        #vfs-play-btn {
            width: 68px; height: 68px; border-radius: 50%;
            background: rgba(255,255,255,0.18);
            display: flex; align-items: center; justify-content: center;
            font-size: 28px; color: #fff;
            backdrop-filter: blur(6px);
            cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        #vfs-bottom { padding: 0 16px 32px; }
        #vfs-times {
            display: flex; justify-content: space-between;
            font-size: 12px; color: rgba(255,255,255,0.7);
            margin-bottom: 8px; font-feature-settings: "tnum";
        }
        #vfs-seek {
            width: 100%; -webkit-appearance: none; appearance: none;
            height: 4px; border-radius: 4px; outline: none; border: none;
            background: linear-gradient(to right, #fff var(--vfs-pct, 0%), rgba(255,255,255,0.3) var(--vfs-pct, 0%));
            cursor: pointer;
        }
        #vfs-seek::-webkit-slider-thumb {
            -webkit-appearance: none; width: 16px; height: 16px;
            background: #fff; border-radius: 50%;
        }

        .marquee-wrap {
            overflow: hidden; white-space: nowrap; position: relative;
        }
        .marquee-inner {
            display: inline-block;
            white-space: nowrap;
            animation: none;
        }
        .marquee-inner.scrolling {
            animation: marquee-scroll linear infinite;
        }
        @keyframes marquee-scroll {
            0%   { transform: translateX(0); }
            20%  { transform: translateX(0); }
            80%  { transform: translateX(var(--scroll-dist, -50%)); }
            100% { transform: translateX(var(--scroll-dist, -50%)); }
        }

        #mehr-sheet {
            position: fixed; bottom: 0; left: 0; right: 0;
            background: #1a1a1a;
            border-radius: 20px 20px 0 0;
            z-index: 6000;
            transform: translateY(100%);
            transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
            max-height: 85vh;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        #mehr-sheet.open { transform: translateY(0); }
        #mehr-overlay {
            position: fixed; inset: 0;
            background: rgba(0,0,0,0.6);
            z-index: 5900;
            display: none; opacity: 0;
            transition: opacity 0.3s;
            backdrop-filter: blur(4px);
        }
        #mehr-overlay.show { opacity: 1; }

        /* Drag handle at top */
        .mehr-handle-area {
            flex-shrink: 0;
            padding: 12px 0 4px;
            display: flex; justify-content: center;
            cursor: grab;
            touch-action: none;
        }
        .mehr-handle {
            width: 36px; height: 4px; background: #555;
            border-radius: 2px;
        }

        /* Scrollable items area */
        #mehr-scroll {
            flex: 1;
            overflow-y: auto;
            padding-bottom: 90px; /* space so last item isn't behind X */
            overscroll-behavior: contain;
        }

        .mehr-item {
            display: flex; align-items: center; gap: 18px;
            padding: 16px 24px;
            cursor: pointer;
            transition: background 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .mehr-item:active { background: rgba(255,255,255,0.06); }
        .mehr-section-label { font-size:11px;font-weight:800;letter-spacing:1px;text-transform:uppercase;color:rgba(255,255,255,0.35);padding:16px 4px 8px;margin:0; }
        .mehr-icon {
            width: 48px; height: 48px; border-radius: 50%;
            background: #2a2a2a;
            display: flex; align-items: center; justify-content: center;
            font-size: 20px; color: #ccc; flex-shrink: 0;
        }
        .mehr-text h3 { margin: 0; font-size: 16px; font-weight: 700; color: #fff; }
        .mehr-text p { margin: 3px 0 0; font-size: 13px; color: #aaa; }

        /* Sticky close button area at bottom */
        #mehr-close-area {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 90px;
            pointer-events: none;
            display: flex; align-items: flex-end; justify-content: center;
            padding-bottom: 18px;
        }
        /* Gradient fade behind close button */
        #mehr-close-area::before {
            content: '';
            position: absolute;
            bottom: 0; left: 0; right: 0; top: 0;
            background: linear-gradient(to top, #1a1a1a 40%, transparent 100%);
            border-radius: 0 0 0 0;
        }
        .mehr-close-btn {
            position: relative;
            width: 52px; height: 52px; border-radius: 50%;
            background: rgba(60, 60, 60, 0.45);
            border: 1px solid rgba(255,255,255,0.15);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            display: flex; align-items: center; justify-content: center;
            font-size: 22px; color: #fff;
            cursor: pointer;
            pointer-events: all;
            z-index: 1;
            transition: background 0.15s, transform 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .mehr-close-btn:active { background: rgba(85, 85, 85, 0.6); transform: scale(0.92); }

        /* ── FULL PLAYER — exact Spotify match ── */
        #full-player {
            position: fixed; top: 0; left: 0; width: 100%; height: 100dvh;
            z-index: 9000; display: flex; flex-direction: column;
            pointer-events: none; transform: translateY(100%);
            transition: none; overflow: hidden; overscroll-behavior: none; color: #fff;
        }
        #full-player.active { pointer-events: all; }
        #full-player.active { pointer-events: all; }

        /* ── LANDSCAPE FULLPLAYER ───────────────────────────────── */
        @media (orientation: landscape) and (max-height: 500px) {
            #full-player #fp-inner {
                display: grid !important;
                grid-template-columns: auto 1fr;
                grid-template-rows: auto;
                gap: 0 20px;
                padding: 10px 20px 10px 16px;
                overflow-y: auto;
                align-items: start;
            }
            #full-player .fp-header {
                grid-column: 1 / -1;
                margin-bottom: 4px;
            }
            #full-player #fp-cover-area {
                width: min(180px, 40vw) !important;
                height: min(180px, 40vw) !important;
                flex-shrink: 0;
                grid-row: 2;
                grid-column: 1;
                align-self: center;
            }
            #full-player #fp-img-container {
                width: 100% !important;
                height: 100% !important;
                min-height: unset !important;
            }
            #full-player .fp-content-wrap {
                grid-row: 2;
                grid-column: 2;
                display: flex;
                flex-direction: column;
                justify-content: center;
                gap: 0;
                overflow-y: auto;
                max-height: calc(100dvh - 60px);
            }
            #full-player .fp-info { margin-top: 0 !important; }
            #full-player .controls-area { margin-top: 14px !important; }
            #full-player .fp-seek-container { margin-top: 12px !important; }
            #full-player #fp-extra-row { padding: 4px 0 6px !important; }
            #full-player #fp-podcast-info,
            #full-player #fp-chapters-section { display: none !important; }
        }


        /* Color background from album art */
        #fp-bg {
            position: absolute; inset: 0; z-index: 0;
            background: linear-gradient(180deg, #4a1a1a 0%, #000 100%);
            transition: background 1.4s ease;
        }
        #fp-bg::after {
            content: ''; position: absolute; inset: 0;
            background: linear-gradient(180deg, transparent 38%, rgba(0,0,0,0.8) 100%);
        }

        /* Sticky mini bar at top of fullscreen player */
        #fp-sticky-bar {
            position: absolute;
            top: 0; left: 0; right: 0;
            height: 64px;
            z-index: 5;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 0 16px;
            background: rgba(0,0,0,0);
            backdrop-filter: blur(0px);
            -webkit-backdrop-filter: blur(0px);
            transform: translateY(-100%);
            opacity: 0;
            transition: transform 0.38s cubic-bezier(0.32,0.72,0,1), opacity 0.3s ease, background 0.3s ease;
            pointer-events: none;
            overflow: hidden;
        }
        #fp-sticky-bar.visible {
            transform: translateY(0);
            opacity: 1;
            pointer-events: all;
            background: rgba(0,0,0,0.55);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
        }
        #fp-sticky-img {
            width: 44px; height: 44px;
            border-radius: 8px; object-fit: cover;
            flex-shrink: 0; background: #333;
            box-shadow: 0 2px 10px rgba(0,0,0,0.4);
        }
        #fp-sticky-info {
            flex: 1; min-width: 0;
        }
        #fp-sticky-title {
            font-size: 14px; font-weight: 700; color: #fff;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        #fp-sticky-sub {
            font-size: 12px; color: rgba(255,255,255,0.55);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            margin-top: 2px;
        }
        #fp-sticky-controls {
            flex-shrink: 0; display: flex; align-items: center; gap: 0;
        }
        .fp-sticky-btn {
            background: none; border: none; color: #fff;
            font-size: 24px; cursor: pointer; padding: 8px;
            display: flex; align-items: center; justify-content: center;
            -webkit-tap-highlight-color: transparent;
            transition: transform 0.15s;
        }
        .fp-sticky-btn:active { transform: scale(0.85); }
        #fp-sticky-progress {
            position: absolute; bottom: 0; left: 0; right: 0;
            height: 2px; background: rgba(255,255,255,0.15);
        }
        #fp-sticky-progress-bar {
            height: 100%; background: rgba(255,255,255,0.75);
            width: 0%; transition: width 1s linear;
        }

        /* Inner wrapper */
        #fp-inner {
            position: relative; z-index: 1;
            display: flex; flex-direction: column;
            width: 100%; height: 100%;
            padding: 0 24px 40px; box-sizing: border-box;
            overflow-y: auto; overflow-x: hidden;
            scrollbar-width: none;
        }
        #fp-inner::-webkit-scrollbar { display: none; }

        /* Podcast info section below controls */
        #fp-podcast-info {
            display: none;
            flex-direction: column;
            margin-top: 40px;
            padding-top: 28px;
            border-top: 1px solid rgba(255,255,255,0.1);
            flex-shrink: 0;
        }
        #fp-podcast-info.visible { display: flex; }
        .fp-pod-info-label {
            font-size: 11px; font-weight: 700; letter-spacing: 0.9px;
            text-transform: uppercase; color: rgba(255,255,255,0.45);
            margin-bottom: 18px;
        }
        .fp-pod-info-row {
            display: flex; align-items: flex-start; gap: 16px;
        }
        .fp-pod-cover {
            width: 80px; height: 80px; border-radius: 10px;
            object-fit: cover; flex-shrink: 0;
            background: #222;
            box-shadow: 0 4px 16px rgba(0,0,0,0.5);
        }
        .fp-pod-meta { flex: 1; min-width: 0; }
        .fp-pod-name {
            font-size: 17px; font-weight: 800; color: #fff;
            margin: 0 0 4px; line-height: 1.25;
        }
        .fp-pod-save-btn {
            display: inline-flex; align-items: center; gap: 7px;
            margin-top: 10px;
            background: transparent;
            border: 1px solid rgba(255,255,255,0.4);
            border-radius: 20px; padding: 7px 16px;
            color: #fff; font-size: 13px; font-weight: 700;
            cursor: pointer; transition: 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .fp-pod-save-btn:active { transform: scale(0.95); opacity: 0.7; }
        .fp-pod-save-btn.saved { border-color: var(--y); color: var(--y); }
        .fp-pod-description {
            margin-top: 18px;
            font-size: 14px; line-height: 1.6;
            color: rgba(255,255,255,0.6);
            display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
            overflow: hidden; transition: 0.2s;
        }
        .fp-pod-description.expanded { -webkit-line-clamp: unset; }
        .fp-pod-desc-toggle {
            margin-top: 6px; font-size: 13px; font-weight: 700;
            color: rgba(255,255,255,0.5); cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        /* Header */
        .fp-header {
            display: flex; align-items: center; justify-content: space-between;
            height: 64px; flex-shrink: 0; width: 100%;
        }
        .close-fp {
            font-size: 22px; color: rgba(255,255,255,0.9);
            padding: 10px; margin-left: -10px; cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        .menu-dots {
            font-size: 20px; color: rgba(255,255,255,0.9);
            padding: 10px; margin-right: -10px; cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }

        /* Cover area fills remaining vertical space */
        #fp-cover-area {
            flex: 1; display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            overflow: visible;
            width: 100%;
        }
        /* When podcast info is visible, cover area doesn't flex-grow */
        #full-player.pod-mode #fp-cover-area {
            flex: none;
            padding: 20px 0 0;
        }

        /* Cover: fits the padded inner width exactly */
        .fp-img-container {
            width: 100%; /* fills #fp-inner width which has 24px padding each side */
            aspect-ratio: 1 / 1;
            max-height: min(100%, calc(100dvh - 390px));
            border-radius: 12px; overflow: hidden; flex-shrink: 0;
            box-shadow: 0 12px 40px rgba(0,0,0,0.6);
            transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.4s ease;
        }
        .fp-img-container.playing-state {
            transform: scale(1.0); box-shadow: 0 20px 56px rgba(0,0,0,0.7);
        }
        .fp-img-container.paused-state {
            transform: scale(0.87); box-shadow: 0 6px 20px rgba(0,0,0,0.4);
        }
        .fp-img { width: 100%; height: 100%; object-fit: cover; background: #111; display: block; }
        .fp-img.pulsing { animation: none; }

        /* Video wrap */
        #fp-video-wrap {
            display: none; width: 100%;
            max-height: min(100%, calc(100dvh - 390px));
            border-radius: 12px; overflow: hidden; flex-shrink: 0;
            box-shadow: 0 12px 40px rgba(0,0,0,0.6);
            background: #000; position: relative;
        }
        #fp-video { width: 100%; display: block; }

        /* Audio/Video switch pill */
        #fp-av-switch {
            display: none; margin-top: 14px;
            background: rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.2);
            border-radius: 22px; padding: 8px 18px;
            align-items: center; gap: 8px; cursor: pointer;
            -webkit-tap-highlight-color: transparent;
        }
        #fp-av-icon { font-size: 14px; color: #ccc; }
        #fp-av-label { color: #ccc; font-size: 13px; font-weight: 600; }

        /* Info row */
        .fp-info {
            display: flex; align-items: center;
            justify-content: space-between; gap: 16px;
            margin-top: 24px; flex-shrink: 0; width: 100%;
        }
        .fp-info-text { flex: 1; min-width: 0; text-align: left; overflow: hidden; }
        .fp-info h2 {
            color: #fff; font-size: 22px; margin: 0 0 3px; font-weight: 800;
            letter-spacing: -0.3px;
            white-space: nowrap;
        }
        .fp-info-sub {
            font-size: 14px; color: rgba(255,255,255,0.55); font-weight: 500;
            white-space: nowrap;
        }
        /* Fav button — green check like Spotify */
        #fp-fav {
            font-size: 28px; color: #1DB954;
            cursor: pointer; flex-shrink: 0;
            transition: transform 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        #fp-fav.unfaved { color: rgba(255,255,255,0.45); font-size: 24px; }
        #fp-fav:active { transform: scale(0.85); }

        /* Seekbar */
        .fp-seek-container { width: 100%; margin-top: 20px; flex-shrink: 0; }
        #seek-bar {
            width: 100%; display: block; cursor: pointer;
            -webkit-appearance: none; appearance: none;
            height: 4px; border-radius: 4px; outline: none; border: none; padding: 0;
            background: linear-gradient(
                to right,
                rgba(255,255,255,0.9) var(--seek-pct, 0%),
                rgba(255,255,255,0.2) var(--seek-pct, 0%)
            );
        }
        #seek-bar::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 14px; height: 14px;
            background: #fff; border-radius: 50%;
            box-shadow: 0 1px 4px rgba(0,0,0,0.4);
        }
        #seek-bar::-moz-range-thumb {
            width: 14px; height: 14px;
            background: #fff; border-radius: 50%; border: none;
        }
        .fp-seek-time {
            display: flex; justify-content: space-between;
            font-size: 11px; color: rgba(255,255,255,0.45);
            margin-top: 6px; font-weight: 600; font-feature-settings: "tnum";
        }

        /* Controls */
        .controls-area { margin-top: 28px; flex-shrink: 0; width: 100%; }
        .controls {
            display: flex; align-items: center;
            justify-content: space-between; width: 100%;
        }
        .sec-btn {
            width: 44px; height: 44px;
            display: flex; align-items: center; justify-content: center;
            color: rgba(255,255,255,0.8); font-size: 26px;
            cursor: pointer; position: relative;
            transition: transform 0.1s, color 0.1s;
            -webkit-tap-highlight-color: transparent;
        }
        .sec-btn:active { transform: scale(0.85); color: #fff; }
        .sec-btn.skip-btn { font-size: 22px; }
        .skip-label {
            position: absolute; bottom: -15px; left: 50%;
            transform: translateX(-50%);
            font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.6); white-space: nowrap;
        }
        .big-play {
            width: 68px; height: 68px; border-radius: 50%;
            background: #fff; color: #000; font-size: 28px;
            display: flex; align-items: center; justify-content: center;
            border: none; cursor: pointer; flex-shrink: 0;
            box-shadow: 0 4px 20px rgba(0,0,0,0.35);
            transition: transform 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .big-play:active { transform: scale(0.93); }

        .fa-spinner { animation: fa-spin 1s linear infinite; }
        .vol-wrap { display: none !important; }
        input[type=range]:not(#seek-bar) {
            -webkit-appearance: none; width: 100%; height: 5px;
            background: #333; border-radius: 100px; outline: none;
        }
        input[type=range]:not(#seek-bar)::-webkit-slider-thumb {
            -webkit-appearance: none; width: 20px; height: 20px;
            background: #fff; border-radius: 50%; cursor: pointer;
        }

        #opt-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 9500;
            display: none; align-items: flex-end; justify-content: center;
            backdrop-filter: blur(8px);
        }
        #opt-overlay.show { display: flex; }
        .opt-box {
            width: 100%; max-width: 500px; background: #121212; 
            border-top-left-radius: 30px; border-top-right-radius: 30px;
            padding: 25px 20px 40px; border-top: 1px solid var(--glass-border);
            animation: slideUp 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
            box-shadow: 0 -10px 50px rgba(0,0,0,0.9);
            max-height: 85vh; overflow-y: auto;
        }
        @keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

        .opt-title { font-size: 22px; font-weight: 800; color: #fff; margin-bottom: 25px; text-align: center; letter-spacing: -0.5px; }

        .opt-section { margin-bottom: 25px; background: rgba(255,255,255,0.03); border-radius: 16px; padding: 15px; }
        .sec-head { color: var(--y); font-size: 12px; font-weight: 800; text-transform: uppercase; margin-bottom: 12px; letter-spacing: 1px; display: flex; justify-content: space-between; }

        .timer-display { 
            text-align: center; font-size: 32px; font-weight: 700; color: #fff; margin: 10px 0 20px; font-feature-settings: "tnum"; 
            display: none; 
        }
        .timer-display.active { display: block; animation: pulseT 2s infinite; }
        @keyframes pulseT { 0% { opacity: 1; } 50% { opacity: 0.7; } 100% { opacity: 1; } }

        .grid-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
        .opt-btn { 
            background: rgba(255,255,255,0.1); border: 0; color: #fff; padding: 12px 0; border-radius: 10px; 
            font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s; 
        }
        .opt-btn:active, .opt-btn.sel { background: var(--y); color: #000; }
        .btn-danger { background: rgba(231, 76, 60, 0.2); color: var(--danger); grid-column: 1 / -1; margin-top: 5px; }
        .btn-danger:active { background: var(--danger); color: #fff; }

        .row-opt { display: flex; justify-content: space-between; align-items: center; padding: 5px 0; }
        .row-lbl { color: #ddd; font-size: 15px; font-weight: 500; }
        .tgl { position: relative; display: inline-block; width: 50px; height: 28px; }
        .tgl input { opacity: 0; width: 0; height: 0; }
        .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #333; transition: .4s; border-radius: 34px; }
        .slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
        input:checked + .slider { background-color: var(--y); }
        input:checked + .slider:before { transform: translateX(22px); background-color: #000; }

        .opt-close-btn { width: 100%; padding: 15px; background: transparent; border: 1px solid #333; color: #888; border-radius: 15px; font-size: 16px; margin-top: 10px; }

        /* ─── MORPH COVER ─────────────────────────────────────────────── */
        #morph-cover { pointer-events: none; }
        .mc-img-wrap {
            width: 44px; height: 44px; border-radius: 10px;
            overflow: hidden; flex-shrink: 0;
            transition: none;
        }
        .mc-img { width: 100%; height: 100%; object-fit: cover; }
        .mc-info { display: flex; flex-direction: column; gap: 3px; flex: 1; overflow: hidden; }
        .mc-title { color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .mc-sub { color: var(--y); font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        /* ─── iOS 26 GENERAL ANIMATIONS ──────────────────────────────── */

        /* Page transitions: scale + fade (like iOS app open) */
        .page { display: none; padding: 0 15px; }
        .page.active {
            display: block;
            animation: ios-page-in 0.38s cubic-bezier(0.32, 0.72, 0, 1) both;
        }
        @keyframes ios-page-in {
            from { opacity: 0; transform: scale(0.96) translateY(12px); }
            to   { opacity: 1; transform: scale(1)    translateY(0); }
        }

        /* Cards: spring pop-in on load */
        @keyframes ios-card-in {
            0%   { opacity: 0; transform: scale(0.88) translateY(16px); }
            65%  { opacity: 1; transform: scale(1.02) translateY(-2px); }
            100% { opacity: 1; transform: scale(1)    translateY(0); }
        }
        .card { animation: ios-card-in 0.42s cubic-bezier(0.34, 1.56, 0.64, 1) both; }
        .card:nth-child(1)  { animation-delay: 0.00s; }
        .card:nth-child(2)  { animation-delay: 0.04s; }
        .card:nth-child(3)  { animation-delay: 0.08s; }
        .card:nth-child(4)  { animation-delay: 0.12s; }
        .card:nth-child(5)  { animation-delay: 0.16s; }
        .card:nth-child(6)  { animation-delay: 0.20s; }
        .card:nth-child(7)  { animation-delay: 0.24s; }
        .card:nth-child(8)  { animation-delay: 0.28s; }
        .card:nth-child(n+9){ animation-delay: 0.30s; }

        /* news-card: slide-up fade */
        @keyframes ios-list-in {
            from { opacity: 0; transform: translateY(18px); }
            to   { opacity: 1; transform: translateY(0); }
        }
        .news-card { animation: ios-list-in 0.35s cubic-bezier(0.32, 0.72, 0, 1) both; }

        /* Mini player: clean slide-in from bottom */
        .player { animation: none; }
        .player.visible {
            transform: translateY(0);
        }

        /* Tab bar / nav-card press spring */
        .nav-card { transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), background 0.2s; }
        .nav-card:active { transform: scale(0.92); }

        /* Official card spring */
        .official-card { transition: transform 0.18s cubic-bezier(0.34,1.56,0.64,1), box-shadow 0.2s; }
        .official-card:active { transform: scale(0.97); }

        /* Sidebar items spring */
        .side-item { transition: background 0.2s, color 0.2s, transform 0.18s cubic-bezier(0.34,1.56,0.64,1); }
        .side-item:active { transform: scale(0.97) translateX(4px); }

        /* Overlay / sheet slide-up iOS style */
        @keyframes ios-sheet-in {
            from { transform: translateY(100%); opacity: 0.6; }
            to   { transform: translateY(0);    opacity: 1; }
        }
        .opt-box { animation: ios-sheet-in 0.38s cubic-bezier(0.32, 0.72, 0, 1) both; }

        /* Full player: content springs in */
        @keyframes fpContentIn {
            0%   { opacity: 0; transform: translateY(28px) scale(0.94); }
            65%  { opacity: 1; transform: translateY(-3px) scale(1.01); }
            100% { opacity: 1; transform: translateY(0)    scale(1); }
        }
        #full-player.active .fp-header    { animation: fpContentIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.02s both; }
        #full-player.active .fp-content-wrap { animation: fpContentIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.07s both; }
        #full-player.active .controls-area   { animation: fpContentIn 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.12s both; }

        /* Podcast/news detail slide-in */
        #news-detail, #podcast-detail {
            position: fixed; top: 0; left: 0; width: 100%; height: 100%;
            background: #000; z-index: 8000;
            display: none;
            flex-direction: column;
            transform: translateX(100%);
            transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
            overflow: hidden;
        }
        #news-detail.active, #podcast-detail.active {
            transform: translateX(0);
            display: flex;
        }
        /* Episodes list fills remaining space and scrolls */
        #pd-episodes {
            flex: 1;
            overflow-y: auto;
            -webkit-overflow-scrolling: touch;
            overscroll-behavior: contain;
            padding: 0 15px 160px;
        }

        /* Sticky top mini player inside podcast detail */
        #pd-sticky-player {
            position: absolute;
            top: 0;
            left: 0; right: 0;
            height: 64px;
            background: rgba(18, 18, 18, 0.92);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border-bottom: 1px solid rgba(255,255,255,0.07);
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 0 12px;
            z-index: 10;
            cursor: pointer;
            transform: translateY(-100%);
            opacity: 0;
            transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease;
            pointer-events: none;
            overflow: hidden;
        }
        #pd-sticky-player.visible {
            transform: translateY(0);
            opacity: 1;
            pointer-events: all;
        }
        #pd-sticky-img {
            width: 44px; height: 44px;
            border-radius: 6px; object-fit: cover;
            flex-shrink: 0; background: #333;
        }
        #pd-sticky-info {
            flex: 1; min-width: 0; overflow: hidden;
        }
        #pd-sticky-title {
            font-size: 14px; font-weight: 700; color: #fff;
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        #pd-sticky-sub {
            font-size: 12px; color: rgba(255,255,255,0.5);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
            margin-top: 2px;
        }
        #pd-sticky-controls {
            flex-shrink: 0;
            display: flex; align-items: center; gap: 2px;
        }
        .pd-sticky-btn {
            background: none; border: none; color: #fff;
            font-size: 22px; cursor: pointer; padding: 8px;
            display: flex; align-items: center; justify-content: center;
            -webkit-tap-highlight-color: transparent;
            transition: transform 0.15s;
        }
        .pd-sticky-btn:active { transform: scale(0.85); }
        /* Progress bar at bottom */
        #pd-sticky-progress-track {
            position: absolute;
            bottom: 0; left: 0; right: 0;
            height: 2px;
            background: rgba(255,255,255,0.12);
        }
        #pd-sticky-progress-bar {
            height: 100%;
            background: rgba(255,255,255,0.7);
            width: 0%;
            transition: width 1s linear;
        }

        /* Section head slide-fade */
        @keyframes ios-section-in {
            from { opacity: 0; transform: translateX(-10px); }
            to   { opacity: 1; transform: translateX(0); }
        }
        .section-head { animation: ios-section-in 0.32s cubic-bezier(0.32,0.72,0,1) both; }

        /* Video podcast overlay */
        #video-overlay {
            position: fixed; inset: 0; background: #000;
            z-index: 9200; display: none; flex-direction: column;
            align-items: center; justify-content: center;
        }
        #video-overlay.active { display: flex; animation: ios-page-in 0.35s cubic-bezier(0.32,0.72,0,1) both; }
        #pod-video { width: 100%; max-height: 100dvh; background: #000; }
        .vid-close-btn {
            position: absolute; top: 20px; left: 20px;
            width: 40px; height: 40px; border-radius: 50%;
            background: rgba(255,255,255,0.15); backdrop-filter: blur(10px);
            display: flex; align-items: center; justify-content: center;
            color: #fff; font-size: 18px; cursor: pointer;
            border: 1px solid rgba(255,255,255,0.2);
        }
        .fp-seek-container {
            width: 85%; max-width: 400px; margin-bottom: 20px; display: none;
        }
        .fp-seek-time {
            display: flex; justify-content: space-between; font-size: 11px; color: #888; margin-bottom: 8px; font-weight: 600; font-feature-settings: "tnum";
        }
        .fp-seek-bar { width: 100%; cursor: pointer; }

        /* ─── PODCAST FILTER PILLS ───────────────────────────────────── */
        .pod-filter-btn {
            background: rgba(255,255,255,0.08);
            border: 1px solid rgba(255,255,255,0.12);
            color: #aaa;
            font-size: 12px;
            font-weight: 600;
            padding: 6px 14px;
            border-radius: 20px;
            cursor: pointer;
            transition: background 0.15s, color 0.15s, border-color 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .pod-filter-btn.active {
            background: var(--y);
            border-color: var(--y);
            color: #000;
        }
        .pod-filter-btn:active { opacity: 0.7; }


        /* ─── SAMSUNG-STYLE SETTINGS ─────────────────────────────── */
        .sett-section-label {
            font-size: 13px; font-weight: 700; color: var(--y);
            padding: 20px 16px 8px; letter-spacing: 0.3px;
        }
        .sett-group {
            background: rgba(255,255,255,0.05);
            border-radius: 20px; margin: 0 0 8px;
            overflow: hidden; border: 1px solid rgba(255,255,255,0.04);
        }
        .sett-row {
            display: flex; align-items: center;
            padding: 16px 18px; gap: 14px;
            border-bottom: 1px solid rgba(255,255,255,0.05);
            -webkit-tap-highlight-color: transparent;
            transition: background 0.15s;
        }
        .sett-row:last-child { border-bottom: none; }
        .sett-row:active { background: rgba(255,255,255,0.06); }
        .sett-row-icon {
            width: 38px; height: 38px; border-radius: 11px;
            display: flex; align-items: center; justify-content: center;
            font-size: 18px; flex-shrink: 0;
        }
        .sett-row-text { flex: 1; min-width: 0; }
        .sett-row-title {
            font-size: 15px; font-weight: 600; color: #fff;
            margin-bottom: 2px;
        }
        .sett-row-sub {
            font-size: 12px; color: rgba(255,255,255,0.4);
            white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
        }
        .sett-toggle {
            position: relative; width: 52px; height: 30px;
            flex-shrink: 0;
        }
        .sett-toggle input { opacity: 0; width: 0; height: 0; }
        .sett-toggle-slider {
            position: absolute; cursor: pointer;
            inset: 0; border-radius: 30px;
            background: #3a3a3a;
            transition: background 0.25s;
        }
        .sett-toggle-slider::before {
            content: ''; position: absolute;
            width: 24px; height: 24px; border-radius: 50%;
            background: #fff; left: 3px; top: 3px;
            transition: transform 0.25s, background 0.25s;
            box-shadow: 0 2px 6px rgba(0,0,0,0.3);
        }
        .sett-toggle input:checked + .sett-toggle-slider { background: #1db8ff; }
        .sett-toggle input:checked + .sett-toggle-slider::before { transform: translateX(22px); }
        .sett-chip-row {
            display: flex; gap: 7px; flex-wrap: wrap; padding: 0 18px 14px;
        }
        .sett-chip {
            background: rgba(255,255,255,0.07); border: 1.5px solid rgba(255,255,255,0.12);
            border-radius: 20px; padding: 7px 16px;
            color: #ccc; font-size: 13px; font-weight: 700;
            cursor: pointer; transition: all 0.15s;
            -webkit-tap-highlight-color: transparent;
        }
        .sett-chip.active {
            background: rgba(29,184,255,0.15);
            border-color: #1db8ff; color: #1db8ff;
        }
        .sett-chip:active { opacity: 0.7; }
        .sett-slider-wrap { padding: 0 18px 14px; }
        .sett-range {
            -webkit-appearance: none; width: 100%; height: 5px;
            border-radius: 5px; outline: none; border: none;
            background: linear-gradient(to right, #1db8ff var(--pct,50%), #3a3a3a var(--pct,50%));
            cursor: pointer;
        }
        .sett-range::-webkit-slider-thumb {
            -webkit-appearance: none; width: 22px; height: 22px;
            border-radius: 50%; background: #fff;
            box-shadow: 0 2px 8px rgba(0,0,0,0.4);
        }
        .sett-range-labels {
            display: flex; justify-content: space-between;
            font-size: 11px; color: rgba(255,255,255,0.35);
            margin-top: 6px;
        }
        #page-settings { padding-bottom: 100px; border-radius: 0; }
        .sett-header {
            padding: 16px 16px 10px;
            display: flex; align-items: center; gap: 12px;
            background: transparent;
        }
        .sett-back {
            width: 40px; height: 40px; display: flex; align-items: center;
            justify-content: center; border-radius: 50%; cursor: pointer;
            background: rgba(255,255,255,0.07); font-size: 18px; color: #fff;
            -webkit-tap-highlight-color: transparent; flex-shrink: 0;
        }
        .sett-back:active { opacity: 0.7; }
        .sett-main-title {
            font-size: 22px; font-weight: 900; color: #fff;
        }
    


        @keyframes curaSlideIn {
            from { opacity:0; transform:translateY(40px) scale(0.92); }
            to   { opacity:1; transform:translateY(0) scale(1); }
        }
        #cura-modal button:active { transform: scale(0.96); }
    
/* ══════════════════════════════════════════════════════════════
   NEXUS KI-SUCHLEISTE — "Was möchtest du hören?" (nur Startseite)
   ══════════════════════════════════════════════════════════════ */
#ai-search-bar-wrap {
    position: fixed;
    left: 12px; right: 12px;
    bottom: 72px;
    z-index: 3600;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: bottom 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s ease, transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
body.on-home #ai-search-bar-wrap { display: block; opacity: 1; transform: translateY(0); }
#ai-search-bar-wrap.raised { bottom: 148px; }

#ai-search-bar {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 52px;
    padding: 0 8px 0 18px;
    border-radius: 30px;
    background: var(--pill-bg);
    border: 1px solid transparent;
    background-image: linear-gradient(var(--pill-bg), var(--pill-bg)), linear-gradient(90deg, transparent, #007aff, #00f2ff, #007aff, transparent);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    background-size: 200% 100%;
    animation: border-flow 3s linear infinite;
    box-shadow: 0 8px 24px rgba(0,0,0,0.55), 0 0 20px rgba(0,122,255,0.15);
    backdrop-filter: blur(10px);
}
#ai-search-bar .ai-bar-icon {
    color: #00f2ff; font-size: 15px; flex-shrink: 0;
    filter: drop-shadow(0 0 6px rgba(0,242,255,0.6));
}
#ai-search-input {
    flex: 1; background: none; border: none; outline: none;
    color: #fff; font-size: 14.5px; font-weight: 500; min-width: 0;
}
#ai-search-input::placeholder { color: #888; font-weight: 500; }
#ai-search-send {
    width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, #007aff, #00f2ff);
    display: flex; align-items: center; justify-content: center;
    color: #000; font-size: 14px; cursor: pointer; border: none;
    transition: transform 0.15s ease, opacity 0.2s ease;
}
#ai-search-send:active { transform: scale(0.88); }
#ai-search-send.loading i { animation: nexusAiSpin 0.8s linear infinite; }
@keyframes nexusAiSpin { to { transform: rotate(360deg); } }

/* Antwort-Blase über der Suchleiste */
#ai-search-response {
    position: absolute;
    left: 4px; right: 4px;
    bottom: calc(100% + 10px);
    background: rgba(15,15,15,0.94);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    padding: 12px 16px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #eee;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    display: none;
    max-height: 180px;
    overflow-y: auto;
    backdrop-filter: blur(12px);
}
#ai-search-response.visible { display: block; }
#ai-search-response .ai-resp-tag {
    color: #00f2ff; font-weight: 800; font-size: 10px;
    text-transform: uppercase; letter-spacing: 0.5px;
    display: block; margin-bottom: 4px;
}
