/* --- VARIÁVEIS DE CORES --- */
:root {
    --bg-color: #121212;
    --text-color: #e0e0e0;
    --card-border: #ffffff;
    --card-hover-bg: #ffffff;
    --card-hover-text: #000000;
    --reader-bg: #1e1e1e;
    --btn-border: #555;
}

body.light-mode {
    --bg-color: #f4f4f4;
    --text-color: #333333;
    --card-border: #333333;
    --card-hover-bg: #333333;
    --card-hover-text: #ffffff;
    --reader-bg: #ffffff;
    --btn-border: #ccc;
}

/* --- GERAL --- */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Courier New', Courier, monospace;
    margin: 0;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden; /* Evita rolagem lateral no celular */
}

/* --- CABEÇALHO --- */
header {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 50px;
    margin-bottom: 40px;
    padding: 0 10px;
}

.header-content {
    display: flex;
    gap: 20px;
    align-items: center;
    margin-bottom: 20px;
    text-align: center;
}

#site-title { 
    cursor: pointer; 
    margin: 0; 
    font-size: 2rem;
}

/* --- CONTAINER PRINCIPAL --- */
.container {
    width: 100%;
    max-width: 800px; /* Limita largura para leitura confortável */
    padding: 0 20px;
    margin: 0 auto;
    flex: 1;
    box-sizing: border-box; /* Garante que padding não estoure largura */
}

/* --- LISTA DE POSTS --- */
.post-list { display: flex; flex-direction: column; gap: 15px; }

.post-card {
    border: 2px solid var(--card-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1.1rem;
    text-align: center;
    padding: 20px;
}

.post-card:hover {
    background-color: var(--card-hover-bg);
    color: var(--card-hover-text);
    transform: scale(1.02);
}

.hidden { display: none; }

/* --- LEITOR DE POST --- */
.post-reader {
    background: var(--reader-bg);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid var(--card-border);
    text-align: left;
}

#btn-voltar {
    background: none;
    border: 1px solid var(--btn-border);
    color: var(--text-color);
    padding: 8px 15px;
    cursor: pointer;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* Ajustes de Markdown (Imagens e Código) */
#conteudo-markdown img { 
    max-width: 100%; 
    height: auto; 
    border-radius: 5px;
}

#conteudo-markdown pre { 
    background: #000; 
    color: #0f0; 
    padding: 15px; 
    overflow-x: auto; 
    border-radius: 5px;
    white-space: pre-wrap; /* Quebra linha em mobile */
    word-wrap: break-word;
}

/* --- WIDGET LAST.FM --- */
.status-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 30px;
}

.status-box {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px dashed var(--text-color);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    max-width: 80%; /* Não deixa estourar a tela */
    text-decoration: none;
    cursor: pointer;
}

.status-box:hover {
    border-style: solid;
    transform: scale(1.02);
}

.status-label { opacity: 0.7; white-space: nowrap; }

.status-value {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 250px; /* Trunca nomes gigantes */
}

.status-icon-area {
    display: flex;
    align-items: center;
    margin-left: 5px;
    padding-left: 10px;
    border-left: 1px solid #555;
}

.icon-lastfm {
    width: 24px;
    height: 24px;
    opacity: 0.8;
    color: currentColor;
}

/* --- BOTÃO TEMA (Modificado para ficar sem círculo) --- */
#btn-theme {
    background: none;      
    border: none;          
    box-shadow: none;      
    border-radius: 50%;    
    width: 50px;
    height: 50px;
    position: fixed;
    bottom: 20px;  
    right: 20px;   
    color: var(--text-color);
    font-size: 2rem;       
    cursor: pointer;
    z-index: 1000;
    transition: transform 0.2s, color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;            
}

#btn-theme:hover { 
    transform: scale(1.2); /* Aumenta mais ao passar o mouse */
}


/* =========================================
   MEDIA QUERIES (RESPONSIVIDADE CELULAR)
   ========================================= */
@media (max-width: 600px) {
    
    header {
        margin-top: 30px;
        margin-bottom: 20px;
    }

    #site-title {
        font-size: 1.5rem;
    }

    .status-box {
        padding: 8px 15px;
        font-size: 0.8rem;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .status-value {
        max-width: 150px;
    }

    .post-reader {
        padding: 15px; 
    }

    #conteudo-markdown {
        font-size: 1rem; 
        line-height: 1.6;
    }

    #btn-theme {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
        bottom: 15px;
        right: 15px;
    }
}