/* Aparência do app. Cores, fontes e layout ficam aqui. */

/* ---------- Cores ---------- */
:root, [data-bs-theme="light"] {
  --acento: #d6194f;
  --acento-texto: #c4123f;
  --fundo-lateral: #ffffff;
  --superficie: #ffffff;
  --superficie-2: #f1efea;
  --borda: rgba(0, 0, 0, 0.1);
  --cor-lido: rgba(25, 135, 84, 0.14);
  --bs-body-bg: #f7f6f3;
  --bs-body-bg-rgb: 247, 246, 243;
  --bs-tertiary-bg: #ebe9e4;
}
[data-bs-theme="dark"] {
  --acento: #e11d58;
  --acento-texto: #ff5c8a;
  --fundo-lateral: #181818;
  --superficie: #202020;
  --superficie-2: #2a2a2a;
  --borda: rgba(255, 255, 255, 0.09);
  --cor-lido: rgba(25, 135, 84, 0.28);
  --bs-body-bg: #101010;
  --bs-body-bg-rgb: 16, 16, 16;
  --bs-tertiary-bg: #262626;
}
:root { --tamanho-texto: 1.2rem; --largura-lateral: 15rem; }

/* Bootstrap com a cor de destaque do app */
[data-bs-theme] { --bs-primary: var(--acento); --bs-primary-rgb: 214, 25, 79; --bs-link-color: var(--acento-texto); --bs-link-hover-color: var(--acento-texto); --bs-link-color-rgb: 196, 18, 63; }
.btn-primary { --bs-btn-bg: var(--acento); --bs-btn-border-color: var(--acento); --bs-btn-hover-bg: #b8143f; --bs-btn-hover-border-color: #b8143f;
  --bs-btn-active-bg: #a01237; --bs-btn-active-border-color: #a01237; --bs-btn-disabled-bg: var(--acento); --bs-btn-disabled-border-color: var(--acento); }
.btn-outline-primary { --bs-btn-color: var(--acento-texto); --bs-btn-border-color: var(--acento); --bs-btn-hover-bg: var(--acento); --bs-btn-hover-border-color: var(--acento);
  --bs-btn-active-bg: #a01237; --bs-btn-active-border-color: #a01237; }
.list-group { --bs-list-group-bg: var(--superficie); --bs-list-group-border-color: var(--borda); }
.form-control, .form-select { background-color: var(--superficie); }
dialog { color: var(--bs-body-color); }

body { background: var(--bs-body-bg); min-height: 100vh; }
.lista-limpa { list-style: none; margin: 0; padding: 0; }
.titulo-secao { font-size: 0.72rem; letter-spacing: 0.06em; color: var(--bs-secondary-color); font-weight: 600; margin: 0 0 0.5rem; }
.icone { flex: none; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100vh; }
.principal { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.conteudo { flex: 1; width: 100%; max-width: 62rem; margin: 0 auto; padding: 1rem 1.25rem 2rem; }

/* ---------- Barra lateral ---------- */
.sidebar { width: var(--largura-lateral); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--fundo-lateral); border-right: 1px solid var(--borda); padding: 1rem 0.75rem; display: flex; flex-direction: column; gap: 1rem; }
.sidebar-topo { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; }
.marca { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; font-size: 1.15rem; color: var(--bs-body-color); text-decoration: none; }
.marca img { border-radius: 8px; }
.btn-icone { width: 2.4rem; height: 2.4rem; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 999px;
  border: 1px solid var(--borda); background: transparent; color: var(--bs-body-color); }
.btn-icone:hover { background: var(--superficie-2); }
#menu-links { display: flex; flex-direction: column; gap: 0.25rem; }
#menu-links a { display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.75rem; border-radius: 0.7rem; color: var(--bs-body-color);
  text-decoration: none; font-weight: 500; font-size: 0.92rem; }
#menu-links a:hover { background: var(--superficie-2); }
#menu-links a.ativo { background: var(--superficie-2); font-weight: 700; }
#menu-links a.ativo .icone { color: var(--acento-texto); }
.recentes { border-top: 1px solid var(--borda); padding-top: 1rem; }
.recentes a { display: flex; justify-content: space-between; align-items: center; padding: 0.45rem 0.75rem; border-radius: 0.6rem; color: var(--bs-secondary-color); text-decoration: none; font-size: 0.88rem; }
.recentes a:hover { background: var(--superficie-2); color: var(--bs-body-color); }
.recentes small { font-size: 0.7rem; }
.link-doacao { margin-top: auto; display: flex; align-items: center; gap: 0.8rem; padding: 0.6rem 0.75rem; border-radius: 0.7rem; color: var(--acento-texto);
  text-decoration: none; font-weight: 600; font-size: 0.92rem; border: 1px solid var(--borda); }
.link-doacao:hover { background: var(--superficie-2); }
.sidebar-recolhida .link-doacao { justify-content: center; padding: 0.75rem 0; }
.sidebar-recolhida { --largura-lateral: 4.6rem; }
.sidebar-recolhida .rotulo, .sidebar-recolhida .recentes { display: none; }
.sidebar-recolhida .sidebar-topo { flex-direction: column; }
.sidebar-recolhida #menu-links a { justify-content: center; padding: 0.75rem 0; }

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.25rem;
  background: rgba(var(--bs-body-bg-rgb), 0.92); backdrop-filter: blur(8px); }
.busca { flex: 1; min-width: 0; max-width: 26rem; display: flex; align-items: center; gap: 0.6rem; background: var(--superficie); border: 1px solid var(--borda);
  border-radius: 999px; padding: 0 1rem; height: 2.6rem; color: var(--bs-secondary-color); }
.busca:focus-within { border-color: var(--acento); }
.busca input { flex: 1; min-width: 0; border: 0; background: transparent; outline: 0; color: var(--bs-body-color); font-size: 0.9rem; }
.busca input::-webkit-search-cancel-button { display: none; }
.topbar-direita { margin-left: auto; display: flex; align-items: center; gap: 0.6rem; }
.pill { display: inline-flex; align-items: center; height: 2.4rem; padding: 0 0.9rem; border: 1px solid var(--borda); border-radius: 999px;
  font-size: 0.8rem; font-weight: 700; background: var(--superficie); color: var(--bs-body-color); }
.pill-botao:hover { background: var(--superficie-2); }
.avatar { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--superficie-2); color: var(--bs-body-color); text-decoration: none; font-weight: 700; }
.avatar:hover { background: var(--acento); color: #fff; }
.painel-aa { min-width: 15rem; background: var(--superficie); border-color: var(--borda); }
.btn-group .btn.ativo { background: var(--acento); border-color: var(--acento); color: #fff; }

/* ---------- Cartões e início ---------- */
.hero { position: relative; overflow: hidden; border-radius: 1.4rem; padding: 2.5rem 2rem; margin-bottom: 1.25rem; border: 1px solid var(--borda);
  background: radial-gradient(120% 140% at 100% 0%, rgba(225, 29, 88, 0.35), transparent 55%), radial-gradient(90% 120% at 0% 100%, rgba(23, 104, 110, 0.35), transparent 60%), var(--superficie); }
.hero small { color: var(--bs-secondary-color); }
.hero-titulo { font-family: Georgia, "Times New Roman", serif; font-weight: 400; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; margin: 0.4rem 0 0; letter-spacing: -0.01em; }
.hero-titulo em { color: var(--acento-texto); }
.cartao { background: var(--superficie); border: 1px solid var(--borda); border-radius: 1.2rem; padding: 1.5rem; }
.row > [class*="col"] > .cartao { height: 100%; }
.cartao h2 { font-size: 1.25rem; font-weight: 700; }
.btn-pill { border-radius: 999px; padding-left: 1.25rem; padding-right: 1.25rem; font-weight: 600; }
/* VERSÍCULO DO DIA (DESATIVADO) */
/* .verso-dia { font-family: Georgia, "Times New Roman", serif; font-size: 1.15rem; line-height: 1.6; } */
.secao-titulo { font-size: 1.1rem; font-weight: 700; margin: 1.75rem 0 0.75rem; display: flex; justify-content: space-between; align-items: baseline; }
.secao-titulo a { font-size: 0.85rem; font-weight: 500; }
a.cartao-link { display: block; text-decoration: none; color: inherit; transition: transform 0.15s, border-color 0.15s; }
a.cartao-link:hover { transform: translateY(-2px); border-color: var(--acento); }

.guia { max-width: 46rem; margin: 0 auto; }
.guia li { margin-bottom: 0.35rem; }
.guia section { scroll-margin-top: 5rem; }

/* ---------- Leitor ---------- */
.leitor { max-width: 46rem; margin: 0 auto; padding-bottom: 6rem; }
.leitor-cabecalho { text-align: center; margin: 1.5rem 0 1.75rem; }
.titulo-seletor { border: 0; background: transparent; color: var(--bs-body-color); font-family: Georgia, "Times New Roman", serif; font-weight: 700;
  font-size: clamp(1.8rem, 4vw, 2.4rem); display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 0.6rem; padding: 0.1rem 0.6rem; }
.titulo-seletor:hover { background: var(--superficie-2); }
.texto-biblico { font-family: Georgia, "Times New Roman", serif; font-size: var(--tamanho-texto); line-height: 1.85; }
.versiculo { padding: 0.2rem 0.6rem; border-radius: 0.5rem; cursor: pointer; display: block; margin-bottom: 0.1rem; }
.versiculo:hover { background: var(--bs-tertiary-bg); }
.versiculo.lido { background: var(--cor-lido); }
.versiculo.selecionado { outline: 2px solid var(--acento); outline-offset: 1px; }
.versiculo.alvo { animation: piscar 2.2s ease-out; }
@keyframes piscar { 0%, 40% { background: rgba(225, 29, 88, 0.3); } 100% { background: transparent; } }
.versiculo .num { font-size: 0.7em; font-weight: 700; color: var(--acento-texto); margin-right: 0.4rem; vertical-align: super; }
.versiculo.cor-amarelo { box-shadow: inset 4px 0 0 #ffc107; }
.versiculo.cor-verde { box-shadow: inset 4px 0 0 #198754; }
.versiculo.cor-azul { box-shadow: inset 4px 0 0 #0d6efd; }
.versiculo.cor-rosa { box-shadow: inset 4px 0 0 #d63384; }
.icone-nota { margin-left: 0.4rem; color: var(--bs-secondary-color); vertical-align: middle; }
.nav-capitulo { position: sticky; bottom: 1.25rem; display: flex; justify-content: space-between; pointer-events: none; margin-top: 1.5rem; }
.seta { pointer-events: auto; width: 3rem; height: 3rem; border-radius: 0.9rem; display: inline-flex; align-items: center; justify-content: center;
  background: var(--superficie); border: 1px solid var(--borda); color: var(--bs-body-color); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25); text-decoration: none; }
.seta:hover { background: var(--acento); color: #fff; }

/* Barra de ações do versículo */
.barra-acoes { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap;
  justify-content: center; max-width: calc(100vw - 1.5rem); background: var(--superficie); border: 1px solid var(--borda); border-radius: 1rem; padding: 0.5rem 0.65rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }
.barra-acoes[hidden] { display: none; }
.barra-acoes .ref { font-weight: 700; font-size: 0.85rem; margin: 0 0.4rem; }
.barra-acoes .btn { display: inline-flex; align-items: center; gap: 0.35rem; }
.ponto { width: 1.7rem; height: 1.7rem; border-radius: 50%; border: 2px solid transparent; padding: 0; }
.ponto.ativo { border-color: var(--bs-body-color); }
.ponto-amarelo { background: #ffc107; } .ponto-verde { background: #198754; } .ponto-azul { background: #0d6efd; } .ponto-rosa { background: #d63384; }
.ponto-nenhum { background: transparent; border: 2px dashed var(--bs-secondary-color); }

/* ---------- Seletor de livro e capítulo ---------- */
.seletor { width: min(50rem, 96vw); height: min(34rem, 86vh); padding: 0; border: 1px solid var(--borda); border-radius: 1.2rem; background: var(--superficie); overflow: hidden; }
.seletor::backdrop { background: rgba(0, 0, 0, 0.6); }
.seletor-grade { display: grid; grid-template-columns: 17rem 1fr; height: 100%; }
.seletor-livros { overflow-y: auto; padding: 0.75rem; background: var(--superficie-2); }
.item-livro { width: 100%; display: flex; justify-content: space-between; align-items: center; border: 0; background: transparent; color: var(--bs-body-color);
  text-align: left; padding: 0.55rem 0.8rem; border-radius: 0.6rem; font-size: 1rem; }
.item-livro:hover { background: var(--bs-tertiary-bg); }
.item-livro.ativo { background: var(--bs-body-color); color: var(--bs-body-bg); font-weight: 600; }
.item-livro small { opacity: 0.7; }
.seletor-capitulos { padding: 1.25rem; overflow-y: auto; }
.seletor-capitulos header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.grade-capitulos { display: grid; grid-template-columns: repeat(auto-fill, minmax(3.6rem, 1fr)); gap: 0.5rem; }
.cap-btn { height: 3rem; display: flex; align-items: center; justify-content: center; border-radius: 0.6rem; background: var(--superficie-2); color: var(--bs-body-color);
  font-weight: 700; text-decoration: none; }
.cap-btn:hover { background: var(--bs-tertiary-bg); }
.cap-btn.completo { background: var(--cor-lido); }
.cap-btn.atual { background: var(--bs-body-color); color: var(--bs-body-bg); }

.tag { font-size: 0.8rem; }

/* ---------- Celular: menu embaixo ---------- */
@media (max-width: 767.98px) {
  .app { display: block; }
  .sidebar { position: fixed; top: auto; bottom: 0; left: 0; right: 0; width: 100%; height: auto; z-index: 30; flex-direction: row; padding: 0.35rem;
    border-right: 0; border-top: 1px solid var(--borda); }
  .sidebar-topo, .recentes, .link-doacao { display: none; }
  #menu-links { flex-direction: row; width: 100%; justify-content: space-around; }
  #menu-links a { flex-direction: column; gap: 0.15rem; font-size: 0.7rem; padding: 0.4rem 0.6rem; }
  .principal { padding-bottom: 4.5rem; }
  .topbar { padding: 0.6rem 0.75rem; gap: 0.5rem; }
  #pill-versao { display: none; }
  .conteudo { padding: 0.5rem 0.9rem 2rem; }
  .hero { padding: 1.75rem 1.25rem; }
  .barra-acoes { bottom: 5rem; }
  .nav-capitulo { bottom: 5rem; }
  .seletor-grade { grid-template-columns: 1fr; grid-template-rows: 40% 1fr; }
  .seletor { height: 90vh; }
}
