/* =========================================
   1. Variáveis de Cores (Tema Dark Moderno)
   ========================================= */
:root {
    --bg-main: #0f172a;        /* Fundo principal (Azul Profundo) */
    --bg-card: #1e293b;        /* Fundo dos cards e blocos */
    --bg-header: rgba(15, 23, 42, 0.95); /* Fundo do menu (quase sólido) */
    
    --text-main: #f8fafc;      /* Texto Branco */
    --text-muted: #94a3b8;     /* Texto Cinza (detalhes) */
    
    --brand: #e11d48;          /* Vermelho da Marca */
    --border: #334155;         /* Cor das bordas */
}

/* =========================================
   2. Reset Geral
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    font-family: 'Inter', sans-serif; /* Se não carregar, usa padrão do sistema */
    line-height: 1.6;
    padding-bottom: 60px; /* Espaço no final para não cortar nada */
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
a:hover { color: var(--brand); }

/* =========================================
   3. Cabeçalho (Menu Fixo no Topo)
   ========================================= */
header {
    background-color: var(--bg-header);
    border-bottom: 1px solid var(--border);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky; /* Cola no topo */
    top: 0;
    z-index: 1000; /* Garante que fique acima de tudo */
    height: 70px;
    backdrop-filter: blur(5px);
}

.logo {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}
.logo span { color: var(--brand); }

/* =========================================
   4. Página Inicial (Busca e Cards)
   ========================================= */
.search-hero {
    text-align: center;
    padding: 60px 20px 40px 20px;
    max-width: 800px;
    margin: 0 auto;
}

.search-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    width: 100%;
    padding: 18px 25px;
    padding-right: 60px;
    border-radius: 50px;
    border: 2px solid var(--border);
    background-color: var(--bg-card);
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: 0.3s;
}

.search-box input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.2);
}

.search-box button {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    font-size: 1rem;
}

/* Grid de Resultados */
.container-resultados {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    padding: 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--brand);
    background-color: #243046;
}

.card-icon {
    width: 45px;
    height: 45px;
    background-color: rgba(225, 29, 72, 0.1);
    color: var(--brand);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.card-info h3 {
    font-size: 1.05rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.nome-artista {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* =========================================
   5. Página da Letra (Correção do Layout)
   ========================================= */
main {
    padding-top: 20px; /* Garante respiro entre menu e conteúdo */
}

.letra-container {
    max-width: 900px;
    margin: 0 auto 40px auto;
    padding: 30px;
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.letra-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 25px;
    margin-bottom: 25px;
}

/* Título da Música (Correção para aparecer bem) */
.letra-header h1 {
    font-size: 2.5rem;
    color: var(--text-main); /* Branco */
    margin-bottom: 10px;
    line-height: 1.2;
    display: block; /* Garante que ocupe a linha */
}

/* Link/Nome do Artista */
.artista-link {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--brand);
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge {
    background: var(--border);
    color: white;
    padding: 5px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Botões A+ A- */
.letra-tools button {
    background: #0f172a;
    border: 1px solid var(--border);
    color: white;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.2s;
    font-weight: bold;
}
.letra-tools button:hover {
    background: var(--brand);
    border-color: var(--brand);
}

/* O Texto da Letra */
.letra-texto {
    font-size: 1.2rem; /* Tamanho bom para leitura */
    line-height: 1.8;
    color: #e2e8f0; /* Um branco levemente acinzentado (confortável) */
    white-space: pre-wrap; /* Respeita os parágrafos */
    
    /* Colunas inteligentes para PC */
    column-count: 2; 
    column-gap: 60px;
    column-rule: 1px solid var(--border); /* Linha separando colunas */
}

/* Vídeo do Youtube */
.video-responsive {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 20px;
    background: black;
}
.video-responsive iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
}

/* =========================================
   6. Responsividade (Celular)
   ========================================= */
@media (max-width: 768px) {
    .letra-texto {
        column-count: 1; /* Apenas 1 coluna no celular */
        column-rule: none;
    }
    
    .letra-container {
        padding: 20px; /* Menos borda no celular */
        border: none;
        background: transparent; /* Fundo transparente para parecer app */
        box-shadow: none;
    }
    
    .letra-header h1 { font-size: 2rem; }
    
    .search-hero h1 { font-size: 1.8rem; }
}

/* =========================================
   7. Estilos da Página do Artista (NOVO)
   ========================================= */

/* Hero (Topo do Artista) */
.artista-hero {
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    padding: 60px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    margin-bottom: 40px;
}

.artista-avatar {
    width: 100px;
    height: 100px;
    background: var(--brand);
    color: white;
    font-size: 3rem;
    font-weight: bold;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 0 20px rgba(225, 29, 72, 0.4);
    text-transform: uppercase;
}

.artista-dados h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: white;
}

.meta-dados {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
    color: var(--text-muted);
}

/* Lista de Músicas (Estilo Spotify) */
.lista-musicas {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.item-musica {
    display: flex;
    align-items: center;
    background: var(--bg-card);
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: 0.2s;
}

.item-musica:hover {
    background: #243046;
    border-color: var(--brand);
    transform: translateX(5px);
}

.rank {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--text-muted);
    width: 40px;
}

.item-musica .info {
    flex-grow: 1;
}

.item-musica h3 {
    font-size: 1.1rem;
    color: var(--text-main);
    margin-bottom: 2px;
}

.item-musica small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.item-musica .arrow {
    color: var(--brand);
    font-size: 1.5rem;
    opacity: 0;
    transition: 0.2s;
}

.item-musica:hover .arrow {
    opacity: 1;
}

/* Ajuste Responsivo */
@media (max-width: 768px) {
    .artista-dados h1 { font-size: 2rem; }
    .item-musica h3 { font-size: 1rem; }
}

/* Mini busca do topo */
.mini-busca {
    display: flex;
    background: var(--bg-card);
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid var(--border);
}
.mini-busca input {
    background: transparent;
    border: none;
    color: white;
    outline: none;
    width: 150px;
}
.mini-busca button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}

/* =========================================
   8. Menu de Categorias (Topo)
   ========================================= */
.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-transform: uppercase;
    transition: 0.3s;
}

.nav-links a:hover {
    color: var(--brand); /* Fica vermelho ao passar o mouse */
    transform: translateY(-2px); /* Efeito de 'pulo' */
}

/* Responsividade do Menu (Esconde em celular muito pequeno) */
@media (max-width: 768px) {
    .nav-links {
        display: none; /* Em breve podemos fazer um menu hambúrguer */
    }
}

/* =========================================
   9. Rodapé (Footer) Profissional
   ========================================= */
footer {
    background-color: #0b1120; /* Mais escuro que o fundo */
    border-top: 1px solid var(--border);
    padding: 60px 20px;
    margin-top: 80px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-col ul li a:hover {
    color: var(--brand);
    padding-left: 5px; /* Efeito de mover para direita */
}

.footer-bottom {
    text-align: center;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 0.9rem;
}

/* =========================================
   10. Menu Mobile (Hambúrguer)
   ========================================= */

/* Botão que só aparece no celular */
.btn-mobile {
    display: none; /* Escondido no PC */
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 15px; /* Espaço da logo */
}

/* A caixa do menu (inicialmente escondida) */
.mobile-menu {
    position: fixed;
    top: 70px; /* Altura do header */
    left: 0;
    width: 100%;
    background-color: var(--bg-card); /* Mesma cor dos cards */
    border-bottom: 1px solid var(--border);
    padding: 20px;
    display: none; /* Escondido por padrão */
    flex-direction: column;
    gap: 15px;
    z-index: 999;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
}

/* Classe que o JS vai adicionar para mostrar o menu */
.mobile-menu.active {
    display: flex;
    animation: descerMenu 0.3s ease;
}

/* Links dentro do menu mobile */
.mobile-menu a {
    color: white;
    font-size: 1.1rem;
    padding: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
}
.mobile-menu a:hover {
    color: var(--brand);
    background: rgba(255,255,255,0.02);
}

/* Animação suave */
@keyframes descerMenu {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* REGRAS DE EXIBIÇÃO */
@media (max-width: 768px) {
    .btn-mobile { display: block; } /* Mostra o botão no celular */
    .nav-links { display: none; }   /* Garante que o menu de PC suma */
}

/* =========================================
   CORREÇÃO DO MENU MOBILE (HEADER)
   ========================================= */

/* 1. Header Flexível (Organiza os itens) */
header {
    display: flex;
    justify-content: space-between; /* Espalha: Botão <-> Logo <-> Busca */
    align-items: center;
    padding: 15px 20px;
    background-color: #0f172a; /* Cor de fundo para não ficar transparente */
    position: relative;
    z-index: 1000;
}

/* 2. Esconde o Menu de PC no Celular (IMPORTANTE!) */
@media (max-width: 768px) {
    .nav-links {
        display: none !important; /* O !important força sumir */
    }
    
    /* Garante que o botão apareça */
    .btn-mobile {
        display: block;
        font-size: 1.5rem;
        color: white;
        background: none;
        border: none;
        cursor: pointer;
    }
}

/* 3. Menu Mobile (A gaveta que abre) */
.mobile-menu {
    position: fixed; /* Fica preso na tela */
    top: 70px; /* Logo abaixo do header */
    left: 0;
    width: 100%;
    background-color: #1e293b;
    border-bottom: 2px solid var(--brand);
    
    /* Começa escondido */
    display: none; 
    flex-direction: column;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    z-index: 999;
}

/* Classe que o Javascript ativa */
.mobile-menu.active {
    display: flex !important; /* Mostra quando clica */
}

/* Links do menu mobile */
.mobile-menu a {
    color: white;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    font-size: 1.1rem;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
}