/* app.css - Customizações para StudyCraft (Complementa Bootstrap, Sem Tailwind) */

/* Base e Resets (Light Mode) */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; }

/* Dark Mode Expansão (Para Elementos Residuais) */
body.dark-mode p, body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #e0e0e0 !important;
}
body.dark-mode .input-group-text {
    background-color: #2a2a2a !important;
    border-color: #444444 !important;
    color: #e0e0e0 !important;
}
body.dark-mode .table tbody tr {
    background-color: #1e1e1e !important;
}
body.dark-mode .table tbody tr td {
    border-color: #333333 !important;
    color: #e0e0e0 !important;
}
body.dark-mode .form-text, body.dark-mode small {
    color: #a0a0a0 !important;
}
body.dark-mode .btn-close {
    filter: invert(1); /* X branco em alerts dark */
}
body.dark-mode .hero-section p, body.dark-mode .hero-section h1 {
    color: #ecf0f1 !important;
}
body.dark-mode .feature-card p {
    color: #e0e0e0 !important;
}
body.dark-mode .text-end {
    color: #e0e0e0 !important;
}

/* Hamburger Fallback Extra (Se SVG Falhar) */
body.dark-mode .navbar-toggler {
    border-color: #444444 !important;
}
body.dark-mode .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Responsividade Adicional */
@media (max-width: 576px) {
    body.dark-mode .table { font-size: 0.8rem; }
    body.dark-mode .card { margin-bottom: 1rem; }
    body.dark-mode .btn { padding: 0.5rem 1rem; }
}

/* Hover Geral (Adaptado para Dark) */
.btn:hover, .nav-link:hover, .card:hover { transition: all 0.2s ease; transform: translateY(-1px); }
body.dark-mode .btn:hover, body.dark-mode .nav-link:hover { transform: translateY(-1px); }

/* ========================================
   BACKGROUND PATTERN - Tema Estudos
   ======================================== */

/* Light Mode - Pattern mais visível */
body {
    background-color: #f8f9fa !important;
    background-image: url("data:image/svg+xml,%3Csvg width='260' height='260' viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E

    %3Cg stroke='%23000000' stroke-opacity='0.12' fill='none' stroke-width='2'%3E
        %3C!-- Lápis --%3E
        %3Cpath d='M30 40 L70 80 L60 90 L20 50 Z'%3E%3C/path%3E

        %3C!-- Livro aberto --%3E
        %3Cpath d='M150 50 Q180 40 210 55 L210 125 Q180 110 150 120 Z'%3E%3C/path%3E
        %3Cpath d='M150 50 Q120 40 90 55 L90 125 Q120 110 150 120 Z'%3E%3C/path%3E

        %3C!-- Balão de fala --%3E
        %3Cpath d='M60 160 Q110 120 160 160 Q140 190 100 200 Q70 190 60 160 Z'%3E%3C/path%3E

        %3C!-- Caderno --%3E
        %3Crect x='180' y='160' width='50' height='70' rx='6'%3E%3C/rect%3E
        %3Cline x1='185' y1='175' x2='225' y2='175'%3E%3C/line%3E
        %3Cline x1='185' y1='190' x2='225' y2='190'%3E%3C/line%3E
        %3Cline x1='185' y1='205' x2='225' y2='205'%3E%3C/line%3E

        %3C!-- Chapéu de formatura --%3E
        %3Cpath d='M90 230 L150 210 L210 230 L150 250 Z'%3E%3C/path%3E
        %3Cline x1='150' y1='210' x2='150' y2='260'%3E%3C/line%3E
    %3C/g%3E

    %3C/svg%3E");
    background-repeat: repeat;
    background-attachment: fixed;
}


/* Dark Mode - Pattern mais visível */
body.dark-mode {
    background-color: #121212 !important;
    background-image: url("data:image/svg+xml,%3Csvg width='260' height='260' viewBox='0 0 260 260' xmlns='http://www.w3.org/2000/svg'%3E

    %3Cg stroke='%23ffffff' stroke-opacity='0.10' fill='none' stroke-width='2'%3E
        %3C!-- Lápis --%3E
        %3Cpath d='M30 40 L70 80 L60 90 L20 50 Z'%3E%3C/path%3E

        %3C!-- Livro aberto --%3E
        %3Cpath d='M150 50 Q180 40 210 55 L210 125 Q180 110 150 120 Z'%3E%3C/path%3E
        %3Cpath d='M150 50 Q120 40 90 55 L90 125 Q120 110 150 120 Z'%3E%3C/path%3E

        %3C!-- Balão de fala --%3E
        %3Cpath d='M60 160 Q110 120 160 160 Q140 190 100 200 Q70 190 60 160 Z'%3E%3C/path%3E

        %3C!-- Caderno --%3E
        %3Crect x='180' y='160' width='50' height='70' rx='6'%3E%3C/rect%3E
        %3Cline x1='185' y1='175' x2='225' y2='175'%3E%3C/line%3E
        %3Cline x1='185' y1='190' x2='225' y2='190'%3E%3C/line%3E
        %3Cline x1='185' y1='205' x2='225' y2='205'%3E%3C/line%3E

        %3C!-- Chapéu de formatura --%3E
        %3Cpath d='M90 230 L150 210 L210 230 L150 250 Z'%3E%3C/path%3E
        %3Cline x1='150' y1='210' x2='150' y2='260'%3E%3C/line%3E
    %3C/g%3E

    %3C/svg%3E") !important;
    background-repeat: repeat !important;
    background-attachment: fixed !important;
}
/* TESTE - Se isso funcionar, o CSS está sendo carregado */
body {
    border: 10px solid red !important;
}
