/* Reset básico e configuração de fontes */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #10101D;
    color: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0;
}

/* Container principal do app */
.app-container {
    width: 100%;
    max-width: 420px;
    height: 100%;
    max-height: 880px;
    background: linear-gradient(180deg, #1A1A2E 0%, #10101D 100%);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* Cabeçalho */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 25px 20px;
    flex-shrink: 0;
}

.logo-section h1 {
    font-size: 2.5rem;
    font-weight: 900;
    line-height: 1;
    color: #FFFFFF;
}

.logo-section h1 span {
    color: #F8A543;
}

.logo-section p {
    font-size: 0.9rem;
    color: #a0a0b0;
}

.time-section {
    text-align: center;
    flex-shrink: 0;
}

.time-section p {
    font-size: 0.8rem;
    color: #F8A543;
    font-weight: bold;
}

.clock-icon-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}

.clock-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #F55E61, #F8A543);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(247, 122, 82, 0.4);
    font-size: 1.5rem;
}

.clock {
    font-size: 1.2rem;
    font-weight: bold;
    color: #FFFFFF;
    margin-top: 8px;
}

/* Conteúdo Principal */
.app-main {
    flex-grow: 1;
    padding: 0 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Player Card */
.player-card {
    /* PROPRIEDADES EXISTENTES */
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    
    /* ================================================= */
    /* ADIÇÕES PARA A IMAGEM DE FUNDO                    */
    /* ================================================= */
    position: relative; /* Necessário para o pseudo-elemento */
    overflow: hidden;   /* Garante que o fundo não vaze para fora das bordas arredondadas */
    z-index: 1;         /* Garante que o card fique na camada correta */
}

/* Pseudo-elemento para controlar o fundo com opacidade */
.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    
    /* ESCOLHA UMA DAS OPÇÕES ABAIXO */
    
    /* Opção 1: Ondas de Néon */
    background-image: url('https://radioroberto.com.br/imgs/img_fundo_player.png' );
    
    /* Opção 2: Partículas Sutis (descomente para usar) */
    /* background-image: url('https://i.imgur.com/vA9zR3A.jpeg' ); */
    
    background-size: cover;      /* Cobre todo o card */
    background-position: center; /* Centraliza a imagem */
    opacity: 0.25;               /* MUITO IMPORTANTE: Deixa a imagem bem sutil */
    z-index: -1;                 /* Coloca o fundo atrás do conteúdo (texto e botão) */
}

.song-info p:first-child {
    font-size: 0.8rem;
    color: #a0a0b0;
}

.song-info p:first-child i {
    margin-right: 8px;
}

.song-info h2 {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4A90E2;
}

/* Botão de Play com cores dinâmicas */
.play-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #F8A543, #f7d08a);
    color: #10101D;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 20px rgba(248, 165, 67, 0.3);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.play-button.playing {
    background: linear-gradient(135deg, #50E3C2, #38BFA0);
    box-shadow: 0 5px 25px rgba(80, 227, 194, 0.5);
    animation: pulse-green 1.5s infinite;
}

@keyframes pulse-green {
    0% { box-shadow: 0 5px 25px rgba(80, 227, 194, 0.4); }
    50% { box-shadow: 0 5px 35px rgba(80, 227, 194, 0.7); }
    100% { box-shadow: 0 5px 25px rgba(80, 227, 194, 0.4); }
}

/* Card de Karaokê */
.karaoke-card {
    background: #BD10E0;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(189, 16, 224, 0.4);
    flex-shrink: 0;
    cursor: pointer;
    min-height:86px;
}



.karaoke-card p {
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.karaoke-card i {
    margin: 0 5px;
    opacity: 0.8;
}

/* Área de Conteúdo Dinâmico */
.dynamic-content-area {
    padding: 25px 0;
}

.dynamic-content-area h3 {
    font-size: 1.2rem;
    color: #F8A543;
}

.dynamic-content-area .subtitle {
    color: #a0a0b0;
    margin-bottom: 20px;
}

/* Cards de Votação */
.vote-options {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 10px 0;
}

.vote-card {
    flex: 0 0 100px;
    padding: 12px;
    border-radius: 15px;
    background-image: linear-gradient(145deg, var(--grad-start), var(--grad-end));
    color: white;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 6px 12px rgba(0,0,0,0.2), inset 0 1px 2px rgba(255,255,255,0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.vote-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.2);
}

.vote-card.disabled {
    filter: grayscale(80%);
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.vote-card.active-vote {
    transform: translateY(-5px) scale(1.05);
    filter: none;
    opacity: 1;
}

.vote-card i {
    font-size: 1.3rem;
    margin-bottom: 6px;
}

.vote-card .band-name {
    font-size: 0.8rem;
    line-height: 1.2;
}

.vote-card .song-name {
    font-size: 0.7rem;
    opacity: 0.8;
}

/* Pop-up de Notificação */
.notification-popup {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    color: white;
    font-weight: bold;
    z-index: 1000;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    opacity: 0;
    text-align: center;
}

.notification-popup.show {
    bottom: 100px;
    opacity: 1;
}

.notification-popup.vote-success {
    background: linear-gradient(135deg, #28a745, #218838);
    border: 1px solid #34ce57;
}

.notification-popup.karaoke-sing {
    background: linear-gradient(135deg, #BD10E0, #9D0DBF);
    border: 1px solid #d434ff;
}

/* Rodapé */
.app-footer {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 10;
}

.footer-nav {
    display: flex;
    justify-content: space-around;
}

.nav-button {
    position: relative; /* Essencial para o posicionamento do fundo */
    overflow: hidden;   /* Garante que o fundo não vaze */
    background: none;
    border: none;
    color: #a0a0b0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: color 0.4s ease, transform 0.3s ease;
    padding: 8px 12px; /* Aumenta um pouco a área de clique */
    border-radius: 12px; /* Bordas arredondadas para o botão */
}

.nav-button i {
    font-size: 1.5rem;
}

.nav-button span {
    font-size: 0.7rem;
    font-family: 'Montserrat', sans-serif;
}

.nav-button.active {
    color: #FFD700; /* Um tom de dourado mais clássico */
}

/* NOVO: Efeito de brilho dourado (Glow) para o botão ativo */
.nav-button.active span {
    /* Aplica o brilho no texto (Voto Musical, etc.) */
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.7),
                 0 0 10px rgba(255, 215, 0, 0.5);
}

.nav-button.active i {
    /* Aplica o brilho no ícone (nota musical, etc.) */
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.7));
    animation: subtlePulse 2.5s infinite ease-in-out; /* Usa a nova animação mais sutil */
}


/* Animação para o ícone do botão ativo */
.nav-button.active i {
    animation: pulseIcon 1.5s infinite ease-in-out;
}





/* Scrollbar customizada */
.app-main::-webkit-scrollbar, .vote-options::-webkit-scrollbar {
    height: 5px;
    width: 5px;
}

.app-main::-webkit-scrollbar-thumb, .vote-options::-webkit-scrollbar-thumb {
    background: #F8A543;
    border-radius: 10px;
}

.app-main::-webkit-scrollbar-track, .vote-options::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}


/* ================================================================= */
/* TRANSIÇÃO SUAVE PARA CARD ÚNICO (SOLUÇÃO DEFINITIVA)            */
/* ================================================================= */

/* O card dinâmico tem a transição de opacidade. */
#dynamic-card {
    transition: opacity 1s ease-in-out, background-color 1s ease-in-out;
}
.karaoke-card {
    position: relative; /* <-- ADICIONE ESTA LINHA */
    /* --- IMAGEM DE FUNDO PARA O KARAOKÊ --- */
    /* Escolhi uma imagem de microfone que combina com o tema. */
    /* Você pode trocar o link por qualquer outra imagem que preferir. */
    background-image: 
        linear-gradient(rgba(29, 29, 46, 0.7), rgba(16, 16, 29, 0.8)), /* Sobreposição escura com um tom azulado */
        url('https://images.pexels.com/photos/164829/pexels-photo-164829.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=1' );
    background-size: cover;
    background-position: center;
    
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    margin-top: 15px;
    font-weight: bold;
    box-shadow: 0 4px 20px rgba(189, 16, 224, 0.4);
    flex-shrink: 0;
    cursor: pointer;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* --- ESTILO DO TEXTO DO KARAOKÊ --- */
    color: #FFFFFF; /* Garante que o texto seja branco */
    text-shadow: 0px 2px 6px rgba(0, 0, 0, 0.8); /* Sombra forte para máximo contraste */
}

/* Adicione esta nova regra */
#dynamic-card.ad-style {
    background-color: #0B0A10;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); /* Uma sombra mais sutil para o fundo branco */
}




/* ================================================= */
/* ESTILOS DINÂMICOS PARA O ÍCONE DO RELÓGIO         */
/* ================================================= */

/* Estilo Padrão e de Dia */
.clock-icon.day-style {
    background: linear-gradient(135deg, #F55E61, #F8A543);
    box-shadow: 0 4px 15px rgba(247, 122, 82, 0.4);
}

/* Estilo de Noite */
.clock-icon.night-style {
    background: linear-gradient(135deg, #4A00E0, #8E2DE2); /* Roxo/Azul escuro */
    box-shadow: 0 4px 15px rgba(142, 45, 226, 0.4);
}




/* ================================================================= */
/* ESTILOS PARA O BOTÃO DE CONTROLE DO KARAOKÊ (ANTI-THROTTLING)   */
/* ================================================================= */

.karaoke-toggle {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    color: #FFFFFF;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    z-index: 10; /* Garante que fique acima do conteúdo de texto */
    display: flex;
    align-items: center;
}

.karaoke-toggle i {
    margin-right: 5px;
    font-size: 0.8rem; /* Ícone um pouco maior que o texto */
}

/* Estilo quando o Karaokê está INATIVO */
.karaoke-toggle {
    background-color: rgba(80, 80, 80, 0.5);
}

.karaoke-toggle:hover {
    background-color: rgba(100, 100, 100, 0.7);
    transform: scale(1.05);
}

/* Estilo quando o Karaokê está ATIVO */
.karaoke-toggle.active {
    background-color: rgba(80, 227, 194, 0.5); /* Verde do botão de pause */
    border-color: rgba(80, 227, 194, 0.8);
}

.karaoke-toggle.active:hover {
    background-color: rgba(80, 227, 194, 0.7);
}






/* NOVA: Animação de pulso mais sutil para o ícone ativo */
@keyframes subtlePulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1); /* Animação menor (1.1 em vez de 1.2) */
    }
    100% {
        transform: scale(1);
    }
}
