:root {
    --bg-main: #060913; 
    --bg-card: #0f172a; 
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --accent-color: #a855f7; 
    --transition-smooth: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* CORES PARA O MODO CLARO (Injetadas dinamicamente) */
[data-theme="light"] {
    --bg-main: #f8fafc; /* Fundo cinza bem claro e confortável */
    --bg-card: #ffffff; /* Cards puramente brancos */
    --text-primary: #0f172a; /* Texto principal escuro */
    --text-secondary: #64748b; /* Texto secundário cinza escuro */
}

/* Pequeno ajuste para os inputs e links se adaptarem visualmente */
[data-theme="light"] .search-box { background: #ffffff; border-color: #cbd5e1; color: #0f172a; }
[data-theme="light"] .search-box:focus { color: #0f172a; background: #ffffff; }
[data-theme="light"] .navbar-brand { color: #0f172a !important; }
[data-theme="light"] .section-title { color: #0f172a; }
[data-theme="light"] .grid-radio-card:hover { background: #f1f5f9; }
[data-theme="light"] .grid-radio-card h6 { color: #0f172a !important; }
[data-theme="light"] .category-badge { background: #ffffff; border-color: #e2e8f0; color: #334155; }
[data-theme="light"] .category-count { background: #e2e8f0; color: #334155; }

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    padding-bottom: 0; 
    letter-spacing: -0.2px;
    transition: padding-bottom 0.3s ease;
}

.navbar-brand { font-weight: 800; font-size: 24px; }
.search-container { position: relative; max-width: 350px; width: 100%; }
.search-container i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #64748b; }
.search-box {
    background: #0f172a; border: 1px solid #1e293b; border-radius: 50px; color: white;
    padding: 10px 20px 10px 45px; font-size: 14px; transition: var(--transition-smooth);
}
.search-box:focus { background: #1e293b; border-color: var(--accent-color); box-shadow: 0 0 0 3px rgba(168, 85, 247, 0.2); color: white; }

.section-title { font-weight: 700; font-size: 20px; color: #f8fafc; }

.featured-scroll, .category-scroll { 
    display: flex; overflow-x: auto; gap: 16px; padding-bottom: 12px; scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.featured-scroll::-webkit-scrollbar { height: 5px; }
.featured-scroll::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 10px; }
.category-scroll::-webkit-scrollbar { height: 0px; display: none; }

.card-featured, .card-favorito-item {
    min-width: 260px; max-width: 260px; background: var(--bg-card);
    border: 1px solid rgba(255, 255, 255, 0.03); border-radius: 20px;
    overflow: hidden; transition: var(--transition-smooth); cursor: pointer; position: relative;
}
.card-featured:hover, .card-favorito-item:hover { 
    transform: translateY(-5px); box-shadow: 0 12px 24px rgba(0, 0, 0, 0.5); border-color: rgba(168, 85, 247, 0.4);
}
.card-featured .img-wrapper, .card-favorito-item .img-wrapper {
    height: 150px; width: 100%; background: linear-gradient(145deg, #020617, #0f172a);
    display: flex; align-items: center; justify-content: center; padding: 15px;
}
.card-featured img, .card-favorito-item img { max-height: 100%; max-width: 100%; object-fit: contain; border-radius: 12px; transition: var(--transition-smooth); }

.btn-fav-toggle {
    position: absolute; top: 12px; right: 12px; background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1); width: 34px; height: 34px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; color: #94a3b8;
    transition: var(--transition-smooth); z-index: 10; cursor: pointer;
}
.btn-fav-toggle:hover { transform: scale(1.1); background: rgba(15, 23, 42, 0.9); }
.btn-fav-toggle.active { color: #ef4444; }

.category-badge {
    background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px; border-radius: 14px; display: inline-flex;
    align-items: center; color: #e2e8f0; text-decoration: none;
    font-weight: 600; font-size: 14px; transition: var(--transition-smooth); white-space: nowrap; cursor: pointer;
}
.category-badge:hover, .category-badge.active { background: var(--accent-color); color: white; border-color: var(--accent-color); }

.category-count {
    font-size: 10px; background: rgba(255,255,255,0.15); padding: 2px 6px; 
    border-radius: 20px; margin-left: 8px; font-weight: 500;
}
.category-badge.active .category-count { background: rgba(0,0,0,0.2); }

.grid-radio-card {
    background: var(--bg-card); border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 18px; padding: 12px; text-align: center; cursor: pointer; transition: var(--transition-smooth);
    height: 100%; position: relative;
}
.grid-radio-card:hover { background: #1e293b; transform: translateY(-3px); }
.grid-radio-card .thumb-box {
    height: 90px; background: #020617; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; padding: 8px; margin-bottom: 10px;
}
.grid-radio-card img { max-height: 100%; max-width: 100%; object-fit: contain; }
.grid-radio-card .btn-fav-toggle { top: 18px; right: 18px; }

/* Player Rules */
.fixed-player {
    position: fixed; background: rgba(15, 23, 42, 0.96);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 20px 50px rgba(0,0,0,0.7);
    z-index: 9999; display: none; padding: 12px 20px;
}
.fixed-player.mode-floating {
    bottom: 25px; left: 50%; transform: translateX(-50%);
    width: 92%; max-width: 580px; border-radius: 24px;
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.fixed-player.mode-docked {
    bottom: 0; left: 0; transform: none; width: 100%; border-radius: 0;
    background: #090d1a !important; padding: 16px 40px;
}

@keyframes slideUp {
    from { bottom: -100px; opacity: 0; }
    to { bottom: 25px; opacity: 1; }
}

.player-logo-box { width: 48px; height: 48px; background: #020617; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 4px; }
.btn-player-control { background: rgba(255,255,255,0.05); border: none; color: white; width: 42px; height: 42px; border-radius: 50px; display: inline-flex; align-items: center; justify-content: center; transition: var(--transition-smooth); }
.btn-player-control:hover { background: var(--accent-color); transform: scale(1.08); }
.btn-pin-control, .btn-share-control { background: transparent; border: none; color: var(--text-secondary); font-size: 14px; padding: 5px; cursor: pointer; }
.btn-pin-control:hover, .fixed-player.mode-docked .btn-pin-control, .btn-share-control:hover { color: var(--accent-color); }
.fixed-player.mode-docked .btn-pin-control i { transform: rotate(-45deg); }

.equilizer-bars { position: absolute; bottom: 4px; right: 4px; display: flex; gap: 2px; height: 14px; align-items: flex-end; background: rgba(0,0,0,0.8); padding: 2px; border-radius: 3px; opacity: 0; }
.equilizer-bars.playing { opacity: 1; }
.equilizer-bars span { width: 2px; height: 100%; background: var(--accent-color); animation: bounce 0.8s ease infinite alternate; transform-origin: bottom; }
@keyframes bounce { 0% { transform: scaleY(0.2); } 100% { transform: scaleY(1); } }

.volume-container { display: flex; align-items: center; gap: 8px; }
.volume-slider { -webkit-appearance: none; width: 70px; height: 4px; background: #1e293b; border-radius: 5px; }
...volume-slider::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--accent-color); }
.btn-volume-mute { background: transparent; border: none; color: var(--text-secondary); }
.text-accent { color: var(--accent-color) !important; font-weight: 500; }

footer p a:hover {
    color: var(--accent-color) !important;
    transition: var(--transition-smooth);
}

/* Espaços para Anúncios */
.portal-ads-box {
    background: rgba(15, 23, 42, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 15px;
    text-align: center;
    margin: 30px 0;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.portal-ads-box::before {
    content: "PUBLICIDADE / PATROCÍNIO";
    display: block;
    font-size: 9px;
    color: var(--text-secondary);
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.portal-ads-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: var(--transition-smooth);
}

.portal-ads-box img:hover {
    transform: scale(1.01);
}

[data-theme="light"] #btnTema, [data-theme="light"] .navbar nav a.btn {
    border-color: #0f172a;
    color: #0f172a;
}
[data-theme="light"] #btnTema:hover { background: #0f172a; color: #ffffff; }