        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Georgia', serif;
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
            min-height: 100vh;
            padding: 10px;
        }

        .container {
            max-width: 900px;
            margin: 0 auto;
            background: #fff;
            border-radius: 15px;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            overflow: hidden;
        }

        header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 30px 20px;
            text-align: center;
        }

        header h1 {
            font-size: 2em;
            margin-bottom: 10px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
        }

        header p {
            font-size: 1em;
            opacity: 0.95;
            margin-bottom: 15px;
        }

        header img {
            max-width: 200px;
            width: 100%;
            height: auto;
            margin: 10px 0;
        }

		.date-picker-container {
            margin-top: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .date-picker-container label {
            font-size: 0.9em;
            font-weight: 500;
        }

        .date-picker-container input[type="date"] {
            padding: 10px 12px;
            border: 2px solid rgba(255,255,255,0.3);
            border-radius: 6px;
            background: rgba(255,255,255,0.2);
            color: white;
            font-size: 1em;
            cursor: pointer;
            transition: all 0.3s;
            min-width: 150px;
        }

        .date-picker-container input[type="date"]:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.5);
        }

        .date-picker-container input[type="date"]:focus {
            outline: none;
            background: rgba(255,255,255,0.4);
            border-color: white;
        }

        /* Estilo para o calendário do date picker */
        .date-picker-container input[type="date"]::-webkit-calendar-picker-indicator {
            filter: invert(1);
            cursor: pointer;
        }

        .navigation {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background: #f8f9fa;
            border-bottom: 2px solid #e0e0e0;
            gap: 10px;
            flex-wrap: wrap;
        }

        .navigation button {
            background: #667eea;
            color: white;
            border: none;
            padding: 12px 20px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.95em;
            transition: all 0.3s;
            font-weight: bold;
            flex: 1;
            min-width: 120px;
        }

        .navigation button:hover {
            background: #764ba2;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
        }

        .navigation button:disabled {
            background: #ccc;
            cursor: not-allowed;
            transform: none;
        }

        .date-display {
            font-size: 1.1em;
            color: #333;
            font-weight: bold;
            text-align: center;
            flex-basis: 100%;
            order: -1;
            margin-bottom: 10px;
        }

        .entry {
            padding: 20px;
        }

        .entry-date {
            color: #667eea;
            font-size: 1.5em;
            margin-bottom: 10px;
            font-weight: bold;
        }

        .entry-topic {
            color: #764ba2;
            font-size: 1.1em;
            margin-bottom: 20px;
            font-style: italic;
            border-left: 4px solid #667eea;
            padding-left: 15px;
            line-height: 1.4;
        }

        .dialogue {
            line-height: 1.8;
            color: #333;
        }

        .speaker {
            font-weight: bold;
            color: #667eea;
            margin-top: 15px;
            display: block;
        }

        .socrates { color: #e74c3c; }
        .platao { color: #3498db; }
        .aristoteles { color: #27ae60; }
        .rapariga { color: #9b59b6; }
        .vozoff { color: #333; font-style: italic; }

        .speech {
            margin-left: 20px;
            margin-bottom: 15px;
            padding: 12px 15px;
            background: #f8f9fa;
            border-radius: 8px;
            border-left: 3px solid;
        }

        .socrates-speech { border-color: #e74c3c; }
        .platao-speech { border-color: #3498db; }
        .aristoteles-speech { border-color: #27ae60; }
        .rapariga-speech { border-color: #9b59b6; }
        .vozoff-speech { border-color: #333; }

        .loading {
            text-align: center;
            padding: 40px;
            color: #999;
        }

        .error {
            text-align: center;
            padding: 40px;
            color: #e74c3c;
        }

        footer {
            text-align: center;
            padding: 20px;
            background: #f8f9fa;
            color: #666;
            font-size: 0.9em;
        }

		.round-image {
			width: 50px; /* Adjust size as needed */
			height: 50px; /* Ensure width and height are equal */
			border-radius: 50%; /* Makes the image circular */
			object-fit: cover; /* Ensures proper scaling */
			margin-right: 20px;
		}

/* --- GLOSSÁRIO --- */

.highlight-term {
    background-color: #fff9c4; /* Um amarelo suave */
    transition: background-color 0.5s ease;
}

.glossario-link {
    color: #667eea;
    text-decoration: underline dotted;
    cursor: help;
}

.glossario-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* --- SIDEBAR DOCK MODERNO --- */

.sidebar {
    height: 100%;
    width: 240px;
    position: fixed;
    top: 0;
    left: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding-top: 40px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.25);
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 999;
    overflow: hidden;
}

/* Estado colapsado (dock) */
.sidebar.collapsed {
    width: 70px;
}

/* Expandir ao passar o rato */
.sidebar.collapsed:hover {
    width: 240px;
}

/* Links */
.sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    text-decoration: none;
    color: white;
    font-family: 'Georgia', serif;
    font-size: 1.05em;
    font-weight: bold;
    transition: background 0.25s ease, padding-left 0.25s ease;
    white-space: nowrap;
}

.sidebar a:hover {
    background: rgba(255,255,255,0.15);
    padding-left: 28px;
}

/* Ícones */
.sidebar .icon {
    font-size: 1.4em;
}

/* Labels escondidos no modo colapsado */
.sidebar.collapsed .label {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

/* Labels visíveis quando expandido */
.sidebar:not(.collapsed) .label,
.sidebar.collapsed:hover .label {
    opacity: 1;
    width: auto;
}

/* Botão mobile */
.menu-btn {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 32px;
    cursor: pointer;
    z-index: 1001;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* Mobile: sidebar escondido */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .menu-btn {
        display: block;
    }
}

/* Container do Glossário */

#glossarioPage {
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    /* padding: 30px 25px; */
    padding-top: 0 !important;
    animation: fadeIn 0.4s ease;
    overflow: visible;
}

/* #glossarioPage {
    padding-top: 0 !important;
    overflow: visible;
} */

.glossario-header-sticky {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    padding: 30px 25px 15px 25px;
    border-bottom: 2px solid #f0f0f0;
    border-radius: 15px 15px 0 0;
}

/* Estilo para o abecedário fixo */
.glossario-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

.glossario-nav a {
    text-decoration: none;
    font-weight: bold;
    color: #667eea;
    padding: 5px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.glossario-nav a:hover {
    background: #f0f4ff;
}

/* Espaçamento para a lista de termos */
#glossarioList {
    padding: 20px 25px 40px 25px;
}

/* Título principal */
#glossarioPage h2 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 25px;
    color: #667eea;
    text-shadow: 1px 1px 3px rgba(102,126,234,0.3);
    letter-spacing: 1px;
}

/* Cada entrada do glossário */
.glossario-letter,
.glossario-item {
    background: #f8f9fa;
    border-left: 5px solid #667eea;
    padding: 20px 25px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    scroll-margin-top: 255px;
}

/* Opcional: Garante que o título da letra tenha um destaque visual */
.glossario-letter {
    background-color: #f8f9fa;
    padding: 5px 15px;
    border-radius: 5px;
    color: #4a148c;
    margin-top: 20px;
}

.glossario-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102,126,234,0.25);
}

/* Título do termo */
.glossario-item h3 {
    font-size: 1.4em;
    color: #764ba2;
    margin-bottom: 10px;
    text-transform: capitalize;
}

/* Definição */
.glossario-item p {
    font-size: 1.05em;
    color: #333;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* Link voltar */
.glossario-item a {
    color: #667eea;
    font-weight: bold;
    text-decoration: none;
    transition: color 0.2s ease;
}

.glossario-item a:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Separador */
.glossario-item hr {
    border: none;
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

/* Animação suave */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Mobile */
@media (max-width: 600px) {
    #glossarioPage {
        padding: 20px 15px;
    }
    .glossario-letter,
    .glossario-item {
        padding: 15px 18px;
        scroll-margin-top: 320px;
    }
    .glossario-item h3 {
        font-size: 1.25em;
    }
}

/* --- ÍNDICE ALFABÉTICO DO GLOSSÁRIO --- */

.glossario-index {
    position: sticky;
    top: 20px;
    margin-bottom: 25px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    padding: 15px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.25);
}

.glossario-index button {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-family: 'Georgia', serif;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9em;
}

.glossario-index button:hover {
    background: rgba(255,255,255,0.35);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

/* Mobile */
@media (max-width: 600px) {
    .glossario-index {
        position: static;
        flex-wrap: wrap;
        gap: 4px;
        padding: 10px;
    }
    .glossario-index button {
        padding: 5px 8px;
        font-size: 0.8em;
    }
}

.glossario-letter {
    font-size: 1.8em;
    margin: 5px 0 15px;
    color: #667eea;
    text-shadow: 1px 1px 3px rgba(102,126,234,0.3);
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

/* Empurrar o conteúdo quando o sidebar está visível (apenas desktop) */
@media (min-width: 769px) {
    .sidebar {
        width: 200px;
    }
    body {
        padding-left: 200px;
    }
}

/* INDEX */

#indicePage {
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 30px 25px;
}

#indicePage h2 {
    font-size: 2em;
    text-align: center;
    margin-bottom: 25px;
    color: #667eea;
    text-shadow: 1px 1px 3px rgba(102,126,234,0.3);
}

.indice-mes {
    margin-top: 25px;
    font-size: 1.4em;
    color: #764ba2;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 5px;
}

.indice-dia {
    padding: 10px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    border-left: 4px solid #667eea;
}

.indice-dia:hover {
    background: #eef0ff;
    transform: translateX(5px);
}

.indice-dia strong {
    color: #333;
}

.indice-dia span {
    font-style: italic;
}

.indice-search {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 20px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.indice-search:focus {
    border-color: #667eea;
    box-shadow: 0 0 8px rgba(102,126,234,0.3);
    outline: none;
}


/* Gemini */
.indice-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.indice-item:hover {
    background-color: #f0f4ff;
}

.indice-item-date {
    font-size: 0.85em;
    color: #667eea;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.indice-item-title {
    font-size: 1.1em;
    color: #333;
    font-family: 'Georgia', serif;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

/* Contentor da pesquisa */
/* 1. O Contentor agora controla o espaçamento externo */
.search-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 20px; /* Movemos a margem do input para aqui */
    display: flex;
    align-items: center; /* Ajuda a definir a altura base */
}

/* 2. Ajuste no Input */
.indice-search {
    width: 100%;
    padding: 12px 40px 12px 15px; /* Mais espaço à direita para o X */
    margin-bottom: 0 !important;   /* Removemos para não "empurrar" o wrapper */
    font-family: inherit;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
}

/* 3. O "X" com alinhamento cirúrgico */
.clear-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%); /* O truque mágico para centrar verticalmente */
    
    font-size: 22px;
    line-height: 1;      /* Crucial: impede que o caractere herde alturas de linha estranhas */
    height: 22px;        /* Define uma altura igual ao tamanho da fonte */
    display: none;       /* Continua escondido até haver texto */
    
    color: #999;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s;
}

.clear-icon:hover {
    color: #667eea;
}

.indice-month-section {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.month-header {
    background: #f8f9fa;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
    color: #4a148c;
    transition: background 0.3s;
}

.month-header:hover {
    background: #f0f0ff;
}

/* .toggle-icon {
    transition: transform 0.3s ease;
    font-size: 0.8em;
    color: #764ba2;
} */

.toggle-icon {
    display: inline-block; /* Necessário para o transform de rotação funcionar */
    transition: transform 0.2s ease-in-out;
}

.month-content {
    background: white;
    border-top: 1px solid #eee;
}

/* Ajuste nos itens dentro do mês */
.month-content .indice-item {
    padding: 12px 25px;
    border-bottom: 1px solid #f0f0f0;
}

.month-content .indice-item:last-child {
    border-bottom: none;
}

/* Container do Índice */
#indicePage {
    padding-top: 0 !important;
    overflow: visible;
}

.indice-header-sticky {
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 100;
    padding: 30px 25px 15px 25px;
    border-bottom: 2px solid #f0f0f0;
    border-radius: 15px 15px 0 0;
}

/* Espaçamento para a lista não ficar colada à linha divisória */
#indiceList {
    padding: 15px 25px 30px 25px;
}

/* Garante que o input de pesquisa no cabeçalho fixo não tenha margens estranhas */
.indice-header-sticky .search-wrapper {
    margin-bottom: 0;
    margin-top: 15px;
}

/* Gemini */


/* Citações */

#citacoesPage {
    max-width: 900px;
    margin: 20px auto;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    padding: 30px 25px;
}

#citacoesPage h2 {
    text-align: center;
    color: #667eea;
    margin-bottom: 25px;
}

.citacao-autor {
    padding: 12px 15px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 8px;
    cursor: pointer;
    border-left: 4px solid #764ba2;
    transition: all 0.25s ease;
}

.citacao-autor:hover {
    background: #eef0ff;
    transform: translateX(5px);
}

.citacao-item {
    padding: 10px 15px;
    margin: 10px 0;
    background: #fafafa;
    border-left: 4px solid #667eea;
    border-radius: 6px;
    font-style: italic;
}

.back-btn {
    background: #667eea;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95em;
    margin-bottom: 20px;
    transition: background 0.25s ease;
}

.back-btn:hover {
    background: #556cd6;
}

/* .citacao-count {
    background: #667eea;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75em;
} */

/* .citacao-count {
    color: #666;
} */

.citacao-count {
    font-size: 0.8em;
    color: #764ba2;
    font-weight: bold;
    margin-left: 10px;
}

.citacao-item {
    background: #fdfbfb;
    border-left: 3px solid #667eea;
    margin: 15px 0;
    padding: 15px;
    font-style: italic;
    border-radius: 0 8px 8px 0;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.05);
}

.citacao-item p {
    margin: 0;
    color: #444;
}

/* CSS para os Cabeçalhos de Letras */
.citacoes-page h3.glossario-letter {
    margin-top: 25px;
    padding-bottom: 5px;
    border-bottom: 2px solid #eee;
    color: #764ba2;
    font-size: 1.2em;
}


/* Container principal das citações - garantir que o padding não atrapalha o sticky */
#citacoesPage {
    padding-top: 0 !important; /* Removemos o padding superior para o sticky encostar no topo */
    overflow: visible; 
}

.citacoes-header-sticky {
    position: sticky;
    top: 0;
    background: #fff;      /* Cor de fundo sólida para não ver o texto por baixo */
    z-index: 100;          /* Garante que fica por cima das citações ao rolar */
    padding: 30px 25px 15px 25px; /* Devolvemos o padding aqui */
    border-bottom: 2px solid #f0f0f0;
    border-radius: 15px 15px 0 0; /* Mantém os cantos arredondados do topo */
}

/* Garante que o conteúdo rolável tem um espaçamento para não ficar colado ao cabeçalho */
#citacoesAutores {
    padding: 10px 25px;
}

#citacoesLista {
    padding: 0 25px 30px 25px;
}
