body {
    font-family: Arial, sans-serif;
    background: #f0f0f0;
    margin: 20px;
    padding: 0;
    color: #333;
}

h2 {
    text-align: center;
    color: #333;
    margin-bottom: 10px;
}

#aviso-orientacao {
    display: none;
    text-align: center;
    padding: 10px;
    margin: 10px auto;
    max-width: 600px;
    background-color: transparent;
    color: #856404;
    border: none;
}

.table-container {
    max-width: 1000px;
    margin: 0 auto 30px;
    background: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    overflow-x: auto;
}

table#tabela-materias {
    border-collapse: collapse;
    width: 100%;
    font-family: Arial, sans-serif;
}

#tabela-materias th {
    background-color: #4CAF50;
    color: white;
    font-weight: bold;
    padding: 10px 15px;
    text-align: center;
}

#tabela-materias td {
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px 15px;
    text-align: left;
    color: #333;
}

/* Coluna Nº */
#tabela-materias th:nth-child(1),
#tabela-materias td:nth-child(1) {
    text-align: center;
    white-space: nowrap;
    width: 40px;
}

#tabela-materias tr:nth-child(even) {
    background-color: #f9f9f9;
}

#tabela-materias tr:hover {
    background-color: #d1e7dd;
}

/* Coluna Tamanho */
#tabela-materias th:nth-child(4),
#tabela-materias td:nth-child(4) {
    text-align: center;
    white-space: nowrap;
    width: 1px;
}

/* Colunas Data e Hora */
#tabela-materias th:nth-child(5),
#tabela-materias td:nth-child(5),
#tabela-materias th:nth-child(6),
#tabela-materias td:nth-child(6) {
    white-space: nowrap;
    width: 1px;
}

/* Ajustes para dispositivos móveis com largura até 600px */
@media screen and (max-width: 600px) and (orientation: portrait) {
    #aviso-orientacao {
        display: block;
        width: 90%;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    /* Oculta as colunas Significado (3), Data (5) e Hora (6) no retrato */
    #tabela-materias th:nth-child(3),
    #tabela-materias td:nth-child(3),
    #tabela-materias th:nth-child(5),
    #tabela-materias td:nth-child(5),
    #tabela-materias th:nth-child(6),
    #tabela-materias td:nth-child(6) {
        display: none !important;
    }
}

@media screen and (max-width: 600px) and (orientation: landscape) {
    .table-container {
        overflow-x: visible;
        max-width: 100%;
        margin: 0 auto 30px;
    }

    /* Exibe todas as colunas no modo paisagem */
    #tabela-materias th,
    #tabela-materias td {
        display: table-cell !important;
    }

    /* Ajusta quebra de texto para evitar overflow horizontal */
    #tabela-materias td,
    #tabela-materias th {
        white-space: normal;
        word-wrap: break-word;
    }
}

/* Ajuste para remover borda inferior da tabela */
#tabela-materias {
    border-bottom: none !important;
}

/* Esconde o footer, conforme original */
footer {
    display: none !important;
}
