/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* ============================================
   NAVBAR PRINCIPAL
   ============================================ */
.navbar {
    background: #2c5e2e;
    padding: 10px 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.navbar button {
    padding: 10px 15px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.navbar button.active,
.navbar button:hover {
    background: #f4b942;
    color: #1a1a1a;
}

/* ============================================
   CONTAINER E SEÇÕES
   ============================================ */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.section {
    display: none;
}

.section.active {
    display: block;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    transition: background 0.3s, color 0.3s;
}

.card h2 {
    color: #2c5e2e;
    margin-bottom: 15px;
    border-bottom: 2px solid #f4b942;
    padding-bottom: 10px;
}

.card h3 {
    color: #2c5e2e;
    margin-bottom: 10px;
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    flex: 1;
    min-width: 0;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2c5e2e;
}

/* ============================================
   BOTÕES
   ============================================ */
button {
    padding: 10px 20px;
    background: #2c5e2e;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

button:hover {
    background: #1e4220;
    transform: scale(1.02);
}

.btn-outline {
    background: white;
    color: #2c5e2e;
    border: 1px solid #2c5e2e;
}

.btn-outline:hover {
    background: #2c5e2e;
    color: white;
}

.btn-icon {
    background: #666;
    padding: 8px 15px;
    font-size: 0.9rem;
}

/* ============================================
   BÍBLIA - VERSÍCULOS
   ============================================ */
.bible-text {
    background: #fafafa;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    line-height: 1.8;
    transition: all 0.3s;
}

.verse-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    border-left: 3px solid #2c5e2e;
    padding-left: 15px;
    background: white;
    transition: all 0.3s;
}

.verse-item input[type="checkbox"] {
    margin-top: 5px;
}

.verse-number {
    font-weight: bold;
    color: #2c5e2e;
    min-width: 30px;
}

/* ============================================
   SERMÕES E RESULTADOS
   ============================================ */
.sermao-output {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    line-height: 1.8;
    white-space: pre-wrap;
    transition: all 0.3s;
}

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.lista-sermoes {
    display: grid;
    gap: 15px;
}

.lista-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    border-left: 4px solid #2c5e2e;
    transition: all 0.3s;
}

.lista-item button {
    padding: 5px 10px;
    font-size: 0.85rem;
    margin-left: 5px;
}

.tag {
    background: #f4b942;
    color: #1a1a1a;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.resultado-busca {
    margin-top: 15px;
}

/* ============================================
   CATEGORIAS DE TEMAS - GRID
   ============================================ */
.categorias-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin-top: 20px;
    margin-bottom: 25px;
}

.categoria-section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.categoria-section:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.categoria-header {
    padding: 12px 10px;
    font-weight: bold;
    font-size: 0.85rem;
    text-align: center;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.categoria-header span {
    display: inline-block;
    vertical-align: middle;
}

.categoria-header span:first-child {
    margin-right: 5px;
}

.categoria-content {
    padding: 10px;
    background: white;
    transition: background 0.3s;
}

.select-tema {
    width: 100%;
    padding: 8px 5px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s;
    background: white;
}

.select-tema:hover {
    border-color: #f4b942;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.select-tema:focus {
    outline: none;
    border-color: #f4b942;
    box-shadow: 0 0 0 3px rgba(244, 185, 66, 0.2);
}

/* Cores das Categorias - Linhas 1 e 2 */
.categoria-geral .categoria-header { background: linear-gradient(135deg, #f4b942 0%, #d68910 100%); }
.categoria-fruto_espirito .categoria-header { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.categoria-dons_espirituais .categoria-header { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }
.categoria-escatologia .categoria-header { background: linear-gradient(135deg, #8e44ad 0%, #6c3483 100%); }
.categoria-teologia .categoria-header { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }
.categoria-vida_pratica .categoria-header { background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%); }
.categoria-adoracao .categoria-header { background: linear-gradient(135deg, #f39c12 0%, #d68910 100%); }
.categoria-ministerio .categoria-header { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); }
.categoria-familia .categoria-header { background: linear-gradient(135deg, #e91e63 0%, #c2185b 100%); }
.categoria-guerra_espiritual .categoria-header { background: linear-gradient(135deg, #c0392b 0%, #a93226 100%); }
.categoria-mordomia .categoria-header { background: linear-gradient(135deg, #f1c40f 0%, #d4ac0d 100%); color: #333; }
.categoria-hermeneutica .categoria-header { background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); }

/* Cores das Categorias - Linhas 3 e 4 */
.categoria-apologetica .categoria-header { background: linear-gradient(135deg, #16a085 0%, #1abc9c 100%); }
.categoria-historia .categoria-header { background: linear-gradient(135deg, #d35400 0%, #e67e22 100%); }
.categoria-missoes .categoria-header { background: linear-gradient(135deg, #2980b9 0%, #3498db 100%); }
.categoria-lideranca .categoria-header { background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%); }
.categoria-filosofia .categoria-header { background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%); }
.categoria-etica .categoria-header { background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%); }
.categoria-seitas .categoria-header { background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%); }
.categoria-religioes .categoria-header { background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); }
.categoria-pais_igreja .categoria-header { background: linear-gradient(135deg, #e67e22 0%, #d35400 100%); }
.categoria-reforma .categoria-header { background: linear-gradient(135deg, #c0392b 0%, #a93226 100%); }
.categoria-avivamentos .categoria-header { background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%); }
.categoria-concilios .categoria-header { background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%); }

/* ============================================
   TABELAS COMPARATIVAS LEI vs GRAÇA
   ============================================ */
#listaVersiculosTema table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

#listaVersiculosTema table thead {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    color: white;
}

#listaVersiculosTema table th {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    font-size: 1.1rem;
}

#listaVersiculosTema table th:first-child {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
}

#listaVersiculosTema table th:last-child {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
}

#listaVersiculosTema table td {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    line-height: 1.6;
}

#listaVersiculosTema table tr:hover {
    background: #f9f9f9;
}

#listaVersiculosTema table tr:last-child td {
    border-bottom: none;
}

#listaVersiculosTema table td:first-child {
    background: rgba(192, 57, 43, 0.05);
    color: #c0392b;
    font-weight: 500;
}

#listaVersiculosTema table td:last-child {
    background: rgba(39, 174, 96, 0.05);
    color: #27ae60;
    font-weight: 500;
}

/* ============================================
   MENU HAMBURGER E SIDEBAR
   ============================================ */
.menu-hamburger {
    display: none;
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 1000;
    background: #2c5e2e;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    flex-direction: column;
    gap: 3px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s;
}

.menu-hamburger:hover {
    background: #1e4220;
}

.menu-hamburger span {
    display: block;
    width: 22px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #2c5e2e 0%, #1e4220 100%);
    color: white;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0,0,0,0.3);
}

.sidebar.aberta {
    left: 0;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0,0,0,0.3);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #f4b942;
    white-space: nowrap;
}

.btn-fechar-sidebar {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 5px;
    transition: background 0.3s;
    flex-shrink: 0;
}

.btn-fechar-sidebar:hover {
    background: rgba(255,255,255,0.1);
}

.sidebar-content {
    padding: 15px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 15px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: #f4b942;
}

.nav-item span:first-child {
    font-size: 1.1rem;
    min-width: 20px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 10px 0;
}

.sidebar-categorias h4 {
    margin: 0 0 10px 0;
    color: #f4b942;
    font-size: 0.9rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-categoria-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    margin-bottom: 3px;
    background: rgba(255,255,255,0.05);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.sidebar-categoria-item:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.sidebar-categoria-item .categoria-nome {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-categoria-item .categoria-count {
    background: rgba(255,255,255,0.2);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.sidebar-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* ============================================
   MODAL DE ESTUDO DO VERSÍCULO
   ============================================ */
.modal-estudo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.7);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-estudo-overlay.ativo {
    opacity: 1;
    visibility: visible;
}

.modal-estudo {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    transform: translateY(20px);
    transition: transform 0.3s;
}

.modal-estudo-overlay.ativo .modal-estudo {
    transform: translateY(0);
}

.modal-estudo-header {
    background: linear-gradient(135deg, #2c5e2e 0%, #1e4220 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-estudo-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: #f4b942;
}

.modal-estudo-header .referencia {
    font-size: 1rem;
    color: white;
    margin-top: 5px;
}

.btn-fechar-modal {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.btn-fechar-modal:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.modal-estudo-body {
    padding: 25px;
}

.versiculo-base {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    border-left: 4px solid #f4b942;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.6;
}

.versiculo-base strong {
    color: #2c5e2e;
    font-style: normal;
    font-size: 1.1rem;
}

.estudo-secao {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.estudo-secao:last-child {
    border-bottom: none;
}

.estudo-secao h4 {
    color: #2c5e2e;
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid #f4b942;
    padding-bottom: 8px;
}

.estudo-conteudo h4 {
    color: #2c5e2e;
    font-size: 1.1rem;
    margin: 20px 0 12px 0;
    border-bottom: 2px solid #f4b942;
    padding-bottom: 8px;
}

.estudo-conteudo p,
.estudo-secao p,
.estudo-secao li {
    line-height: 1.7;
    color: #444;
    margin-bottom: 8px;
}

.estudo-conteudo ul,
.estudo-conteudo ol,
.estudo-secao ul {
    padding-left: 25px;
    margin-bottom: 15px;
}

.estudo-conteudo li {
    line-height: 1.7;
    margin-bottom: 5px;
}

.ref-cruzada-item {
    background: #f9f9f9;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 3px solid #3498db;
}

.ref-cruzada-item strong {
    color: #2c5e2e;
    display: block;
    margin-bottom: 5px;
    font-size: 1rem;
}

.ref-cruzada-item p {
    margin: 0;
    font-style: italic;
    color: #555;
    line-height: 1.6;
}

.modal-loading {
    text-align: center;
    padding: 40px 20px;
}

.modal-loading .spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2c5e2e;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Versículo clicável */
.verse-item.clicavel {
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.verse-item.clicavel:hover {
    background: #fff8e1 !important;
    border-left-color: #f4b942 !important;
    transform: translateX(5px);
}

.icone-estudo {
    margin-left: auto;
    color: #f4b942;
    font-size: 1.2rem;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.verse-item.clicavel:hover .icone-estudo {
    opacity: 1;
}


/* ============================================
   🌙 DARK MODE MODERNO - SUBSTITUA A SEÇÃO ATUAL
   ============================================ */

:root{
    --dm-bg:#0f172a;
    --dm-card:#1e293b;
    --dm-card-2:#243447;
    --dm-input:#172554;
    --dm-border:rgba(255,255,255,.08);
    --dm-text:#f8fafc;
    --dm-muted:#cbd5e1;
    --dm-gold:#fbbf24;
}

body.dark-mode{
    background:var(--dm-bg)!important;
    color:var(--dm-text)!important;
}

/* Navbar */
body.dark-mode .navbar{
    background:#111827!important;
    border-bottom:1px solid var(--dm-border);
    box-shadow:0 4px 20px rgba(0,0,0,.35);
}

body.dark-mode .navbar button{
    background:#1f2937!important;
    color:var(--dm-text)!important;
    border:1px solid var(--dm-border)!important;
}

body.dark-mode .navbar button:hover,
body.dark-mode .navbar button.active{
    background:var(--dm-gold)!important;
    color:#111827!important;
}

/* Cards */
body.dark-mode .card{
    background:var(--dm-card)!important;
    color:var(--dm-text)!important;
    border:1px solid var(--dm-border)!important;
    box-shadow:0 8px 24px rgba(0,0,0,.25);
}

body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode label{
    color:var(--dm-gold)!important;
}

body.dark-mode .card h2{
    border-bottom:1px solid var(--dm-border)!important;
}

/* Inputs */
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea{
    background:var(--dm-input)!important;
    color:var(--dm-text)!important;
    border:1px solid var(--dm-border)!important;
}

body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus{
    border-color:var(--dm-gold)!important;
    box-shadow:0 0 0 3px rgba(251,191,36,.15)!important;
}

/* Botões */
body.dark-mode button{
    background:#1f2937!important;
    color:var(--dm-text)!important;
    border:1px solid var(--dm-border)!important;
}

body.dark-mode button:hover{
    background:var(--dm-gold)!important;
    color:#111827!important;
}

/* Bíblia */
body.dark-mode .bible-text{
    background:var(--dm-card)!important;
    border:1px solid var(--dm-border)!important;
}

body.dark-mode .verse-item{
    background:#16213e!important;
    border-left:4px solid var(--dm-gold)!important;
    color:var(--dm-text)!important;
    border-radius:8px;
}

body.dark-mode .verse-item:hover{
    background:#22304a!important;
    transform:translateX(3px);
}

body.dark-mode .verse-number{
    color:var(--dm-gold)!important;
}

/* Sermões */
body.dark-mode .sermao-output{
    background:var(--dm-card)!important;
    color:var(--dm-text)!important;
    border:1px solid var(--dm-border)!important;
}

/* Lista */
body.dark-mode .lista-item{
    background:var(--dm-card)!important;
    border-left:4px solid var(--dm-gold)!important;
}

/* Modal */
body.dark-mode .modal-estudo{
    background:var(--dm-card)!important;
    color:var(--dm-text)!important;
}

body.dark-mode .modal-estudo-header{
    background:#111827!important;
}

body.dark-mode .versiculo-base{
    background:#2b3548!important;
    color:var(--dm-text)!important;
    border-left:4px solid var(--dm-gold)!important;
}

body.dark-mode .estudo-secao h4,
body.dark-mode .estudo-conteudo h4{
    color:var(--dm-gold)!important;
}

body.dark-mode .estudo-secao p,
body.dark-mode .estudo-conteudo p,
body.dark-mode .estudo-secao li{
    color:var(--dm-muted)!important;
}

/* Sidebar */
body.dark-mode .sidebar{
    background:#111827!important;
}

body.dark-mode .sidebar-header h3{
    color:var(--dm-gold)!important;
}
/* Área de edição */
body.dark-mode .ql-editor,
body.dark-mode .note-editable,
body.dark-mode [contenteditable="true"]{
    background:#ffffff !important;
    color:#111827 !important;
}

/* Placeholder */
body.dark-mode .ql-editor.ql-blank::before{
    color:#6b7280 !important;
}

/* Toolbar */
body.dark-mode .ql-toolbar,
body.dark-mode .note-toolbar{
    background:#1e293b !important;
    border-color:rgba(255,255,255,.08)!important;
}

/* Botões da toolbar */
body.dark-mode .ql-toolbar button,
body.dark-mode .note-btn{
    color:#f8fafc !important;
}

/* ============================================
   RESPONSIVO
   ============================================ */
@media (max-width: 1200px) {
    .menu-hamburger {
        display: flex !important;
    }
    
    .navbar {
        display: none !important;
    }
    
    .categorias-grid {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 12px !important;
        margin-top: 50px !important;
    }
}

@media (max-width: 900px) {
    .categorias-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-group button {
        width: 100%;
    }
    
    .lista-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .categorias-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        margin-top: 55px !important;
    }
    
    .categoria-header {
        font-size: 0.75rem !important;
        padding: 8px 5px !important;
        min-height: 45px;
    }
    
    .select-tema {
        font-size: 0.75rem !important;
        padding: 6px 4px !important;
    }
    
    .categoria-count {
        font-size: 0.7rem !important;
        padding: 2px 6px !important;
    }
    
    .sidebar {
        width: 260px;
        left: -260px;
    }
    
    /* Leitura Bíblica Mobile */
    #leituraSection .card {
        padding: 15px !important;
        margin: 10px !important;
    }
    
    #leituraSection .card h2 {
        font-size: 1.2rem !important;
        margin-bottom: 15px !important;
        text-align: center;
    }
    
    #leituraSection .form-group {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
        margin-bottom: 15px !important;
    }
    
    #leituraSection .form-group > div {
        width: 100% !important;
        flex: none !important;
    }
    
    #leituraSection label {
        display: block !important;
        margin-bottom: 5px !important;
        font-weight: 600 !important;
        font-size: 0.9rem !important;
        color: #f4b942 !important;
    }
    
    #leituraSection select,
    #leituraSection input {
        width: 100% !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
        border-radius: 8px !important;
        border: 2px solid #ddd !important;
    }
    
    #leituraSection button {
        width: 100% !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
        margin: 5px 0 !important;
        border-radius: 8px !important;
    }
    
    #bibliaConteudo {
        padding: 15px !important;
        font-size: 0.95rem !important;
        line-height: 1.8 !important;
        max-height: 400px !important;
        overflow-y: auto !important;
    }
    
    #bibliaConteudo .verse-item {
        padding: 10px !important;
        margin-bottom: 8px !important;
        font-size: 0.9rem !important;
    }
    
    /* Modal Mobile */
    .modal-estudo-overlay {
        padding: 10px;
    }
    
    .modal-estudo {
        max-height: 95vh;
        border-radius: 10px;
    }
    
    .modal-estudo-header {
        padding: 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .modal-estudo-header h3 {
        font-size: 1.1rem;
    }
    
    .modal-estudo-body {
        padding: 15px;
    }
    
    .estudo-secao h4,
    .estudo-conteudo h4 {
        font-size: 1rem;
    }
    
    .versiculo-base {
        font-size: 0.95rem;
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .categorias-grid {
        grid-template-columns: 1fr !important;
        gap: 8px !important;
    }
    
    .categoria-header {
        font-size: 0.85rem !important;
        padding: 10px !important;
    }
    
    .select-tema {
        font-size: 0.85rem !important;
        padding: 8px !important;
    }
}

@media (min-width: 1600px) {
    .categorias-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (min-width: 1920px) {
    .categorias-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 20px;
    }
    
    .categoria-header {
        font-size: 0.9rem;
        padding: 12px 8px;
    }
}
/* SweetAlert2 customizado para dark mode */
body.dark-mode .swal2-popup {
    background: #16213e !important;
    color: #e0e0e0 !important;
}

body.dark-mode .swal2-title {
    color: #f4b942 !important;
}

body.dark-mode .swal2-html-container {
    color: #e0e0e0 !important;
}

body.dark-mode .swal2-confirm {
    background: #0f3460 !important;
    color: #e0e0e0 !important;
}

body.dark-mode .swal2-cancel {
    background: transparent !important;
    color: #e0e0e0 !important;
    border: 1px solid #e0e0e0 !important;
}

body.dark-mode .swal2-timer-progress-bar {
    background: #e94560 !important;
}

body.dark-mode .swal2-icon.swal2-warning {
    border-color: #f4b942 !important;
    color: #f4b942 !important;
}

body.dark-mode .swal2-icon.swal2-error {
    border-color: #e94560 !important;
    color: #e94560 !important;
}

body.dark-mode .swal2-icon.swal2-success {
    border-color: #2ecc71 !important;
    color: #2ecc71 !important;
}

body.dark-mode .swal2-icon.swal2-info {
    border-color: #3498db !important;
    color: #3498db !important;
}
/* ============================================
   CSS DE IMPRESSÃO
   ============================================ */
@media print {
    /* Reset geral */
    * {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    body {
        font-size: 12pt !important;
        line-height: 1.6 !important;
    }
    
    /* Esconder tudo que não é conteúdo */
    .navbar,
    .menu-hamburger,
    .sidebar,
    .sidebar-overlay,
    button,
    .btn-icon,
    .button-group,
    #btnDarkMode,
    #btnStats,
    .form-group,
    #loginSection,
    footer,
    header:not(.modal-estudo-header),
    .chat-message {
        display: none !important;
    }
    
    /* Mostrar apenas conteúdo ativo */
    .container,
    .section.active,
    .card {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
        background: white !important;
        overflow: visible !important;
    }
    
    /* Modal de estudo */
    .modal-estudo {
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
        box-shadow: none !important;
    }
    
    .modal-estudo-header {
        background: white !important;
        color: black !important;
        padding: 10px 0 !important;
        border-bottom: 2px solid #000 !important;
        position: static !important;
    }
    
    .modal-estudo-body {
        padding: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
    }
    
    /* Versículo base */
    .versiculo-base {
        border-left: 4px solid #000 !important;
        padding: 15px !important;
        margin: 20px 0 !important;
        page-break-inside: avoid !important;
    }
    
    /* Seções do estudo */
    .estudo-conteudo h4,
    .estudo-secao h4 {
        color: #000 !important;
        font-size: 14pt !important;
        margin-top: 20px !important;
        page-break-after: avoid !important;
        border-bottom: 1px solid #000 !important;
    }
    
    .estudo-conteudo p,
    .estudo-secao p {
        font-size: 12pt !important;
        line-height: 1.6 !important;
        text-align: justify !important;
    }
    
    /* Controle de quebras */
    h1, h2, h3, h4, h5 {
        page-break-after: avoid !important;
    }
    
    .ref-cruzada-item,
    .versiculo-base {
        page-break-inside: avoid !important;
    }
}
/* ========== SELECTS SWEETALERT ========== */
.sweet-select-btn {
    width: 100%;
    padding: 12px 15px;
    background: white;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    text-align: left;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #333;
}

.sweet-select-btn:hover {
    border-color: #2c5e2e;
    background: #f8f9fa;
}

.sweet-select-btn::after {
    content: '▼';
    font-size: 0.8rem;
    color: #666;
    margin-left: 10px;
}

.sweet-select-btn:disabled {
    background: #f0f0f0;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Popup do select */
.sweet-select-popup {
    border-radius: 12px !important;
}

/* ========== TOASTS ========== */
.swal2-toast {
    font-size: 1rem !important;
}

/* ========== RESPONSIVO ========== */
@media (max-width: 768px) {
    .sweet-select-btn {
        padding: 10px 12px;
        font-size: 0.95rem;
    }
}

/* ========== DARK MODE ========== */
body.dark-mode .sweet-select-btn {
    background: #1a1a2e;
    border-color: #444;
    color: #eee;
}

body.dark-mode .sweet-select-btn:hover {
    background: #2a2a3e;
    border-color: #f4b942;
}
/* Botão salvar versículo */
.btn-salvar-versiculo {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    background: #f4b942;
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-salvar-versiculo:hover {
    background: #e0a832;
    transform: scale(1.02);
}

.btn-salvar-versiculo:disabled {
    background: #2c5e2e;
    color: white;
    cursor: not-allowed;
}

/* Versículo */
.versiculo {
    padding: 15px;
    margin-bottom: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #2c5e2e;
}

.versiculo strong {
    color: #2c5e2e;
    font-size: 1.1rem;
}

/* Mobile */
@media (max-width: 768px) {
    .btn-salvar-versiculo {
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .versiculo {
        padding: 12px;
    }
}
/* ========== LEITURA BÍBLICA ========== */

/* Header do capítulo */
.capitulo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f0e8 100%);
    border-radius: 12px;
    margin-bottom: 20px;
    border: 2px solid #2c5e2e;
}

.capitulo-info h3 {
    margin: 0 0 5px 0;
    color: #2c5e2e;
    font-size: 1.3rem;
}

.capitulo-info span {
    color: #666;
    font-size: 0.9rem;
}

.btn-salvar-capitulo {
    background: #f4b942;
    color: #1a1a1a;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.btn-salvar-capitulo:hover {
    background: #e0a832;
    transform: scale(1.05);
}

/* Lista de versículos */
.lista-versiculos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.versiculo-item {
    display: flex;
    gap: 15px;
    padding: 18px 20px;
    background: #fffef0;
    border-left: 4px solid #f4b942;
    border-radius: 8px;
    transition: all 0.3s;
    align-items: flex-start;
}

.versiculo-item:hover {
    background: #fff9e0;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.versiculo-item.salvo {
    background: #e8f0e8;
    border-left-color: #2c5e2e;
}

.versiculo-numero {
    font-weight: bold;
    color: #2c5e2e;
    min-width: 35px;
    font-size: 1.2rem;
    text-align: center;
}

.versiculo-texto {
    flex: 1;
    line-height: 1.7;
    color: #333;
    font-size: 1.05rem;
}

/* ========== MOBILE ========== */
@media (max-width: 768px) {
    .capitulo-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 15px;
    }
    
    .btn-salvar-capitulo {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
    
    .versiculo-item {
        flex-direction: column;
        gap: 8px;
        padding: 12px;
    }
    
    .versiculo-numero {
        font-size: 1rem;
    }
    
    .versiculo-texto {
        font-size: 1rem;
    }
}

/* ========== DESKTOP ========== */
@media (min-width: 769px) {
    .capitulo-header {
        padding: 25px 30px;
    }
    
    .capitulo-info h3 {
        font-size: 1.5rem;
    }
    
    .versiculo-item {
        padding: 20px 25px;
    }
    
    .versiculo-numero {
        font-size: 1.3rem;
    }
    
    .versiculo-texto {
        font-size: 1.1rem;
    }
}
/* ============================================
   📱 LEITURA BÍBLICA — MODO LEITURA MOBILE
   (Adicionar no final do style.css)
   ============================================ */

@media (max-width: 768px) {
    
    /* ========================================
       MODO LEITURA: Esconde controles
       ======================================== */
    #leituraSection.modo-leitura .card > h2,
    #leituraSection.modo-leitura .card > .form-group {
        display: none !important;
    }
    
    #leituraSection.modo-leitura #bibliaConteudo {
        max-height: none !important;
        height: calc(100vh - 60px) !important;
        padding-top: 10px;
    }
    
    /* ========================================
       Botão 📕 de voltar controles
       ======================================== */
    #btnVoltarControles {
        animation: pulseLivro 2s infinite;
    }
    
    @keyframes pulseLivro {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.1); }
    }
}

/* ============================================
   🌙 DARK MODE — Botão voltar
   ============================================ */
@media (max-width: 768px) {
    body.dark-mode #btnVoltarControles {
        background: #111827 !important;
        border-color: #fbbf24 !important;
        color: #fbbf24 !important;
    }
}


/* ============================================
   📱 LEITURA BÍBLICA — MODO LEITURA MOBILE v2.2
   (Adicionar no FINAL do style.css)
   ============================================ */

@media (max-width: 768px) {

    /* ========================================
       MODO LEITURA: Esconde controles
       ======================================== */
    #leituraSection.modo-leitura .card > h2,
    #leituraSection.modo-leitura .card > .form-group {
        display: none !important;
    }

    #leituraSection.modo-leitura #bibliaConteudo {
        max-height: none !important;
        height: calc(100vh - 60px) !important;
        padding-top: 10px;
    }

    /* ========================================
       Botão 📕 no navbar
       ======================================== */
    .btn-voltar-controles-nav {
        animation: pulseLivro 2s infinite;
    }

    /* ========================================
       Botão 📕 flutuante (fallback PWA)
       ======================================== */
    .btn-voltar-controles-float {
        animation: pulseLivroFloat 2s infinite;
    }

    @keyframes pulseLivro {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.1); }
    }

    @keyframes pulseLivroFloat {
        0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
        50% { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0,0,0,0.4); }
    }

    /* ========================================
       Botão ✏️ Inserir flutuante
       ======================================== */
    .btn-inserir-flutuante {
        animation: pulseInserir 1.5s infinite;
    }

    @keyframes pulseInserir {
        0%, 100% { transform: scale(1); }
        50% { transform: scale(1.06); }
    }

    /* ========================================
       Click no versículo seleciona checkbox
       ======================================== */
    #bibliaConteudo .verse-item {
        cursor: pointer;
        position: relative;
        -webkit-tap-highlight-color: rgba(44, 94, 46, 0.1);
    }

    #bibliaConteudo .verse-item:active {
        background: #e8f5e9;
    }

    #bibliaConteudo .verse-item .checkbox-verse {
        cursor: pointer;
        z-index: 2;
        position: relative;
        min-width: 18px;
        min-height: 18px;
    }

    #bibliaConteudo .verse-item .icone-estudo {
        z-index: 2;
        position: relative;
    }
}

/* ============================================
   🌙 DARK MODE — Botões flutuantes
   ============================================ */
@media (max-width: 768px) {
    body.dark-mode .btn-voltar-controles-nav,
    body.dark-mode .btn-voltar-controles-float {
        background: #111827 !important;
        border-color: #fbbf24 !important;
        color: #fbbf24 !important;
    }

    body.dark-mode .btn-inserir-flutuante {
        background: #fbbf24 !important;
        color: #111827 !important;
    }

    body.dark-mode #bibliaConteudo .verse-item:active {
        background: #1e293b !important;
    }
}