:root {
    --cor-header: #0c1014;
    --cor-fundo: #111D2B;
    --cor-main: #111D2B;
    --cor-letra: white;
    --cor-primaria: #0d6efd; /* Azul Bootstrap para consistência */
}

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--cor-fundo);
    width: 100%;
    color: var(--cor-letra);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header */
.header {
    height: 10vh;
    display: flex;
    background-color: var(--cor-header);
    width: 100%;
    justify-content: space-between;
    padding-inline: 1.5em;
    align-items: center;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

.perfil i {
    font-size: 30px;
    color: var(--cor-letra);
    transition: transform 0.2s;
}

.perfil i:hover {
    transform: scale(1.1);
}

/* Main */
.main {
    text-align: center;
    background-color: var(--cor-main);
    flex: 1;
    padding: 2em 1em;
}

#materias {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

/* Modal / Dialog */
dialog {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background-color: var(--cor-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 90%;
    max-width: 550px;
    max-height: 85vh;
    margin: auto;
    color: white;
    padding: 1em;
}

dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

dialog[open] {
    animation: zoomIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Inputs dentro de Modais */
dialog input {
    background-color: #1c252f !important;
    border: 1px solid #30363d !important;
    color: white !important;
}

dialog input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Fechar Modal */
.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
    transition: opacity 0.2s;
}

.btn-close-white:hover {
    opacity: 1;
}

/* Efeito de Scroll Invisível com Fade (Sombra) */
.scroll-container-wrapper {
    position: relative;
    /* Cria o efeito de "sumir" nas bordas superior e inferior */
    mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 12%, black 88%, transparent);
    padding: 10px 0;
}

.notas-scroll-area {
    max-height: 300px; 
    overflow-y: auto;
    padding: 0 10px;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.notas-scroll-area::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

/* Confete (Sempre à frente) */
canvas {
    z-index: 10000 !important;
    position: fixed !important;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* Boas-vindas (Empty State) */
#welcome-state {
    padding: 3rem;
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 20px;
}

#welcome-state i {
    animation: float 3s ease-in-out infinite;
    color: var(--cor-primaria);
}

/* Bordas Dinâmicas para os Cards */
.card-passou {
    border: 2px solid #2ecc71 !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.2);
}

.card-atencao {
    border: 2px solid #f1c40f !important;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.2);
}

.card-perigo {
    border: 2px solid #e74c3c !important;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.2);
}

/* Efeito de Hover melhorado */
.materias-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.materias-card:hover {
    transform: translateY(-5px);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}
.login {
    background-color: #0c1014;
    border-radius: 1em;
    width: 30vh;
    padding: 3em;
}

/* Fix para o Chrome não cortar o fundo do footer */
footer {
    background-color: #121212 !important;
    position: relative;
    z-index: 10;
    width: 100%;
}

/* Efeito suave nos botões sociais */
footer .btn-outline-light:hover {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

footer a:hover {
    color: #0d6efd !important; /* Cor primária do Bootstrap ao passar o rato */
    transition: 0.3s;
}

/* Garante que o footer fique sempre no fundo da página se houver pouco conteúdo */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}
/* Responsividade */
@media screen and (max-width: 767px) {
    .card{
        width: 80%;
        margin-inline: auto;
    }
    .main h1 { font-size: 3rem; }
    dialog { padding: 1.5em; }
}

@media screen and (max-width: 576px) {
    .header { padding-inline: 1em; }
    .logo img { height: 35px; }
}