        /* ==========================================
           RESET E PADRÕES
           ========================================== */
        * { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
        body { display: flex; justify-content: center; background-color: #050505; min-height: 100dvh; overflow-x: hidden; }

        /* ==========================================
           MOBILE FIRST: CONTAINER PRINCIPAL E CORES
           ========================================== */
        .app-container {
            width: 100%; max-width: 400px; height: 100dvh;
            background-color: #111;
            position: relative; overflow-y: auto; overflow-x: hidden;
            box-shadow: 0 0 30px rgba(0,0,0,0.8);
            display: flex; flex-direction: column; z-index: 1;
            -webkit-overflow-scrolling: touch; 
        }

        .app-container::-webkit-scrollbar { display: none; }

        .app-background {
            position: absolute;
            top: -10%; left: -10%;
            width: 120%; height: 120%;
            z-index: 0;
            background-size: cover;
            background-position: center top;
            background-repeat: no-repeat;
            filter: blur(10px) brightness(0.35);
            transition: background-image 0.8s ease, opacity 0.8s ease;
            pointer-events: none;
            -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.1) 75%, transparent 100%);
            mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 40%, rgba(0,0,0,0.1) 75%, transparent 100%);
        }

        header {
            background-color: rgba(255, 255, 255, 0.05);
            backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
            border-bottom: 1px solid rgba(255, 255, 255, 0.1);
            height: 65px; min-height: 65px;
            display: flex; align-items: center; justify-content: center; padding: 0 15px; z-index: 10;
            position: sticky; top: 0;
            transition: all 0.3s ease;
        }
        
        .header-right { position: absolute; right: 15px; display: flex; align-items: center; }
        
        .header-menu-btn { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.1); color: white; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: 0.3s; font-size: 18px; backdrop-filter: blur(5px); outline: none; }
        .header-menu-btn:hover { background: rgba(255,255,255,0.2); transform: scale(1.05); }
        .header-menu-btn:active { transform: scale(0.95); }

        .header-dropdown { position: absolute; top: 55px; right: 0; background: rgba(15,15,15,0.95); backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 4px; opacity: 0; pointer-events: none; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); min-width: 170px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 100; }
        .header-dropdown.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
        .header-dropdown-btn { background: none; border: none; color: white; padding: 10px 12px; text-align: left; font-size: 13px; font-weight: 600; font-family: 'Montserrat', sans-serif; border-radius: 8px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background 0.2s; white-space: nowrap; }
        .header-dropdown-btn:hover { background: rgba(255,255,255,0.15); }
        .header-dropdown-btn i { font-size: 16px; }

        .logo-img { max-height: 40px; width: auto; object-fit: contain; transition: opacity 0.3s ease; }

        /* Views */
        .view-container { flex: none; display: flex; flex-direction: column; width: 100%; position: relative; z-index: 2; overflow-y: auto; overflow-x: hidden; }
        #homeView { display: flex; flex-direction: column; align-items: center; text-align: center; animation: fadeIn 0.4s ease; min-height: 100%; }
        #playerView { display: none; flex-direction: column; align-items: center; text-align: center; padding: 30px 0; animation: fadeIn 0.4s ease; min-height: 100%; justify-content: center; }
        @keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

        /* Artes Capa e Equalizador */
        .hero-banner-art {
            width: 100%; height: 220px; background-size: cover; background-position: center; 
            background-repeat: no-repeat; margin-bottom: 65px;
            transition: opacity 0.5s ease, background-image 0.5s ease;
            -webkit-box-reflect: below 1px linear-gradient(to bottom, transparent, transparent 60%, rgba(0,0,0,0.3));
        }

        .circular-art-wrapper {
            position: relative;
            width: 140px; height: 140px;
            margin-bottom: 40px;
            display: flex; justify-content: center; align-items: center;
            z-index: 1;
            cursor: pointer;
        }

        #visualizerCanvas {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 220px; 
            height: 220px;
            z-index: 0; 
            pointer-events: none;
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .visualizer-ring {
            position: absolute;
            inset: -8px; 
            border-radius: 50%;
            background: radial-gradient(circle, rgba(74, 222, 128, 0.15) 0%, transparent 70%);
            border: 2px solid rgba(74, 222, 128, 0.6);
            box-shadow: 0 0 20px rgba(74, 222, 128, 0.6), inset 0 0 15px rgba(74, 222, 128, 0.4);
            opacity: 0;
            transform: scale(0.9);
            z-index: 0;
            pointer-events: none;
            will-change: transform, opacity, border, box-shadow, background;
            transition: border 0.5s ease, box-shadow 0.5s ease, background 0.5s ease;
            display: none;
        }

        @keyframes fallbackPulseEq {
            0% { transform: scale(1); opacity: 0.3; }
            50% { transform: scale(1.15); opacity: 0.8; }
            100% { transform: scale(1); opacity: 0.3; }
        }
        .visualizer-ring.fallback-pulse {
            display: block;
            animation: fallbackPulseEq 1.2s infinite ease-in-out;
            opacity: 0.8 !important;
        }

        /* CAPA REDONDA */
        .circular-art {
            width: 100%; height: 100%; border-radius: 50%; 
            background-size: cover; background-position: center;
            background-repeat: no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,0.6); 
            transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s ease, background-image 0.4s ease;
            position: relative; z-index: 2; overflow: hidden;
        }
        .circular-art.animating { transform: scale(0.6) rotate(-15deg); opacity: 0; }

        /* Botões de Compartilhamento */
        .share-overlay {
            position: absolute; inset: 0; border-radius: 50%;
            display: flex; justify-content: center; align-items: center; gap: 12px;
            background: rgba(0, 0, 0, 0); opacity: 0;
            z-index: 10; pointer-events: none;
            transition: background 0.3s ease, opacity 0.3s ease;
        }
        
        .circular-art-wrapper.show-share .share-overlay {
            opacity: 1; pointer-events: auto; background: rgba(0, 0, 0, 0.6);
        }

        .share-btn {
            width: 44px; height: 44px; border-radius: 50%; border: none;
            background: rgba(255, 255, 255, 0.25); color: white; font-size: 20px;
            display: flex; justify-content: center; align-items: center;
            cursor: pointer; transform: scale(0.4); opacity: 0; outline: none;
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, background 0.2s;
            backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        }
        
        .circular-art-wrapper.show-share .share-btn {
            transform: scale(1); opacity: 1;
        }

        .share-btn:nth-child(1) { transition-delay: 0s; }
        .share-btn:nth-child(2) { transition-delay: 0.05s; }
        
        .share-btn.share-fb:hover { background: #1877f2; transform: scale(1.15) !important; transition-delay: 0s; }
        .share-btn.share-tw:hover { background: #000000; color: white; transform: scale(1.15) !important; transition-delay: 0s; }

        /* Badges Ao Vivo */
        .live-badge-green { display: inline-flex; align-items: center; gap: 10px; color: white; font-family: 'Montserrat', sans-serif; font-size: 13px; font-weight: 800; letter-spacing: 1px; margin-bottom: 8px; text-transform: uppercase; }
        .dot-green { width: 12px; height: 12px; background-color: #4ade80; border-radius: 50%; box-shadow: 0 0 0 rgba(74, 222, 128, 0.4); animation: pulseGreen 2s infinite; }
        @keyframes pulseGreen { 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7); } 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(74, 222, 128, 0); } 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }

        /* Textos e Wrappers */
        .track-info-container { display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 80px; margin-bottom: 25px; width: 100%; }
        
        .title-wrapper { width: 100%; padding: 0 15px; margin-bottom: 5px; display: flex; justify-content: center; }
        .subtitle-wrapper { width: 100%; padding: 0 15px; display: flex; justify-content: center; }
        
        .title { color: white; font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 800; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; line-height: 1.2; transition: font-size 0.4s ease-in-out; text-shadow: 0 2px 10px rgba(0,0,0,0.5); margin: 0; width: 100%; }
        .subtitle { color: white; font-family: 'Playfair Display', serif; font-size: 18px; font-style: italic; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; transition: font-size 0.4s ease-in-out; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
        .subtitle span { color: #fceb05; font-weight: 800; font-style: normal; }

        .blinking-text { animation: textBlink 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
        @keyframes textBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

        /* Botões Principais */
        .play-btn-yellow { background-color: #fbf000; border: none; border-radius: 12px; padding: 12px 35px; font-size: 18px; font-weight: 900; color: #000; display: flex; align-items: center; justify-content: center; gap: 12px; cursor: pointer; box-shadow: 0 6px 15px rgba(0,0,0,0.3); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); min-width: 160px; position: relative; overflow: hidden; }
        .play-btn-yellow:active { transform: scale(0.96); }
        .play-btn-yellow i, .play-btn-yellow span { position: relative; z-index: 2; transition: opacity 0.2s; }
        
        .action-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 15px; margin-bottom: 30px; width: 100%; padding: 0 10px; }
        .action-btn { background: none; border: none; color: white; font-size: 14px; font-family: 'Segoe UI', sans-serif; display: flex; align-items: center; gap: 6px; cursor: pointer; opacity: 0.9; transition: all 0.3s ease; text-shadow: 0 2px 4px rgba(0,0,0,0.5); text-decoration: none; padding: 5px; }
        .action-btn:hover { opacity: 1; }
        .action-btn i { font-size: 18px; }

        /* Wrappers e Controles */
        .main-player-controls-wrapper { width: 100%; transition: opacity 0.35s ease, transform 0.35s ease; }
        .main-player-controls-wrapper.hidden { opacity: 0; transform: translateY(15px); pointer-events: none; }

        .progress-container { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0 20px; margin-bottom: 25px; }
        
        .red-live-badge { background-color: #ff0000; color: white; padding: 4px 10px; border-radius: 4px; font-size: 11px; font-weight: bold; font-family: 'Montserrat', sans-serif; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: background-color 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.3); }
        .red-live-badge.timeshifted { background-color: rgba(255,255,255,0.2); backdrop-filter: blur(5px); color: rgba(255,255,255,0.9); }
        .red-live-badge.timeshifted .dot-white { animation: none; opacity: 0.3; }
        
        .dvr-time-display { color: white; font-size: 12px; font-weight: 700; font-family: 'Montserrat', sans-serif; min-width: 45px; text-align: center; }

        .dot-white { width: 6px; height: 6px; background-color: white; border-radius: 50%; animation: pulseWhite 1.5s infinite; }
        @keyframes pulseWhite { 0% { opacity: 1; } 50% { opacity: 0.3; } 100% { opacity: 1; } }
        
        .progress-bar-track { flex: 1; height: 6px; background-color: rgba(255, 255, 255, 0.2); border-radius: 3px; cursor: pointer; transition: background 0.1s linear; box-shadow: inset 0 1px 3px rgba(0,0,0,0.3); }

        .controls-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 0 20px; margin-bottom: 10px; position: relative; }
        .controls-row i.control-icon { color: rgba(255, 255, 255, 0.8); font-size: 24px; cursor: pointer; transition: transform 0.2s, color 0.2s; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); }
        .controls-row i.control-icon:hover { color: white; }

        .main-play-btn, .sticky-play-btn {
            position: relative; width: 65px; height: 65px; border-radius: 50%;
            background-color: white; border: none; display: flex; align-items: center; justify-content: center;
            cursor: pointer; box-shadow: 0 4px 15px rgba(0,0,0,0.3); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .main-play-btn:active, .sticky-play-btn:active { transform: scale(0.95); }
        .main-play-btn i, .sticky-play-btn i { color: #111; font-size: 36px; margin-left: 3px; transition: opacity 0.2s; position: relative; z-index: 2; }
        .main-play-btn i.bi-pause-fill, .sticky-play-btn i.bi-pause-fill { margin-left: 0; }

        .loading-spinner { position: absolute; width: 34px; height: 34px; border: 4px solid rgba(0, 0, 0, 0.1); border-top-color: #111; border-radius: 50%; animation: spin 1s linear infinite; display: none; z-index: 3; }
        @keyframes spin { to { transform: rotate(360deg); } }
        .is-loading .loading-spinner { display: block; }
        .is-loading i, .is-loading span { opacity: 0 !important; }

        /* Qualidade Menu */
        .speed-wrapper { position: relative; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: opacity 0.3s; }
        .speed-badge { position: absolute; top: -2px; right: -4px; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #1a1a1a; display: none; } 
        
        .dot-auto { background-color: #ffffff; animation: pulseWhiteDot 2s infinite; display: block !important; }
        .dot-excelente { background-color: #3b82f6; animation: pulseBlueDot 2s infinite; display: block !important; }
        .dot-normal { background-color: #fceb05; animation: pulseYellowDot 2s infinite; display: block !important; }
        .dot-economica { background-color: #ef4444; animation: pulseRedDot 2s infinite; display: block !important; }

        @keyframes pulseWhiteDot { 0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); } }
        @keyframes pulseBlueDot { 0% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(59, 130, 246, 0); } 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); } }
        @keyframes pulseYellowDot { 0% { box-shadow: 0 0 0 0 rgba(252, 235, 5, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(252, 235, 5, 0); } 100% { box-shadow: 0 0 0 0 rgba(252, 235, 5, 0); } }
        @keyframes pulseRedDot { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); } 70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }

        /* MODAIS */
        .quality-modal, .lyrics-modal, .stations-modal { 
            position: fixed; top: 0; left: 50%; transform: translateX(-50%);
            width: 100%; max-width: 400px; height: 100dvh;
            background: rgba(0,0,0,0.85); backdrop-filter: blur(15px); 
            z-index: 150; display: flex; flex-direction: column; padding: 25px; 
            
            opacity: 0; visibility: hidden; pointer-events: none; 
            transition: opacity 0.35s ease, visibility 0.35s ease; 
        }
        .stations-modal, .quality-modal { overflow-y: auto; overflow-x: hidden; }
        .stations-modal::-webkit-scrollbar, .quality-modal::-webkit-scrollbar { display: none; }
        
        .quality-modal.show, .lyrics-modal.show, .stations-modal.show { 
            opacity: 1; visibility: visible; pointer-events: auto; 
        }
        
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 25px; color: white; flex-shrink: 0; }
        .modal-header h2 { font-family: 'Montserrat', sans-serif; font-size: 18px; text-transform: uppercase; letter-spacing: 1px; }
        .close-modal-btn { background: none; border: none; color: white; font-size: 32px; cursor: pointer; transition: transform 0.2s; }
        .close-modal-btn:hover { transform: scale(1.1); }
        
        .quality-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
        .quality-option { 
            background: rgba(255, 255, 255, 0.04); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
            border-radius: 18px; padding: 20px 10px; display: flex; flex-direction: column; align-items: center; 
            justify-content: center; text-align: center; gap: 8px; color: white; cursor: pointer; 
            border: 1px solid rgba(255, 255, 255, 0.08); transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
            position: relative; overflow: hidden; 
        }
        .quality-option::before { 
            content: ''; position: absolute; inset: 0; 
            background: radial-gradient(circle at center, rgba(255,255,255,0.1) 0%, transparent 70%); 
            opacity: 0; transition: opacity 0.3s ease; pointer-events: none; 
        }
        .quality-option:hover { 
            background: rgba(255, 255, 255, 0.08); transform: translateY(-4px) scale(1.02); 
            box-shadow: 0 10px 25px rgba(0,0,0,0.4); border-color: rgba(255,255,255,0.3); 
        }
        .quality-option:hover::before { opacity: 1; }
        .quality-option.selected { 
            border-color: white; background: rgba(255, 255, 255, 0.12); box-shadow: 0 0 20px rgba(255,255,255,0.1); 
        }
        .quality-option i { font-size: 28px; color: rgba(255,255,255,0.7); transition: color 0.3s, transform 0.3s; margin-bottom: 2px; }
        .quality-option:hover i { color: white; transform: scale(1.1); }
        .quality-option.selected i { color: white; }
        
        .quality-info { display: flex; flex-direction: column; gap: 4px; }
        .quality-title { font-weight: 700; font-size: 14px; font-family: 'Montserrat', sans-serif; letter-spacing: 0.5px; }
        .quality-desc { font-size: 11px; opacity: 0.6; line-height: 1.3; }
        .quality-indicator-dot { position: absolute; top: 14px; right: 14px; width: 10px; height: 10px; border-radius: 50%; }

        /* MODAL DE LETRAS */
        .lyrics-modal { overflow: hidden; padding-bottom: 10px; }
        .lyrics-track-info { text-align: center; margin-bottom: 20px; flex-shrink: 0; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; }
        .lyrics-track-info h3 { color: white; font-family: 'Playfair Display', serif; font-size: 20px; margin-bottom: 5px; font-weight: 800; }
        .lyrics-track-info p { color: #fceb05; font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 600; text-transform: uppercase; }
        .lyrics-content { flex: 1; overflow-y: auto; text-align: center; color: rgba(255, 255, 255, 0.95); font-family: 'Playfair Display', serif; font-size: 17px; line-height: 1.8; padding: 0 15px 30px 15px; scroll-behavior: smooth; }
        .lyrics-content::-webkit-scrollbar { width: 4px; display: none; }
        .lyrics-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 15px; color: rgba(255,255,255,0.6); font-family: 'Montserrat', sans-serif; font-size: 14px; }
        .lyrics-loading .spinner { width: 34px; height: 34px; border: 3px solid rgba(255,255,255,0.1); border-top-color: #4ade80; border-radius: 50%; animation: spin 1s linear infinite; }

        /* Sticky Bottom Bar */
        .sticky-bottom-bar {
            position: fixed; 
            bottom: 0; 
            left: 50%; width: 100%; max-width: 400px;
            background-color: rgba(25, 25, 25, 0.85); 
            backdrop-filter: blur(25px); -webkit-backdrop-filter: blur(25px);
            border-top: 1px solid rgba(255, 255, 255, 0.1); 
            display: flex; align-items: center; justify-content: space-between;
            padding: 12px 20px; 
            padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)); 
            z-index: 100;
            transform: translate(-50%, 150%); -webkit-transform: translate(-50%, 150%);
            transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), -webkit-transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 -10px 30px rgba(0,0,0,0.6); 
            border-radius: 20px 20px 0 0; 
        }
        .sticky-bottom-bar.show { 
            transform: translate(-50%, 0); -webkit-transform: translate(-50%, 0); 
        }
        
        .sticky-bottom-bar i.control-icon { color: rgba(255, 255, 255, 0.85); font-size: 22px; cursor: pointer; transition: color 0.2s; }
        .sticky-bottom-bar i.control-icon:hover { color: white; }
        
        .sticky-play-btn { width: 50px; height: 50px; }
        .sticky-play-btn i { font-size: 28px; }
        .sticky-play-btn .loading-spinner { width: 26px; height: 26px; border-width: 3px; }

        .sticky-mini-popup { position: absolute; bottom: calc(100% + 15px); right: 0; background: rgba(15, 15, 15, 0.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); padding: 12px; border-radius: 16px; opacity: 0; transform: translateY(10px) scale(0.95); pointer-events: none; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 5px 20px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.1); display: flex; flex-direction: column; gap: 8px; width: 145px; }
        .sticky-mini-popup.show { opacity: 1; transform: translateY(0) scale(1); pointer-events: all; }
        .sticky-q-btn { background: none; border: none; color: white; text-align: left; padding: 8px 10px; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-family: 'Montserrat', sans-serif; transition: background 0.2s; }
        .sticky-q-btn:hover, .sticky-q-btn.selected { background: rgba(255,255,255,0.15); }
        .sticky-q-btn .q-icon-text { display: flex; align-items: center; gap: 8px; }
        .sticky-q-btn .dot { width: 8px; height: 8px; border-radius: 50%; }

        /* Histórico */
        .history-section { 
            position: relative; 
            z-index: 2; 
            padding: 20px 15px calc(140px + env(safe-area-inset-bottom, 0px)) 15px; 
            width: 100%; 
        } 
        
        .history-title-header { text-align: center; color: rgba(255, 255, 255, 0.7); font-size: 16px; margin-bottom: 20px; font-weight: 600; text-transform: uppercase; font-family: 'Montserrat', sans-serif; letter-spacing: 1px; }
        .history-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }
        .history-card { cursor: pointer; background: rgba(255, 255, 255, 0.05); backdrop-filter: blur(8px); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.05); display: flex; flex-direction: column; box-shadow: 0 4px 15px rgba(0,0,0,0.2); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        
        .animate-card { opacity: 0; transform-origin: center bottom; animation: shuffleDeal 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
        @keyframes shuffleDeal { 0% { opacity: 0; transform: translateY(50px) scale(0.8) rotate(5deg); } 100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); } }

        /* SKELETON LOADER PARA CAPAS */
        .history-cover { position: relative; width: 100%; aspect-ratio: 1; background-color: #111; overflow: hidden; }
        
        .skeleton-loader {
            position: absolute; inset: 0; z-index: 1;
            background: linear-gradient(90deg, rgba(255,255,255,0.03) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 75%);
            background-size: 200% 100%;
            animation: skeleton-shimmer 1.5s infinite linear;
        }
        
        @keyframes skeleton-shimmer {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .history-cover-img {
            position: absolute; inset: 0; z-index: 2;
            background-size: cover; background-position: center; background-repeat: no-repeat;
            opacity: 0; transition: opacity 0.5s ease;
        }
        
        .history-cover-img.loaded { opacity: 1; }

        .time-ago-badge { position: absolute; bottom: 8px; right: 8px; background: rgba(0,0,0,0.7); backdrop-filter: blur(4px); color: white; font-size: 10px; font-weight: 600; padding: 4px 8px; border-radius: 8px; font-family: 'Montserrat', sans-serif; z-index: 5; }
        
        .history-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.6); display: flex; justify-content: center; align-items: center; gap: 12px; opacity: 0; transition: opacity 0.3s; z-index: 10; pointer-events: none; }
        
        .history-card.active .history-overlay, .history-card.show-actions .history-overlay { opacity: 1; pointer-events: auto; }

        .preview-btn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: none; border: none; display: flex; justify-content: center; align-items: center; cursor: pointer; color: white; outline: none; transform: scale(0.4); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .preview-btn svg { position: absolute; top: 0; left: 0; transform: rotate(-90deg); pointer-events: none; }
        .preview-btn circle { fill: rgba(255,255,255,0.2); }
        .preview-btn .progress-circle { fill: none; stroke: #4ade80; stroke-width: 3; stroke-dasharray: 113; stroke-dashoffset: 113; transition: stroke-dashoffset 0.1s linear; }
        .preview-btn .icon { position: relative; z-index: 2; font-size: 20px; margin-left: 2px; }
        .preview-btn .icon.bi-pause-fill { margin-left: 0; }
        
        .itunes-btn { width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,0.2); display: flex; justify-content: center; align-items: center; color: white; text-decoration: none; transform: scale(0.4); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s; }
        
        .history-card.active .preview-btn, .history-card.show-actions .preview-btn { transform: scale(1); }
        .history-card.active .itunes-btn, .history-card.show-actions .itunes-btn { transform: scale(1); transition-delay: 0.1s, 0s; }
        
        .preview-btn:hover { transform: scale(1.08) !important; }
        .itunes-btn:hover { background: #ff2d55; transform: scale(1.08) !important; transition-delay: 0s, 0s !important; }

        .history-info { padding: 12px 10px; text-align: center; background: rgba(0,0,0,0.4); flex: 1; display: flex; flex-direction: column; justify-content: center; }
        .history-title { color: white; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; font-family: 'Segoe UI', sans-serif; }
        .history-artist { color: #aaaaaa; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
        .no-preview { opacity: 0.4; cursor: not-allowed; }

        /* Modal Estações Grid */
        .stations-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 15px; }
        .station-card { background: rgba(255, 255, 255, 0.05); border-radius: 12px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); display: flex; flex-direction: column; cursor: pointer; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); position: relative; }
        .station-card:hover { transform: scale(1.03); border-color: #fceb05; box-shadow: 0 8px 20px rgba(0,0,0,0.4); }
        .station-card.active { border-color: #4ade80; box-shadow: 0 0 15px rgba(74,222,128,0.2); pointer-events: none; }
        .station-card.active .station-cover-container::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,0.65); z-index: 12; }
        .station-active-overlay { position: absolute; inset: 0; z-index: 15; display: flex; flex-direction: column; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s; }
        .station-card.active .station-active-overlay { opacity: 1; }

        .eq-container { display: flex; gap: 3px; height: 24px; align-items: flex-end; margin-bottom: 5px; }
        .eq-bar { width: 4px; background-color: #4ade80; border-radius: 2px; animation: eqBounce 0.5s infinite alternate ease-in; }
        .eq-bar:nth-child(1) { height: 40%; animation-delay: 0.1s; }
        .eq-bar:nth-child(2) { height: 80%; animation-delay: 0.3s; }
        .eq-bar:nth-child(3) { height: 100%; animation-delay: 0s; }
        .eq-bar:nth-child(4) { height: 60%; animation-delay: 0.2s; }
        @keyframes eqBounce { 0% { height: 20%; } 100% { height: 100%; } }
        
        .station-cover-container { position: relative; width: 100%; aspect-ratio: 1; background-color: #111; overflow: hidden; }
        .station-default-art, .station-track-art { position: absolute; inset: 0; background-size: cover; background-position: center; background-repeat: no-repeat; transition: opacity 0.4s ease; }
        .station-track-art { opacity: 0; z-index: 2; }
        
        .station-card:not(.active):hover .station-track-art, .station-card:not(.active):active .station-track-art { opacity: 1; }
        .station-card:not(.active):hover .station-default-art, .station-card:not(.active):active .station-default-art { opacity: 0; }

        /* NOVA ANIMAÇÃO: Alternar capas a cada 4s (8s ciclo completo) para a estação ATIVA */
        @keyframes alternateStationArt {
            0%, 40% { opacity: 0; }
            50%, 90% { opacity: 1; }
            100% { opacity: 0; }
        }
        .station-card.active .station-track-art.alternating-art {
            animation: alternateStationArt 8s infinite ease-in-out;
        }
        
        .station-play-overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.3); display: flex; justify-content: center; align-items: center; opacity: 0; transition: opacity 0.3s ease; z-index: 10; pointer-events: none; }
        .station-card:hover .station-play-overlay, .station-card:active .station-play-overlay { opacity: 1; }
        .station-play-btn { width: 48px; height: 48px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; color: white; font-size: 24px; padding-left: 3px; box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.4); transform: scale(0.8); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
        .station-card:hover .station-play-btn, .station-card:active .station-play-btn { transform: scale(1); }

        .station-info { padding: 12px 10px; text-align: center; background: rgba(0,0,0,0.5); flex: 1; display: flex; flex-direction: column; justify-content: center; }
        .station-name { color: #fceb05; font-size: 11px; font-weight: 800; text-transform: uppercase; margin-bottom: 4px; font-family: 'Montserrat', sans-serif; }
        .station-track { color: white; font-size: 12px; font-weight: 600; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-overflow: ellipsis; }

        /* ADS OVERLAY */
        #adOverlay {
            position: fixed; inset: 0; background: #000; z-index: 999999;
            display: none; justify-content: center; align-items: center;
        }
        #adVideoElement {
            width: 100%; height: 100%; background: #000; object-fit: contain;
        }
        #adContainer {
            position: absolute; inset: 0;
        }

        /* ==========================================
           TOAST NOTIFICATIONS GENÉRICAS E LISTENERS
           ========================================== */
        .toast-container { 
            position: fixed; top: 20px; right: 20px; z-index: 999999; 
            display: flex; flex-direction: column; gap: 12px; pointer-events: none; align-items: flex-end; 
        }
        
        @media (max-width: 767px) { 
            .toast-container { top: 20px; right: 0; left: 0; align-items: center; padding: 0 20px; width: 100%; } 
        }
        
        .toast-msg { 
            width: 100%; max-width: 350px;
            background: rgba(15, 15, 15, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px); 
            border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 14px; padding: 14px 16px; 
            display: flex; align-items: center; gap: 14px; color: white; box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
            transform: translateX(120%); opacity: 0; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
            position: relative; overflow: hidden; pointer-events: auto;
        }
        
        @media (max-width: 767px) { 
            .toast-msg { transform: translateY(-150%); } 
        }

        .toast-msg.show { transform: translateX(0); opacity: 1; }
        @media (max-width: 767px) { .toast-msg.show { transform: translateY(0); } }

        .toast-msg.hide { opacity: 0; transform: scale(0.9); }

        .toast-icon { width: 36px; height: 36px; border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 18px; flex-shrink: 0; }
        .toast-content { display: flex; flex-direction: column; gap: 2px; }
        .toast-title { font-family: 'Montserrat', sans-serif; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
        .toast-desc { font-size: 13px; opacity: 0.85; font-weight: 500; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
        .toast-desc strong { color: white; opacity: 1; }
        .toast-progress { position: absolute; bottom: 0; left: 0; height: 3px; width: 100%; background: rgba(255, 255, 255, 0.1); }
        .toast-progress-bar { height: 100%; width: 100%; animation: toastProgress 4s linear forwards; }
        @keyframes toastProgress { 0% { width: 100%; } 100% { width: 0%; } }

        /* ==========================================
           DESKTOP/TABLET VIEW (OTIMIZAÇÕES AVANÇADAS)
           ========================================== */
        @media (min-width: 768px) {
            /* Custom Scrollbars para Desktop */
            .app-container *::-webkit-scrollbar { width: 8px; height: 8px; display: block; }
            .app-container *::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 4px; }
            .app-container *::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.15); border-radius: 4px; }
            .app-container *::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); }
            
            /* ALLOW SCROLL ON HOME VIEW */
            .app-container { max-width: 1100px; margin: 4vh auto; height: 92vh; min-height: 600px; border-radius: 24px; box-shadow: 0 20px 50px rgba(0,0,0,0.8); overflow-y: auto; overflow-x: hidden; background-color: #050505; }
            .app-container::-webkit-scrollbar { display: none; }
            
            .lyrics-content::-webkit-scrollbar { display: block; }

            /* Efeitos Hover Aprimorados */
            .play-btn-yellow:hover { transform: scale(1.05); box-shadow: 0 10px 25px rgba(251, 240, 0, 0.4); }
            .main-play-btn:hover { transform: scale(1.1); box-shadow: 0 8px 25px rgba(255,255,255,0.4); }
            .action-btn:hover { transform: translateY(-2px); text-shadow: 0 4px 10px rgba(0,0,0,0.6); }
            .control-icon:hover { transform: scale(1.15); }
            .history-card:hover { transform: translateY(-4px) scale(1.02); }

            /* Centralização e Proporções dos Modais */
            .quality-modal, .lyrics-modal, .stations-modal { position: absolute; inset: 0; transform: none; max-width: 100%; align-items: center; padding: 40px 10%; }
            .modal-header { width: 100%; max-width: 800px; }
            .quality-grid { width: 100%; max-width: 600px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
            .stations-grid { width: 100%; max-width: 800px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 20px; }
            .lyrics-track-info, .lyrics-content { width: 100%; max-width: 700px; }

            /* Views */
            #homeView { padding: 80px 60px; align-items: flex-start; justify-content: center; text-align: left; flex: 1; position: relative; min-height: calc(92vh - 65px); }
            .hero-banner-art { position: absolute; right: 0; top: 0; width: 100%; height: 100%; margin-bottom: 0; background-size: cover; background-position: right center; -webkit-box-reflect: none; z-index: 0; -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 25%, rgba(0,0,0,0.8) 60%, black 100%); mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.1) 25%, rgba(0,0,0,0.8) 60%, black 100%); }
            .live-badge-green, .play-btn-yellow { z-index: 2; position: relative; }
            .track-info-container { align-items: flex-start; max-width: 55%; z-index: 2; position: relative; padding: 0; overflow: hidden; }

            .title-wrapper, .subtitle-wrapper { padding: 0; justify-content: flex-start; overflow: hidden; width: 100%; -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%); mask-image: linear-gradient(to right, black 85%, transparent 100%); }
            .title { display: inline-block; white-space: nowrap; overflow: visible; text-overflow: clip; width: max-content; }
            .subtitle { display: inline-block; white-space: nowrap; overflow: visible; text-overflow: clip; width: max-content; margin-top: 5px; }

            .scrolling-text { animation: scroll-ping-pong 7s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite alternate; }
            @keyframes scroll-ping-pong { 0%, 15% { transform: translateX(0); } 85%, 100% { transform: translateX(var(--overflow-amount)); } }

            .app-container:not(.player-mode) .history-section { padding: 0 60px 40px 60px; z-index: 2; }
            .app-container:not(.player-mode) .history-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
            
            .history-title-header { text-align: left !important; font-size: 20px; margin-bottom: 25px; padding-bottom: 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); width: 100%; }

            /* Grid Layout do Player */
            .app-container.player-mode { display: grid; grid-template-columns: 1fr 380px; grid-template-rows: 65px 1fr; height: 92vh; overflow: hidden; }
            .app-container.player-mode header { grid-column: 1 / -1; }
            
            .app-container.player-mode .view-container { grid-column: 1; grid-row: 2; display: flex; flex-direction: column; justify-content: center; align-items: center; }
            
            .app-container.player-mode .history-section { grid-column: 2; grid-row: 2; border-left: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.4); padding: 30px 25px; height: calc(92vh - 65px); overflow-y: auto; backdrop-filter: blur(10px); }
            .app-container.player-mode .history-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }

            /* Tela Interna do Player com Auto-Centralização */
            #playerView { padding: 40px 50px; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; text-align: left; width: 100%; max-width: 650px; margin: auto; }
            #playerView .circular-art-wrapper { width: 180px; height: 180px; margin-right: 40px; margin-bottom: 0; }
            #playerView .track-info-container { flex: 1; align-items: flex-start; margin-bottom: 0; min-width: 250px; }
            #playerView .action-links { width: 100%; justify-content: flex-start; margin-left: 220px; margin-top: 20px; padding: 0; }
            #mainPlayerControls { margin-top: 50px; width: 100%; }
            #mainPlayerControls.hidden { opacity: 1 !important; transform: none !important; pointer-events: all !important; }
            #mainPlayerControls .progress-container { padding: 0; margin-bottom: 35px; }
            #mainPlayerControls .controls-row { width: 100%; margin: 0; padding: 0; }
            .sticky-bottom-bar, .sticky-mini-popup { display: none !important; } 
            
            #adOverlay { position: absolute; }
        }
        
        a, div, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
   
