/*
 * Folha de estilos global para o portal DanEnglish.
 * Este arquivo define estilos básicos e responsivos para cabeçalho,
 * navegação, formulários, tabelas e outros componentes comuns.
 */

/* Reset simples */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {

    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    background-color: #f2f2f2;
    /* fundo cinza claro para contraste */
    color: #333;
}

a {
    color: #0073aa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* Contêiner padrão para páginas de atividades (músicas, ebooks, filmes) */
/*
 * Contêiner utilizado nas páginas de atividades (músicas, livros, filmes).
 * Ele define um bloco branco centralizado sobre um fundo cinza, com bordas
 * arredondadas e uma sombra suave.  Todas as páginas “plus” e outras
 * seções podem envolver seu conteúdo dentro dessa classe para obter
 * consistência visual.
 */
.activity-container {
    background-color: #ffffff;

    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    margin: 20px auto;
    width: 100%;
    max-width: 1000px;
}

/* Grid flexível para listas de itens (músicas, livros) */
/*
 * Grid flexível para listas de itens de atividades.  Utiliza flexbox com
 * quebra automática e espaçamento uniforme entre os cartões. O conteúdo
 * é centralizado horizontalmente para manter o alinhamento agradável.
 */
.activity-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* Cartão individual para cada item */
/*
 * Cartão individual para cada item de atividade (música, livro, filme).
 * Possui bordas arredondadas, sombra suave e alinhamento vertical. A
 * largura fixa proporciona uniformidade ao grid e a utilização de
 * flexbox permite que o botão seja alinhado ao final do cartão.
 */
.activity-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 16px;
    width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
}

.activity-card img {
    width: 100%;
    /* Mantém a imagem ocupando toda a largura do card */
    height: 330px;
    /* <<< ALTURA FIXA: Este é o passo mais importante. Todas as imagens terão essa altura. */

    object-fit: cover;
    /* <<< A MÁGICA ACONTECE AQUI */
    /* Preenche o espaço de 330px de altura sem distorcer a imagem. */
    /* O excesso da imagem é cortado. */

    border-radius: 6px;
    margin-bottom: 12px;
}

.activity-card h3 {
    font-size: 16px;
    margin-bottom: 6px;
    color: #2c3e50;
}

.activity-card p {
    font-size: 14px;
    margin-bottom: 10px;
    color: #555;
}

/* Ajustes para players de áudio/vídeo */
audio,
video {
    width: 100%;
    max-width: 100%;
    border-radius: 6px;
    margin: 10px 0;
}

/* Cabeçalho principal */
.main-header {
    background-color: #2c3e50;
    color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10 !important;
}

.main-header .logo {
    font-size: 24px;
    font-weight: bold;
    margin: 0;
}

.navbar ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 10px 0 0;
}

.navbar li {
    margin-right: 10px;
}

.navbar a {
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.navbar a:hover,
.navbar a.logout:hover {
    background-color: #1a242f;
}

.navbar .logout {
    background-color: #c0392b;
}

/* Dropdown menu for Plus section */
.navbar li.dropdown {
    position: relative;
    z-index: 10 !important;
}

.navbar li.dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2c3e50;
    list-style: none;
    padding: 0;
    margin: 0;
    min-width: 160px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10 !important;
}

.navbar li.dropdown:hover .dropdown-menu {
    display: block;
}

.navbar li.dropdown .dropdown-menu li a {
    display: block;
    padding: 8px 12px;
    color: #fff;
    white-space: nowrap;
}

.navbar li.dropdown .dropdown-menu li a:hover {
    background-color: #1a242f;
}

/* Logo dentro do cabeçalho */
.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    margin-right: 10px;
    height: 40px;
    width: auto;
}

/* Conteúdo principal */
.main-content {
    padding: 20px 0;
    min-height: calc(100vh - 160px);
}

/* Rodapé */
.main-footer {
    background-color: #2c3e50;
    color: #fff;
    text-align: center;
    padding: 15px 0;
}

/* Formulários */
.form-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    margin: 0 auto;
}

.form-container h2 {
    margin-bottom: 15px;
    text-align: center;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.btn {
    display: inline-block;
    background-color: #2980b9;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #2471a3;
}

/* Tabelas */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: #fff;
}

table th,
table td {
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-align: left;
}

table th {
    background-color: #34495e;
    color: #fff;
}

tr:nth-child(even) td {
    background-color: #f5f5f5;
}

.centered {
    text-align: center;
}

/* Accordion (utilizado em conteúdos e homework) */
/* ADICIONAR AO FINAL DE style.css */

/* Melhorias no Accordion da página de Conteúdos */
.custom-accordion .accordion-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.custom-accordion .accordion-header {
    background-color: #f8f9fa;
    padding: 0;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.custom-accordion .accordion-header.user-level {
    background-color: #e9f5ff;
    border-left: 4px solid #007bff;
}

.custom-accordion .accordion-button {
    background: none;
    border: none;
    font-size: 1.1rem;
    text-align: left;
    width: 100%;
    padding: 15px 20px;
    color: #2c3e50;
    position: relative;
    padding-right: 40px;
    /* Espaço para a seta */
}

/* Seta indicadora no accordion */
.custom-accordion .accordion-button::after {
    content: '\\25BC';
    /* Seta para baixo */
    font-size: 0.8em;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.custom-accordion .accordion-header.active .accordion-button::after {
    transform: translateY(-50%) rotate(180deg);
    /* Seta para cima */
}

.custom-accordion .accordion-content {
    max-height: 0;
    /* Começa fechado */
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
}

/* Melhorias no Accordion da página de Conteúdos (CORRIGIDO) */
.custom-accordion .accordion-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    /* Reduzindo um pouco a margem */
    overflow: hidden;
}

.custom-accordion .accordion-header {
    background-color: #f8f9fa;
    padding: 0;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.custom-accordion .accordion-header.user-level {
    background-color: #e9f5ff;
    border-left: 4px solid #007bff;
}

.custom-accordion .accordion-button {
    background: none;
    border: none;
    font-size: 1rem;
    /* Mantendo o tamanho da fonte */
    text-align: left;
    width: 100%;
    padding: 12px 15px;
    /* Reduzindo um pouco o padding */
    color: #2c3e50;
    position: relative;
    padding-right: 30px;
    /* Menos espaço para a seta */
}

/* Seta indicadora no accordion (USANDO CSS PURO) */
.custom-accordion .accordion-button::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #555;
    transition: transform 0.3s ease;
}

.custom-accordion .accordion-header.active .accordion-button::after {
    transform: translateY(-50%) rotate(180deg);
    /* Seta para cima */
    border-bottom: 5px solid #555;
    border-top: none;
}

.custom-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
}


/* Filtros e Paginação com Estilo Consistente */

/* Contêiner para os botões de filtro */
.filters {
    display: flex;
    /* Utiliza flexbox para alinhamento e espaçamento */
    flex-wrap: wrap;
    /* Permite que os botões quebrem para a próxima linha em telas menores */
    justify-content: center;
    /* Centraliza os botões no contêiner */
    gap: 10px;
    /* Espaçamento consistente entre os botões */
    margin: 25px 0;
    /* Margem superior e inferior para separar do conteúdo */
}

/* Estilo dos botões de filtro individuais */
.filters a {
    display: inline-block;
    padding: 8px 16px;
    /* Padding similar aos links da navbar */
    background-color: #fff;
    /* Fundo branco para combinar com os cards */
    color: #2c3e50;
    /* Cor de texto principal */
    border: 1px solid #ddd;
    /* Borda sutil para definição */
    border-radius: 4px;
    /* Mesmo border-radius dos botões e navbar */
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    /* Transição suave */
}

/* Efeito hover para os botões de filtro */
.filters a:hover {
    background-color: #f5f5f5;
    /* Um cinza claro já usado no seu CSS (tabelas) */
    border-color: #ccc;
}

/* Estilo do botão de filtro ativo */
.filters a.active {
    background-color: #2980b9;
    /* Cor azul principal dos botões (.btn) */
    color: #fff;
    /* Texto branco */
    border-color: #2980b9;
    /* Borda na mesma cor do fundo */
}

/* Contêiner da paginação */
.pagination {
    display: flex;
    /* Utiliza flexbox para alinhamento */
    justify-content: center;
    align-items: center;
    gap: 8px;
    /* Espaçamento entre os links de paginação */
    margin-top: 30px;
}

/* Estilo dos links e spans da paginação */
.pagination a,
.pagination span {
    display: inline-block;
    padding: 8px 15px;
    border: 1px solid #ccc;
    background-color: #fff;
    color: #2980b9;
    /* Cor azul principal para o texto */
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

/* Efeito hover para os links da paginação */
.pagination a:hover {
    background-color: #2471a3;
    /* Cor de hover do botão principal (.btn:hover) */
    color: #fff;
    border-color: #2471a3;
}

/* Estilo para a página atual (não clicável) */
.pagination span.current {
    background-color: #2980b9;
    /* Cor azul principal */
    color: #fff;
    border-color: #2980b9;
    cursor: default;
    /* Indica que não é clicável */
}

/* ================================================================ */
/* CSS ATUALIZADO PARA PÁGINA DE CONTEÚDOS E TABELAS RESPONSIVAS   */
/* ================================================================ */

/* Faz as tabelas rolarem horizontalmente em telas pequenas */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* Melhorias no Accordion da página de Conteúdos */
.custom-accordion .accordion-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.custom-accordion .accordion-header {
    background-color: #f8f9fa;
    padding: 0;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.custom-accordion .accordion-header.user-level {
    background-color: #e9f5ff;
    border-left: 4px solid #007bff;
}

.custom-accordion .accordion-button {
    background: none;
    border: none;
    font-size: 1rem;
    text-align: left;
    width: 100%;
    padding: 12px 15px;
    color: #2c3e50;
    position: relative;
    padding-right: 30px;
}

.custom-accordion .accordion-button::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #555;
    transition: transform 0.3s ease;
}

.custom-accordion .accordion-header.active .accordion-button::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
}

/* ================================================================ */
/* CSS ATUALIZADO PARA PÁGINA DE HOMEWORK                           */
/* ================================================================ */

/* Estilos para Accordion (reutilizados de contents.php) */
.custom-accordion .accordion-item {
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}

.custom-accordion .accordion-header {
    background-color: #f8f9fa;
    padding: 0;
    cursor: pointer;
    border: none;
    font-weight: bold;
}

.custom-accordion .accordion-header.user-level {
    background-color: #e9f5ff;
    border-left: 4px solid #007bff;
}

.custom-accordion .accordion-button {
    background: none;
    border: none;
    font-size: 1.1rem;
    text-align: left;
    width: 100%;
    padding: 15px 20px;
    color: #2c3e50;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-accordion .accordion-button::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #555;
    transition: transform 0.3s ease;
}

.custom-accordion .accordion-header.active .accordion-button::after {
    transform: translateY(-50%) rotate(180deg);
}

.custom-accordion .accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background-color: #fff;
}

.level-score {
    font-size: 0.9rem;
    color: #555;
    font-weight: normal;
}

/* Estilos para a tabela de homework */
.homework-table {
    width: 100%;
    border-collapse: collapse;
}

.homework-table th,
.homework-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: center;
    vertical-align: middle;
}

.homework-table th {
    background-color: #f8f9fa;
    font-size: 0.8em;
    text-transform: uppercase;
    color: #555;
}

.homework-table tbody tr:last-child td {
    border-bottom: none;
}

.homework-table .unit-cell {
    text-align: left;
    min-width: 120px;
}

.unit-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    display: block;
}

.unit-score-desc {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-top: 4px;
}

/* Estilos para os botões/links da tabela de homework */
.homework-table .button-link {
    font-size: 0.9em;
    font-weight: bold;
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 4px;
    display: block;
    min-width: 80px;
    transition: background-color 0.2s, color 0.2s;
}

.homework-table .button-link.green {
    background-color: #28a745;
    color: #fff;
}

.homework-table .button-link.green:hover {
    background-color: #218838;
}

.homework-table .button-link.red {
    background-color: #dc3545;
    color: #fff;
}

.homework-table .button-link.red:hover {
    background-color: #c82333;
}

.homework-table .button-link.grey {
    background-color: #6c757d;
    color: #fff;
}

.homework-table .button-link.grey:hover {
    background-color: #5a6268;
}

.feedback-link {
    font-size: 0.8em;
    display: block;
    margin-top: 5px;
    color: #0073aa;
}

/* Estilos para Celular */
@media (max-width: 768px) {
    .homework-table {
        font-size: 0.9rem;
    }

    .homework-table .button-link {
        font-size: 0.8rem;
        padding: 6px;
        min-width: 50px;
    }

    .unit-number {
        font-size: 1rem;
    }

    .unit-score-desc {
        font-size: 0.75rem;
    }
}

/* Estilos para a nova tabela de conteúdos (.content-table) */
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}

.content-table th,
.content-table td {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
    /* Alinha o conteúdo verticalmente */
}

.content-table th {
    background-color: #f8f9fa;
    font-size: 0.8em;
    text-transform: uppercase;
    color: #555;
}

.content-table tbody tr:last-child td {
    border-bottom: none;
}

.content-table tbody tr:hover {
    background-color: #f5f9ff;
}

.content-table .user-unit {
    background-color: #fffbe6;
}

.content-table .button-link {
    padding: 6px 8px;
    font-size: 0.85em;
    text-decoration: none;
    display: inline-block;
    min-width: 70px;
    /* Largura mínima dos botões */
    text-align: center;
    border-radius: 4px;
    color: #fff;
    background-color: #007bff;
}

.content-table .button-link:hover {
    background-color: #0056b3;
}

.content-table td span {
    color: #999;
    font-style: italic;
}

/* NOVOS ESTILOS para a célula da Unidade */
.unit-cell {
    min-width: 150px;
    /* Evita que a coluna fique muito estreita */
}

.unit-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    display: block;
    /* Para ficar em linha separada */
}

.unit-grammar {
    font-size: 0.8rem;
    color: #666;
    display: block;
    margin-top: 4px;
}

/* NOVOS ESTILOS para Celular */
@media (max-width: 768px) {

    .content-table th,
    .content-table td {
        font-size: 0.85rem;
        /* Letras menores na tabela */
        padding: 8px 6px;
    }

    .content-table .button-link {
        font-size: 0.8rem;
        min-width: 60px;
        /* Botões menores */
    }

    .unit-number {
        font-size: 1rem;
    }

    .unit-grammar {
        font-size: 0.75rem;
    }
}

/* ================================================================ */
/* CSS Final para a Página de Progresso (progress.php)              */
/* ================================================================ */

/* --- Contêiner Principal --- */
.student-progress {
    background-color: #ffffff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.08);
    border: 1px solid #e9ecef;
}

/* --- Abas de Navegação (Tabs) --- */
.tabs {
    margin-bottom: 24px;
    display: flex;
    gap: 10px;
    border-bottom: 1px solid #dee2e6;
}

.tab-button {
    padding: 10px 20px;
    background-color: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    color: #555;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    margin-bottom: -1px;
}

.tab-button:hover:not(.active) {
    color: #2c3e50;
    background-color: #f8f9fa;
}

.tab-button.active {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

/* --- Controle de Visibilidade e Animação das Abas --- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Layout Vertical e Espaçamento --- */
.stat-card.score {
    margin-bottom: 30px;
    /* Espaço abaixo do score */
}

.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 30px;
    /* Espaço abaixo do gráfico */
}

/* --- Cartão de Score (Destaque) --- */
.stat-card.score {
    background: linear-gradient(45deg, #2c3e50, #34495e);
    color: #ffffff;
    text-align: center;
    padding: 24px;
    border-radius: 12px;
}

.stat-card.score .stat-value {
    font-size: 3.2rem;
    font-weight: bold;
    color: #ffffff;
    line-height: 1;
}

.stat-card.score .stat-label {
    font-size: 1rem;
    color: #bdc3c7;
    margin-top: 5px;
}

/* --- Subseções (Homework e Demais Atividades) --- */
.hw-subsection,
.other-stats-subsection {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.hw-subsection h4,
.other-stats-subsection h4 {
    margin: 0 0 16px 0;
    font-size: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
}

/* --- Grid para os cartões de detalhe --- */
.hw-grid,
.other-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

/* --- Estilo dos Cartões de Estatísticas (Detalhes) --- */
.stat-card {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-card .stat-icon {
    font-size: 2rem;
    color: #2980b9;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c3e50;
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #6c757d;
}

/* --- Responsividade --- */
@media (max-width: 992px) {
    .chart-container {
        height: 350px;
    }
}

@media (max-width: 576px) {
    .chart-container {
        height: 300px;
    }

    .hw-grid,
    .other-stats-grid {
        grid-template-columns: 1fr;
        /* Coluna única em telas pequenas */
    }
}

/* -------------------------------------------------------------
 * Estilos específicos para páginas de atividades interativas
 * (músicas, ebooks e filmes). Estas classes fornecem layouts
 * consistentes para players, visualizadores e transcrições.
 */

/* Player de música interativo */
.song-player {
    margin-top: 20px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cover-wrapper {
    max-width: 200px;
    margin-bottom: 16px;
}

.player-cover {
    width: 100%;
    border-radius: 8px;
}

.player-controls {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.lyrics-display {
    margin-top: 20px;
    text-align: center;
    width: 100%;
}

.lyrics-display .lyrics-line {
    margin: 4px 0;
    font-size: 16px;
}

.lyrics-display .prev,
.lyrics-display .next {
    color: #888;
}

.lyrics-display .current {
    color: #2c3e50;
    font-weight: bold;
}

.prompt-area {
    margin-top: 20px;
    text-align: center;
}

.input-answer {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    margin: 6px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

.feedback-msg {
    margin-top: 8px;
    font-weight: bold;
}

.score-board {
    margin-top: 20px;
    text-align: center;
}

/* Visualizador de ebooks */
.ebook-viewer {
    margin-top: 20px;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.ebook-viewer iframe {
    border: none;
    border-radius: 6px;
}

/* Página de vídeo para filmes */
.video-page {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.transcript-wrapper {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.transcript-line {
    padding: 4px 0;
    cursor: pointer;
}

.transcript-line.highlight {
    background-color: #f0f0f0;
    font-weight: bold;
}

@media (min-width: 800px) {
    .video-page {
        flex-direction: row;
    }

    .video-player {
        flex: 2;
        margin-right: 20px;
    }

    .transcript-wrapper {
        flex: 1;
    }
}

/* Filtro de gênero para filmes */
.genre-filter {
    margin-bottom: 20px;
}

.select-genre {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

@media (max-width: 600px) {
    .select-genre {
        width: 100%;
    }
}

/* Filtro de níveis para ebooks */
.filter-form {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.filter-form label {
    margin-right: 8px;
}

.level-checkbox {
    margin-right: 8px;
}

@media (max-width: 600px) {

    .activity-card,
    .genre-card,
    .ebook-card,
    .movie-card {
        width: 100%;
    }
}

//* ================================================================ */
/* CSS FINAL PARA O DANBOT FLUTUANTE (ESTILO WHATSAPP)              */
/* ================================================================ */

/* Container do DanBot */
.danbot-container {
    position: fixed !important;
    bottom: 25px !important;
    right: 25px !important;
    left: auto !important;
    top: auto !important;
    z-index: 99999 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ícone Flutuante (Trigger) */
.danbot-trigger {
    position: relative !important;
    bottom: auto !important;
    right: auto !important;
    display: inline-block;
    cursor: pointer;
    margin: 0;
    padding: 0;
    flex-shrink: 0;
}

.danbot-trigger img {
    width: 50px;
    height: 50px;
    background-color: #075E54;
    border-radius: 50%;
    display: block;
    cursor: pointer;
    box-shadow: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
    object-fit: cover;
    margin: 0;
}

.danbot-talk-text:hover .danbot-trigger img {
    transform: scale(1.05);
}

/* Texto "Talk to me" - apenas para desktop */
.danbot-talk-text {
    display: none;
    background-color: #075E54;
    color: #fff;
    padding: 0;
    padding-left: 16px;
    padding-right: 0;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    animation: fadeInRight 0.3s ease;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    align-items: center;
    gap: 0;
    overflow: hidden;
    flex-direction: row;
    height: 50px;
    line-height: 50px;
}

@media (min-width: 768px) {
    .danbot-talk-text {
        display: flex;
    }
}

.danbot-talk-text span {
    padding: 0 12px 0 0;
    display: inline-block;
    line-height: 50px;
    height: 50px;
}

.danbot-talk-text:hover {
    background-color: #128C7E;
    transform: translateX(-3px);
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mostra o texto apenas em telas maiores (desktop) */
@media (min-width: 768px) {
    .danbot-talk-text {
        display: flex;
    }
}

.danbot-trigger.hidden {
    transform: scale(0);
    opacity: 0;
}

/* Janela de Chat Flutuante */
.danbot-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 90%;
    max-width: 400px;
    height: 80vh;
    max-height: 600px;
    z-index: 999;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    transform-origin: bottom right;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.danbot-window.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* O resto dos estilos do DanBot... */
.danbot-box {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.danbot-header {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #075E54;
    color: #fff;
    padding: 10px 15px;
}

.danbot-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #fff;
}

.danbot-header-info {
    flex-grow: 1;
}

.danbot-header-info h3 {
    margin: 0;
    font-size: 1.1rem;
}

.danbot-header-info p {
    margin: 0;
    font-size: 0.8rem;
    color: #b0e0e6;
}

#danbot-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

#danbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: #E5DDD5;
}

.danbot-msg {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.danbot-msg.user {
    background: #DCF8C6;
    align-self: flex-end;
    border-top-right-radius: 0;
}

.danbot-msg.assistant {
    background: #FFFFFF;
    align-self: flex-start;
    border-top-left-radius: 0;
}

.danbot-input-area {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background: #f0f0f0;
}

#danbot-input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 20px;
    outline: none;
    font-size: 1rem;
    margin-right: 8px;
}

#danbot-send {
    background: #128C7E;
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

#danbot-send:hover {
    background: #075E54;
}

.danbot-emphasis {
    color: #8B0000;
    /* Dark Red */
    font-weight: bold;
}



/* Adicionar ao final de style.css */

/* Estilo para os botões de link dentro do chat do DanBot */
.danbot-msg.assistant .btn.danbot-link-btn {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 15px;
    background-color: #007bff;
    color: #fff !important;
    /* !important para garantir a cor branca */
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
}

.danbot-msg.assistant .btn.danbot-link-btn:hover {
    background-color: #0056b3;
    color: #fff !important;
}

@media(max-width: 500px) {
    .danbot-container {
        bottom: 25px;
        right: 25px;
    }

    .danbot-window {
        right: 15px;
        bottom: 85px;
        max-width: calc(100% - 30px) !important;
    }
}

/* Modal para página de aulas */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* Botões de alternância (utilizados na página de aulas) */
.btn-toggle {
    margin: 0 6px;
    padding: 8px 20px;
    background: #2c3e50;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-toggle.active {
    background: #b22222;
}



/* ======== ESTILOS PARA O CABEÇALHO E MENU RESPONSIVO (VERSÃO FINAL) ======== */

/* Corrige a cor do título do portal para branco, mesmo sendo um link */
.logo-link,
.logo-link:visited {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #fff;
    /* Garante que o texto do h1 seja branco */
}

/* --- Layout Padrão (Desktop: acima de 992px) --- */

.header-container {
    /* Em desktop, os itens se empilham verticalmente */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    /* Alinha tudo à esquerda */
    padding: 10px 0;
}

.navbar {
    width: 100%;
    margin-top: 10px;
    /* Espaço entre o logo e o menu */
    position: relative;
    z-index: 10 !important;
}

.navbar ul {
    display: flex;
    flex-wrap: wrap;
    /* Permite que o menu quebre a linha se necessário */
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 5px 15px;
    /* Espaçamento vertical e horizontal entre os itens */
}

.navbar li {
    margin-left: 0;
    /* Remove margem antiga para usar 'gap' */
}

/* Oculta o botão hambúrguer em telas grandes */
.hamburger-menu {
    display: none;
    cursor: pointer;
}


/* --- Layout para Telas Pequenas (Mobile: até 992px) --- */
@media (max-width: 992px) {

    /* Em mobile, o cabeçalho volta a ter uma linha só */
    .header-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 10px;
        /* Remove padding vertical para um header mais compacto */
    }

    /* Mostra o botão hambúrguer */
    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        width: 30px;
        height: 25px;
        background: transparent;
        border: none;
        padding: 0;
        z-index: 10;
    }

    .hamburger-menu span {
        width: 100%;
        height: 3px;
        background-color: #fff;
        border-radius: 3px;
        transition: all 0.3s ease-in-out;
    }

    /* Esconde a barra de navegação e a prepara para o modo "gaveta" */
    .navbar {
        display: none !important;
        position: absolute;
        top: 65px;
        /* Altura do seu header, ajuste se for diferente */
        left: 0;
        width: 100%;
        background-color: #2c3e50;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        margin-top: 0;
        z-index: 10 !important;
    }

    /* Quando o JS adiciona a classe .active, o menu aparece */
    .navbar.active {
        display: block !important;
        z-index: 10 !important;
    }

    /* Formata a lista para o modo vertical */
    .navbar ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
    }

    .navbar li {
        width: 100%;
    }

    .navbar li a {
        display: block;
        padding: 12px 20px;
        width: 100%;
        border-bottom: 1px solid #34495e;
        /* Linha separadora */
    }

    /* Ajusta o submenu "Plus" */
    .navbar .dropdown-menu {
        position: static;
        box-shadow: none;
        border-radius: 0;
        background-color: #34495e;
        display: none;
    }

    .navbar .dropdown:hover .dropdown-menu {
        display: block;
    }

    .navbar .dropdown-menu li a {
        padding-left: 40px;
        /* Indentação para os sub-itens */
    }

    /* Animação do ícone para o "X" de fechar */
    .hamburger-menu.active span:nth-child(1) {
        transform: translateY(11px) rotate(45deg);
    }

    .hamburger-menu.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}

/* ADICIONAR AO FINAL DE style.css */

/* Faz as tabelas rolarem horizontalmente em telas pequenas */
@media (max-width: 768px) {
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Melhora a rolagem em iOS */
    }
}

/* ================================================================ */
/* CSS FINAL PARA PÁGINA DE AULAS (classes.php)                     */
/* ================================================================ */

/* Seção de ações e botões */
.class-actions-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.info-text p {
    margin: 0;
    font-size: 0.9em;
    color: #555;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.btn-reschedule.active {
    background-color: #b22222;
}

.btn-reschedule.active:hover {
    background-color: #8e1b1b;
}

.btn-reschedule.inactive {
    background-color: #adb5bd;
    cursor: not-allowed;
}

.btn-cancel {
    background-color: #6c757d;
}

.btn-cancel:hover {
    background-color: #5a6268;
}

/* Tabela de resumo mensal */
.mes-tabelas {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.mes-box {
    min-width: 280px;
    max-width: 320px;
    border-radius: 8px;
    overflow: hidden;
}

.mes-box h4 {
    margin: 0;
    padding: 10px 15px;
    background: #34495e;
    color: #fff;
    font-size: 1em;
}

.mes-box table {
    width: 100%;
    border-collapse: collapse;
}

.mes-box table th,
.mes-box table td {
    padding: 10px 15px;
    text-align: center;
}

/* CORREÇÃO: Cabeçalho da tabela com fundo escuro e texto branco */
.mes-box table thead {
    background-color: #34495e;
}

.mes-box table th {
    font-weight: 600;
    color: #fff;
}

.mes-box table td {
    color: #555;
}

/* Tabela de resumo geral */
.summary-table {
    width: 100%;
    margin: 25px auto;
    border-collapse: collapse;
}

.summary-table th,
.summary-table td {
    text-align: center;
    padding: 12px 8px;
    white-space: nowrap;
}

/* Container dos botões e tabela detalhada */
.tabs-container {
    text-align: center;
    margin-bottom: 20px;
}

.detail-table {
    border: 1px solid #e9ecef;
}

.detail-table td:first-child {
    font-weight: 500;
}

.detail-table tr:hover {
    background-color: #f8f9fa;
}

/* --- Media Query para Celular --- */
@media (max-width: 768px) {

    /* Faz tabelas com estas classes rolarem horizontalmente */
    .table-scroll,
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .class-actions-container {
        flex-direction: column;
        align-items: flex-start;
    }

    /* CORREÇÃO: Layout vertical para a tabela de resumo geral */

    .summary-table thead {
        display: none;
        /* Oculta os cabeçalhos originais no celular */
    }

    .summary-table tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e9ecef;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        background: #fff;
    }

    .summary-table td {
        display: flex;
        justify-content: space-between;
        padding: 12px 15px;
        text-align: right;
        border-bottom: 1px solid #f0f0f0;
        white-space: normal;
    }

    .summary-table td:last-child {
        border-bottom: none;
    }

    .summary-table td::before {
        content: attr(data-label);
        /* Mostra o texto do data-label */
        font-weight: bold;
        text-align: left;
        margin-right: 15px;
        color: #333;
    }
}

/* ================================================================ */
/* CSS APRIMORADO PARA PÁGINA DE CANCELAMENTO (cancelar_aula.php)   */
/* ================================================================ */

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.cancellation-status {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.cancellation-status p {
    margin: 5px 0;
    font-size: 1em;
}

.cancellation-status p:first-child {
    margin-bottom: 10px;
}

.cancellation-status .limit-info {
    font-size: 0.85em;
    color: #555;
    margin-top: 10px;
    font-style: italic;
}

.upcoming-classes-list h3 {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: #2c3e50;
}

.class-card {
    display: flex;
    align-items: center;
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    gap: 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.class-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.class-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #34495e;
    border-radius: 6px;
    padding: 10px 15px;
    min-width: 110px;
    text-align: center;
}

.class-card-date .day-of-week {
    font-weight: 600;
    font-size: 0.9em;
    text-transform: uppercase;
}

.class-card-date .date {
    font-size: 1.2em;
    font-weight: bold;
    color: #007bff;
}

.class-card-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.class-card-info span {
    color: #555;
}

.class-card-info .time {
    font-size: 1.1em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.class-card-action .btn-cancel {
    background-color: transparent;
    color: #dc3545;
    border: 1px solid #dc3545;
    padding: 8px 16px;
    border-radius: 50px;
    /* Botão arredondado */
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.class-card-action .btn-cancel:hover {
    background-color: #dc3545;
    color: #fff;
}

@media (max-width: 576px) {
    .class-card {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .class-card-info {
        padding: 10px 0;
    }

    .class-card-action {
        width: 100%;
    }

    .class-card-action .btn {
        width: 100%;
    }
}

/* ================================================================ */
/* CSS PARA PÁGINA DE AGENDAMENTO DE AULA (schedule.php)            */
/* ================================================================ */

/* Container principal centralizado */
.schedule-container {
    background-color: #fff;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: 1200px;
    margin: 0 auto;
    /* centraliza */
}

.schedule-container h2 {
    text-align: center;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 20px;
}

.schedule-intro {
    text-align: center;
    font-size: 1.1em;
    color: #555;
    margin-bottom: 30px;
}

.alert.info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
    text-align: center;
}

/* ===================== Seleção de Professor ===================== */
.teacher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
    align-items: stretch;
}

.teacher-card {
    background-color: #f8f9fa;
    border: 1px solid #e3e6ef;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: box-shadow 0.3s ease, transform 0.15s ease;
    width: 100%;
    max-width: 340px;
}

.teacher-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Imagem retangular maior com borda */
.teacher-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 15px;
    border: 2px solid #e3e6ef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.teacher-card span {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.teacher-card .btn {
    width: 100%;
}

/* ======================== Agenda Semanal ======================== */
.calendar-header {
    text-align: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    margin: 0 0 5px 0;
}

.change-teacher-link {
    font-size: 0.9em;
    color: #0073aa;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.calendar-nav .week-text {
    font-weight: bold;
    color: #34495e;
}

/* Wrapper: rolagem apenas horizontal (altura segue a tabela) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    /* só scroll lateral */
    overflow-y: visible;
    /* sem scroll vertical interno */
    -webkit-overflow-scrolling: touch;
}

/* Tabela */
.schedule-table {
    border-collapse: collapse;
    width: max-content;
    /* cresce além da largura do container */
    min-width: 800px;
}

/* Remove zebra do tema (apenas nas linhas) sem mexer nas cores dos TDs */
.schedule-table tbody tr:nth-child(odd),
.schedule-table tbody tr:nth-child(even),
.schedule-table tbody tr:nth-of-type(odd),
.schedule-table tbody tr:nth-of-type(even) {
    background: transparent !important;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #e9ecef;
    padding: 8px;
    text-align: center;
    height: 50px;
    font-size: 0.9em;
    white-space: nowrap;
}

.schedule-table thead th {
    background-color: #34495e;
    color: #fff;
    font-weight: 600;
}

.schedule-table td:first-child {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* ===================== Estilos dos slots ======================== */
/* Força as cores dos slots (ganham de qualquer zebra) */
.slot-livre {
    background-color: #eaf7ed !important;
}

.slot-indisponivel {
    background-color: #f8d7da !important;
    color: #721c24;
    font-style: italic;
}

.slot-minha-aula {
    background-color: #d1ecf1 !important;
    color: #0c5460;
    font-weight: bold;
}

.slot-minha-repo {
    background-color: #fff3cd !important;
    color: #856404;
    font-weight: bold;
}

.slot-livre a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #155724;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.slot-livre a:hover {
    background-color: #28a745;
    color: #fff;
}



/* ================================================================ */
/* Agenda Semanal                                                    */
/* ================================================================ */

.calendar-header {
    text-align: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    margin: 0 0 5px 0;
}

.change-teacher-link {
    font-size: 0.9em;
    color: #0073aa;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 6px;
}

.calendar-nav .week-text {
    font-weight: bold;
    color: #34495e;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
}

/* Remove zebra striping que possa vir do tema */
.schedule-table tbody tr:nth-child(odd),
.schedule-table tbody tr:nth-child(even) {
    background: transparent !important;
}

.schedule-table th,
.schedule-table td {
    border: 1px solid #e9ecef;
    padding: 8px;
    text-align: center;
    height: 50px;
    font-size: 0.9em;
}

.schedule-table thead th {
    background-color: #34495e;
    color: #fff;
    font-weight: 600;
}

.schedule-table td:first-child {
    font-weight: bold;
    background-color: #f8f9fa;
}

/* ================================================================ */
/* Estilos dos slots de horário                                      */
/* ================================================================ */

.slot-livre {
    background-color: #eaf7ed;
}

.slot-livre a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: #155724;
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.2s, color 0.2s;
}

.slot-livre a:hover {
    background-color: #28a745;
    color: #fff;
}

.slot-indisponivel {
    background-color: #f8d7da;
    color: #721c24;
    font-style: italic;
}

.slot-minha-aula {
    background-color: #d1ecf1;
    color: #0c5460;
    font-weight: bold;
}

.slot-minha-repo {
    background-color: #fff3cd;
    color: #856404;
    font-weight: bold;
}


/* ================================================================ */
/* CSS PARA SISTEMA DE COMPRA DE EBOOKS                             */
/* ================================================================ */

/* Efeito de escala de cinza para ebooks não comprados */
.activity-card.not-purchased {
    filter: grayscale(90%);
    transition: filter 0.3s ease;
}

.activity-card.not-purchased:hover {
    filter: grayscale(0%);
}

/* Estilo para o preço do ebook */
.ebook-price {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px !important;
    /* !important para garantir a sobreposição */
}

/* Estilo para o botão "Compre Já" */
.btn-buy {
    background-color: #f39c12 !important;
    /* Laranja/Dourado para destaque */
    border-color: #f39c12 !important;
}

.btn-buy:hover {
    background-color: #e67e22 !important;
}

/* Alertas de sucesso e erro */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    text-align: center;
}

.alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* ================================================================ */
/* CSS PARA SISTEMA DE COMPRA E PLAYER DE MÚSICAS (songs.php)       */
/* ================================================================ */

/* ===== PÁGINA SOLO DA MÚSICA (apenas quando existe .player-ui) ===== */
.activity-container.player-ui {
    /* centraliza o bloco na página */
    max-width: 1000px;
    margin: 0 auto;
    padding-inline: 16px;

    /* grid do player */
    display: grid;
    grid-template-columns: 300px minmax(320px, 1fr);
    gap: 30px;

    /* centralizações */
    align-items: center;
    /* eixo vertical das células */
    justify-content: center;
    /* centraliza o conjunto dentro do grid */
    justify-items: center;
    /* conteúdo de cada célula */
}

/* garante centralização do card de capa/infos */
.activity-container.player-ui .player-info {
    text-align: center;
    justify-self: center;
}

/* quando bloqueada, o card ocupa as 2 colunas e fica no miolo */
.activity-container.player-ui .player-info.locked {
    grid-column: 1 / -1;
    /* atravessa as duas colunas */
    max-width: 520px;
    justify-self: center;
}

/* coluna da letra/exercício, alinhada no centro */
.activity-container.player-ui .player-lyrics-section {
    align-items: center;
    /* você já tinha justify-content; faltava o eixo cruzado */
    text-align: center;
    width: 100%;
}

/* opcional: deixa a área das linhas ocupar a largura toda e centraliza o texto */
.activity-container.player-ui .lyrics-display {
    width: 100%;
    max-width: 720px;
    margin: 0 auto 20px;
}

/* responsivo: empilha e mantém centralizado */
@media (max-width: 768px) {
    .activity-container.player-ui {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 620px;
    }
}


/* Efeito de escala de cinza para itens não comprados */
.activity-card.not-purchased {
    filter: grayscale(90%);
    transition: filter 0.3s ease;
}

.activity-card.not-purchased:hover {
    filter: grayscale(0%);
}

.ebook-price {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 10px !important;
}

.btn-buy {
    background-color: #f39c12 !important;
    border-color: #f39c12 !important;
}

.btn-buy:hover {
    background-color: #e67e22 !important;
}

.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    text-align: center;
}

.alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Novo layout do Player de Música */
.player-ui {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: center;
}

.player-info {
    text-align: center;
}

.player-cover {
    width: 100%;
    max-width: 250px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 15px;
}

.player-info h2 {
    margin: 10px 0 5px 0;
}

.player-info p {
    margin: 0 0 15px 0;
    color: #555;
    font-style: italic;
}

.player-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.btn-control {
    background: none;
    border: 2px solid #2c3e50;
    color: #2c3e50;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-control.play {
    background: #2c3e50;
    color: #fff;
}

.btn-control:hover {
    background: #34495e;
    color: #fff;
}

.player-lyrics-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lyrics-display {
    min-height: 120px;
    text-align: center;
    margin-bottom: 20px;
}

.lyrics-line {
    font-size: 1.2rem;
    transition: color 0.3s;
}

.lyrics-line.prev,
.lyrics-line.next {
    color: #aaa;
}

.lyrics-line.current {
    color: #2980b9;
    font-size: 1.5rem;
    font-weight: bold;
}

.prompt-area {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.prompt-area p {
    font-weight: bold;
    margin: 0;
}

.prompt-area em {
    font-style: normal;
    color: #007bff;
}

.input-answer {
    padding: 8px;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    text-align: center;
}

.prompt-buttons {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background-color: #6c757d;
}

.score-board {
    display: none;
    text-align: center;
}

.score-board h3 {
    color: #2980b9;
}

@media(max-width: 768px) {
    .player-ui {
        grid-template-columns: 1fr;
    }

    .player-lyrics-section {
        margin-top: 20px;
    }
}

/* ================================================================ */
/* CSS FINAL PARA PÁGINAS DE FILMES E QUIZ                          */
/* ================================================================ */

/* --- Estilos Gerais (Lista de Filmes e Alertas) --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    border: 1px solid transparent;
    text-align: center;
}

.alert.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.filter-form-grid {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-form-grid select {
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    flex-grow: 1;
}

/* --- PÁGINA DO PLAYER (movies.php) --- */

.movie-player-container {
    background: #000;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin: 0 auto;
    max-width: 900px;
    /* Limita a largura do player */
}

.movie-player-container video {
    display: block;
    /* Remove espaço extra abaixo do vídeo */
    width: 100%;
    border-radius: 4px;
}

.subtitle-display {
    background-color: #f8f9fa;
    color: #333;
    padding: 20px;
    text-align: center;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin: 20px auto 20px;
    max-width: 900px;
}

.subtitle-en {
    font-size: 1.3em;
    font-weight: 500;
    margin: 0;
    color: #2c3e50;
    line-height: 1.4;
}

.subtitle-pt {
    font-size: 1em;
    color: #555;
    font-style: italic;
    margin-top: 8px;
    display: none;
    /* Começa escondido */
}

.no-translation-note {
    font-size: 0.9em;
    color: #888;
    font-style: italic;
    margin: 10px 0 0 0;
}

.btn-translate {
    margin-top: 10px;
    background-color: transparent;
    border: 1px solid #6c757d;
    color: #6c757d;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: bold;
    transition: all 0.2s ease;
}

.btn-translate:hover {
    background-color: #6c757d;
    color: #fff;
}

.movie-actions {
    text-align: center;
    display: flex;
    gap: 10px;
    justify-content: center;
}

/* --- PÁGINA DO QUIZ (movie_quiz.php) --- */
.quiz-container {
    max-width: 800px;
    margin: auto;
}

.quiz-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.quiz-character-pic {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.quiz-progress {
    font-size: 1.1em;
    font-weight: 500;
    color: #34495e;
}

.quiz-box h4 {
    font-size: 1.4em;
    margin-bottom: 20px;
    text-align: center;
    color: #2c3e50;
    line-height: 1.4;
}

.quiz-options {
    list-style: none;
    padding: 0;
}

.quiz-options li {
    background-color: #fff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.quiz-options li:hover {
    background-color: #e9f5ff;
    border-color: #007bff;
}

.quiz-options li.correct {
    background-color: #d4edda;
    border-color: #28a745;
    font-weight: bold;
}

.quiz-options li.incorrect {
    background-color: #f8d7da;
    border-color: #dc3545;
}

.quiz-feedback {
    text-align: center;
    font-weight: bold;
    margin-top: 15px;
    padding: 10px;
    border-radius: 6px;
}

.quiz-feedback.correct {
    color: #155724;
    background-color: #d4edda;
}

.quiz-feedback.incorrect {
    color: #721c24;
    background-color: #f8d7da;
}

.quiz-nav {
    text-align: center;
    margin-top: 20px;
}


//* ================================================================ */
/* CSS ATUALIZADO PARA PÁGINA FINANCEIRA (financeiro.php)           */
/* ================================================================ */

/* Alertas de Pagamento */
.payment-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border: 1px solid transparent;
    text-align: center;
}

.payment-alert.status-pendente {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

.payment-alert.status-atrasado {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
    font-size: 1.1em;
}

.financial-history-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.month-financial-card {
    background-color: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.month-financial-card h3 {
    font-size: 1.2em;
    padding: 12px 15px;
    margin: 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.finance-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.finance-details-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
}

.finance-details-list li:last-child {
    border-bottom: none;
}

.finance-details-list span {
    color: #555;
}

.finance-details-list strong {
    color: #2c3e50;
    font-size: 1.1em;
}

.finance-details-list del {
    color: #999;
    font-size: 1em;
    text-decoration: line-through;
}

/* Destaque para o Desconto */
.finance-details-list .finance-highlight {
    background-color: #d4edda;
    font-size: 1.1em;
    /* Fonte maior para chamar atenção */
}

.finance-details-list .finance-highlight span,
.finance-details-list .finance-highlight strong {
    color: #155724;
    font-weight: bold;
}

.finance-details-list .total-month {
    background-color: #2c3e50;
}

.finance-details-list .total-month span,
.finance-details-list .total-month strong {
    color: #fff;
    font-weight: bold;
}

//* ================================================================ */
/* CSS ATUALIZADO PARA PÁGINA FINANCEIRA (financeiro.php)           */
/* ================================================================ */

.financial-history-container {
    /* ... (estilos existentes) ... */
}

.month-financial-card {
    /* ... (estilos existentes) ... */
}

.month-financial-card h3 {
    /* ... (estilos existentes) ... */
}

.finance-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.finance-details-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9em;
}

.finance-details-list li:last-child {
    border-bottom: none;
}

.finance-details-list span {
    color: #555;
}

.finance-details-list strong {
    color: #2c3e50;
    font-size: 1.1em;
}

.finance-details-list .price-breakdown {
    display: flex;
    align-items: center;
    gap: 8px;
}

.finance-details-list del {
    color: #999;
    font-size: 1em;
    text-decoration: line-through;
}

.finance-details-list .finance-highlight {
    background-color: #d4edda;
}

.finance-details-list .finance-highlight span,
.finance-details-list .finance-highlight strong {
    color: #155724;
    font-weight: bold;
}

.finance-details-list .total-month {
    background-color: #2c3e50;
}

.finance-details-list .total-month span,
.finance-details-list .total-month strong {
    color: #fff;
    font-weight: bold;
}

/* NOVOS ESTILOS PARA O STATUS E BOTÃO */
.status-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-pay-now-small {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 0.8em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-pay-now-small:hover {
    background-color: #0056b3;
}

/* FIM DOS NOVOS ESTILOS */

.status-pago {
    color: #28a745 !important;
}

.status-pendente {
    color: #ffc107 !important;
}

.status-atrasado {
    color: #dc3545 !important;
}

/* Estilos do Popup (Modal) de Pagamento */
.payment-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
}

.payment-modal-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.close-modal-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.payment-modal-content h3 {
    margin-top: 0;
    color: #2c3e50;
}

.pix-info {
    display: flex;
    gap: 10px;
    margin: 15px 0;
}

#modal-pix-key {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    background-color: #f8f9fa;
}

.pix-feedback {
    margin-top: 10px;
    font-size: 0.9em;
    color: #28a745;
    font-weight: bold;
    min-height: 1.2em;
}

.pix-instructions {
    font-size: 0.8em;
    color: #6c757d;
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}


/* Ajustes do Cabeçalho para Mobile - Forçando override dos estilos inline do header.php */
@media (max-width: 900px) {
    .header-container {
        padding: 4px 10px !important;
        /* Margem reduzida (espremido) */
        min-height: auto !important;
    }

    .logo-img {
        height: 35px !important;
        /* Logo menor */
        width: auto !important;
        margin-right: 5px !important;
    }

    .header-center .logo {
        font-size: 1rem !important;
        /* Fonte do título menor */
        margin: 0 !important;
    }

    .navbar ul {
        margin-top: 0 !important;
        gap: 5px !important;
    }

    .navbar a {
        padding: 8px 10px !important;
        font-size: 14px !important;
    }

    /* Ajuste para o menu hamburger ficar alinhado */
    .hamburger-menu {
        transform: scale(0.8);
    }
}