*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
    max-width:100%;
    overflow-x:hidden;
}

body{
    font-family:'Poppins',Arial,sans-serif;
    background:#040816;
    color:#fff;
    min-height:100vh;
    overflow-x:hidden;
    position:relative;
}

body::before{
    content:"";
    position:fixed;
    inset:0;
    background:
        radial-gradient(circle at top left,rgba(91,95,255,.28),transparent 30%),
        radial-gradient(circle at bottom right,rgba(0,212,255,.12),transparent 35%),
        radial-gradient(circle at center,rgba(123,97,255,.08),transparent 40%);
    z-index:-2;
}

body::after{
    content:"";
    position:fixed;
    inset:0;
    background-image:
        linear-gradient(rgba(255,255,255,.02) 1px,transparent 1px),
        linear-gradient(90deg,rgba(255,255,255,.02) 1px,transparent 1px);
    background-size:40px 40px;
    z-index:-1;
}

img{
    max-width:100%;
    height:auto;
}

.app{
    width:100%;
    max-width:720px;
    margin:auto;
    padding:20px;
    padding-bottom:120px;
}

.topbar{
    position:sticky;
    top:0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    margin-bottom:30px;
    padding:15px 0;
    backdrop-filter:blur(18px);
    z-index:999;
}

.logo-area{
    display:flex;
    flex-direction:column;
    gap:2px;
}

.logo-main{
    font-size:22px;
    font-weight:800;
    letter-spacing:-.5px;
    background:linear-gradient(135deg,#ffffff,#b7c4ff);
    -webkit-background-clip:text;
    color:transparent;
    cursor:pointer;
}

.logo-sub{
    font-size:11px;
    opacity:.65;
    letter-spacing:1.5px;
}

.top-actions{
    display:flex;
    align-items:center;
    gap:12px;
}

.portal-btn,
.btn,
button{
    border:none;
    background:linear-gradient(135deg,#5b5fff,#7b61ff);
    color:#fff;
    padding:12px 16px;
    border-radius:14px;
    font-size:13px;
    font-weight:800;
    cursor:pointer;
    transition:.3s;
    box-shadow:0 10px 30px rgba(91,95,255,.25);
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:48px;
    font-family:'Poppins',Arial,sans-serif;
}

.portal-btn:hover,
.btn:hover,
button:hover{
    transform:translateY(-3px);
}

.btn.secondary,
.secondary{
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.12);
    box-shadow:none;
}

.user{
    width:45px;
    height:45px;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    border:1px solid rgba(255,255,255,.08);
    display:flex;
    align-items:center;
    justify-content:center;
    backdrop-filter:blur(10px);
}

.hero{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#5b5fff,#7b61ff);
    border-radius:35px;
    padding:35px;
    margin-bottom:35px;
    box-shadow:
        0 15px 60px rgba(91,95,255,.30),
        inset 0 1px 0 rgba(255,255,255,.15);
}

.hero::before{
    content:"";
    position:absolute;
    width:220px;
    height:220px;
    border-radius:50%;
    background:rgba(255,255,255,.12);
    top:-80px;
    right:-80px;
}

.hero::after{
    content:"✨";
    position:absolute;
    right:30px;
    bottom:25px;
    font-size:55px;
    opacity:.12;
}

.small{
    font-size:12px;
    opacity:.85;
    letter-spacing:2px;
    font-weight:700;
}

.hero h1{
    font-size:34px;
    margin:18px 0;
    line-height:1.2;
    position:relative;
    z-index:2;
}

.hero p{
    opacity:.92;
    line-height:1.8;
    font-size:15px;
    position:relative;
    z-index:2;
}

.section-title{
    font-size:20px;
    font-weight:800;
    margin-bottom:20px;
}

.books-section{
    margin-bottom:35px;
}

.daily-verse{
    margin-bottom:35px;
}

.daily-header{
    margin-bottom:15px;
    font-size:18px;
    font-weight:800;
}

.daily-card{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#141e3d,#1d2b59);
    border-radius:28px;
    padding:28px;
    border:1px solid rgba(255,255,255,.05);
    box-shadow:0 15px 40px rgba(0,0,0,.28);
}

.daily-card::before{
    content:"📖";
    position:absolute;
    right:20px;
    bottom:10px;
    font-size:60px;
    opacity:.08;
}

.daily-reference{
    font-size:14px;
    opacity:.7;
    margin-bottom:15px;
    color:#8ea6ff;
    font-weight:700;
}

.daily-content{
    line-height:1.9;
    font-size:16px;
    font-weight:500;
}

.reading-card{
    position:relative;
    overflow:hidden;
    background:linear-gradient(135deg,#111b38,#18264d);
    border-radius:28px;
    padding:24px;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:16px;
    margin-bottom:35px;
    border:1px solid rgba(255,255,255,.05);
    transition:.3s;
}

.reading-card:hover{
    transform:translateY(-5px);
}

.reading-card::before{
    content:"";
    position:absolute;
    width:120px;
    height:120px;
    border-radius:50%;
    background:rgba(123,97,255,.12);
    right:-40px;
    top:-40px;
}

.reading-card h3{
    margin-bottom:10px;
    font-size:22px;
    position:relative;
    z-index:2;
}

.reading-card p{
    font-size:14px;
    opacity:.75;
    max-width:300px;
    line-height:1.7;
    position:relative;
    z-index:2;
}

.books-grid{
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(210px,1fr));
    gap:18px;
    margin-top:20px;
}

.book-card,
.chapter-card{
    position:relative;
    overflow:hidden;
    min-height:120px;
    padding:24px 22px;
    border-radius:28px;
    border:1px solid rgba(255,255,255,.08);
    cursor:pointer;
    transition:.35s;
    box-shadow:0 15px 40px rgba(0,0,0,.18);
}

.book-card:nth-child(1n),
.chapter-card:nth-child(1n){
    background:linear-gradient(135deg,#5b5fff,#7b61ff);
}

.book-card:nth-child(2n),
.chapter-card:nth-child(2n){
    background:linear-gradient(135deg,#007cf0,#00dfd8);
}

.book-card:nth-child(3n),
.chapter-card:nth-child(3n){
    background:linear-gradient(135deg,#00b894,#00cec9);
}

.book-card:nth-child(4n),
.chapter-card:nth-child(4n){
    background:linear-gradient(135deg,#ff6b35,#ff9f43);
}

.book-card:nth-child(5n),
.chapter-card:nth-child(5n){
    background:linear-gradient(135deg,#8e2de2,#4a00e0);
}

.book-card:nth-child(6n),
.chapter-card:nth-child(6n){
    background:linear-gradient(135deg,#e84393,#fd79a8);
}

.book-card::before,
.chapter-card::before{
    content:"";
    position:absolute;
    width:130px;
    height:130px;
    border-radius:50%;
    background:rgba(255,255,255,.16);
    top:-45px;
    right:-45px;
}

.book-card::after{
    content:"📖";
    position:absolute;
    right:18px;
    bottom:12px;
    font-size:34px;
    opacity:.16;
}

.chapter-card::after{
    content:"Cap.";
    position:absolute;
    right:18px;
    bottom:13px;
    font-size:22px;
    font-weight:900;
    opacity:.18;
}

.book-card:hover,
.chapter-card:hover{
    transform:translateY(-8px) scale(1.02);
    box-shadow:0 25px 65px rgba(91,95,255,.32);
}

.book-card h3,
.book-card p,
.chapter-card h3,
.chapter-card p,
.chapter-card small{
    position:relative;
    z-index:2;
}

.book-card h3,
.chapter-card h3{
    font-size:22px;
    margin-bottom:10px;
    color:#fff;
}

.book-card p,
.chapter-card p{
    color:rgba(255,255,255,.88);
    font-weight:600;
    font-size:14px;
    line-height:1.7;
}

.chapter-card small{
    display:inline-flex;
    margin-top:12px;
    padding:7px 11px;
    border-radius:999px;
    background:rgba(0,0,0,.18);
    color:#fff;
    font-size:11px;
    font-weight:800;
}

.verses-list{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.verse-card{
    position:relative;
    background:rgba(255,255,255,.05);
    border-radius:24px;
    padding:22px;
    border:1px solid rgba(255,255,255,.08);
    line-height:1.9;
    backdrop-filter:blur(16px);
    transition:.3s;
    color:#fff;
}

.verse-card:hover{
    transform:translateY(-4px);
    background:rgba(255,255,255,.08);
}

.verse-card span{
    display:inline-flex;
    width:32px;
    height:32px;
    align-items:center;
    justify-content:center;
    background:linear-gradient(135deg,#5b5fff,#7b61ff);
    border-radius:50%;
    font-size:13px;
    font-weight:800;
    margin-bottom:14px;
    box-shadow:0 8px 20px rgba(91,95,255,.25);
}

.verse-card p{
    opacity:.95;
    font-size:16px;
}

.empty{
    opacity:.75;
    line-height:1.8;
    color:#cbd3ff;
}

.search-box{
    display:flex;
    gap:12px;
    margin-bottom:25px;
}

.search-box input,
.search-filters select,
input,
select,
textarea{
    background:rgba(255,255,255,.05);
    color:#fff;
    border:1px solid rgba(255,255,255,.08);
    border-radius:18px;
    padding:15px;
    outline:none;
    font-size:14px;
    backdrop-filter:blur(12px);
    font-family:'Poppins',Arial,sans-serif;
}

.search-box input{
    flex:1;
}

.search-filters{
    display:grid;
    grid-template-columns:1fr;
    gap:12px;
    margin-bottom:25px;
}

.bottom-nav{
    position:fixed;
    bottom:0;
    left:0;
    width:100%;
    background:rgba(8,14,32,.88);
    border-top:1px solid rgba(255,255,255,.06);
    display:flex;
    justify-content:space-around;
    align-items:center;
    padding:12px 10px;
    backdrop-filter:blur(24px);
    z-index:999;
    box-shadow:0 -10px 40px rgba(0,0,0,.35);
}

.nav-item{
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:5px;
    opacity:.65;
    transition:.35s;
    cursor:pointer;
    color:#fff;
    position:relative;
}

.nav-item span{
    font-size:22px;
}

.nav-item small{
    font-size:11px;
    font-weight:700;
}

.nav-item.active{
    opacity:1;
    color:#8a7cff;
}

.nav-item.active::before{
    content:"";
    position:absolute;
    top:-10px;
    width:35px;
    height:4px;
    border-radius:999px;
    background:#8a7cff;
}

.nav-item:hover{
    opacity:1;
    transform:translateY(-2px);
}

.install-app-box{
    margin:22px 0;
    padding:22px;
    border-radius:26px;
    background:linear-gradient(135deg,#5b5fff,#7b61ff);
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    box-shadow:0 18px 45px rgba(91,95,255,.28);
}

.install-app-box h3{
    margin-bottom:6px;
    font-size:20px;
}

.install-app-box p{
    color:rgba(255,255,255,.88);
    line-height:1.6;
}

.install-app-box button{
    background:#fff;
    color:#5b5fff;
}

.module-grid,
.feature-row,
.grid,
.quick,
.filters{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(220px,1fr));
    gap:16px;
}

.module-card,
.quick-card,
.card,
.box{
    background:rgba(255,255,255,.055);
    border:1px solid rgba(255,255,255,.10);
    border-radius:22px;
    padding:20px;
    color:#fff;
}

.module-card,
.quick-card{
    text-decoration:none;
    transition:.3s;
}

.module-card:hover,
.quick-card:hover{
    transform:translateY(-5px);
    background:linear-gradient(135deg,#5b5fff,#7b61ff);
}

.module-card p,
.quick-card p,
.card p,
.box p{
    color:#dce3ff;
    line-height:1.7;
    font-size:14px;
}

@media(max-width:768px){
    .app{
        max-width:100%;
        padding:16px;
        padding-bottom:115px;
    }

    .topbar,
    .top,
    .topbar-app,
    .tools,
    .actions{
        flex-direction:column;
        align-items:stretch;
    }

    .top-actions{
        width:100%;
    }

    .portal-btn,
    .btn,
    button{
        width:100%;
    }

    .hero{
        padding:24px;
        border-radius:26px;
    }

    .hero h1{
        font-size:28px;
        line-height:1.3;
    }

    .reading-card{
        flex-direction:column;
        align-items:stretch;
    }

    .books-grid,
    .module-grid,
    .feature-row,
    .grid,
    .quick,
    .filters{
        grid-template-columns:1fr;
    }

    .book-card,
    .chapter-card,
    .verse-card,
    .card,
    .quick-card,
    .module-card,
    .box{
        padding:18px;
    }

    table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }
}

/* ==========================================================================
   PORTAL DA BÍBLIA + PORTAL EBD
   TEMA UNIFICADO V152
   --------------------------------------------------------------------------
   Objetivo:
   - preservar toda a estrutura funcional já existente;
   - levar para o App Bíblia a identidade azul premium / violeta do Portal EBD;
   - transformar superfícies escuras em cartões claros;
   - manter hero, botões de ação e elementos ativos com gradiente institucional;
   - manter compatibilidade com estilos inline já existentes nas páginas.
   ========================================================================== */

:root{
    --portal-primary:#1554c0;
    --portal-primary-dark:#0a347c;
    --portal-secondary:#6d28d9;
    --portal-bg:#f5f7fb;
    --portal-surface:#ffffff;
    --portal-surface-soft:#f8faff;
    --portal-text:#14213d;
    --portal-muted:#667085;
    --portal-border:#e4e9f2;
    --portal-blue-soft:#eaf2ff;
    --portal-shadow:0 16px 40px rgba(16,24,40,.08);

    /* compatibilidade com páginas que usam estas variáveis */
    --p:#1554c0 !important;
    --s:#6d28d9 !important;
    --m:#667085 !important;
}

/* Base global */
html{
    background:var(--portal-bg) !important;
}

body{
    background:
        radial-gradient(circle at 8% 8%,rgba(21,84,192,.10),transparent 28rem),
        radial-gradient(circle at 92% 18%,rgba(109,40,217,.08),transparent 30rem),
        var(--portal-bg) !important;
    color:var(--portal-text) !important;
}

body::before{
    background:
        radial-gradient(circle at top left,rgba(21,84,192,.10),transparent 30%),
        radial-gradient(circle at bottom right,rgba(109,40,217,.07),transparent 35%),
        radial-gradient(circle at center,rgba(21,84,192,.035),transparent 40%) !important;
}

body::after{
    background-image:
        linear-gradient(rgba(20,33,61,.024) 1px,transparent 1px),
        linear-gradient(90deg,rgba(20,33,61,.024) 1px,transparent 1px) !important;
}

/* Aplicativo */
.app{
    color:var(--portal-text) !important;
}

/* Cabeçalho */
.topbar{
    margin:4px 0 26px !important;
    padding:12px 14px !important;
    border:1px solid rgba(228,233,242,.96) !important;
    border-radius:20px !important;
    background:rgba(245,247,251,.92) !important;
    box-shadow:0 10px 30px rgba(16,24,40,.065) !important;
    backdrop-filter:blur(22px) !important;
}

.logo-main{
    background:linear-gradient(
        135deg,
        var(--portal-primary-dark),
        var(--portal-primary),
        var(--portal-secondary)
    ) !important;
    -webkit-background-clip:text !important;
    color:transparent !important;
}

.logo-sub{
    color:var(--portal-muted) !important;
    opacity:1 !important;
}

.user{
    color:var(--portal-primary-dark) !important;
    background:#fff !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:0 6px 18px rgba(16,24,40,.05) !important;
}

/* Botões */
.portal-btn,
.btn,
button{
    background:linear-gradient(
        135deg,
        var(--portal-primary),
        var(--portal-secondary)
    ) !important;
    color:#fff !important;
    box-shadow:0 10px 26px rgba(21,84,192,.20) !important;
}

.btn.secondary,
.secondary{
    color:var(--portal-primary-dark) !important;
    background:#fff !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:none !important;
}

.portal-btn:hover,
.btn:hover,
button:hover{
    filter:brightness(.98);
}

/* Hero compartilhado */
.hero,
.books-hero{
    background:
        linear-gradient(
            135deg,
            var(--portal-primary-dark),
            var(--portal-primary) 58%,
            var(--portal-secondary)
        ) !important;
    color:#fff !important;
    box-shadow:0 20px 50px rgba(15,35,70,.16) !important;
}

.hero h1,
.hero p,
.books-hero h1,
.books-hero p{
    color:#fff !important;
}

.books-hero p,
.hero p{
    opacity:.90 !important;
}

/* Títulos e resumos */
.section-title,
.daily-header{
    color:var(--portal-text) !important;
}

.summary,
.empty{
    color:var(--portal-muted) !important;
}

/* Cartões principais */
.daily-card,
.reading-card,
.verse-card,
.module-card,
.quick-card,
.card,
.box{
    background:#fff !important;
    color:var(--portal-text) !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:var(--portal-shadow) !important;
}

.daily-reference{
    color:var(--portal-primary) !important;
    opacity:1 !important;
}

.daily-content,
.reading-card h3,
.reading-card p,
.verse-card p,
.module-card h3,
.quick-card h3,
.card h3,
.box h3{
    color:var(--portal-text) !important;
}

.reading-card p,
.module-card p,
.quick-card p,
.card p,
.box p{
    color:var(--portal-muted) !important;
    opacity:1 !important;
}

/* Livros e capítulos */
.book-card,
.chapter-card{
    background:#fff !important;
    color:var(--portal-text) !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:0 12px 30px rgba(16,24,40,.065) !important;
}

.book-card:nth-child(1n),
.book-card:nth-child(2n),
.book-card:nth-child(3n),
.book-card:nth-child(4n),
.book-card:nth-child(5n),
.book-card:nth-child(6n),
.chapter-card:nth-child(1n),
.chapter-card:nth-child(2n),
.chapter-card:nth-child(3n),
.chapter-card:nth-child(4n),
.chapter-card:nth-child(5n),
.chapter-card:nth-child(6n){
    background:#fff !important;
}

.book-card::before,
.chapter-card::before{
    background:rgba(21,84,192,.08) !important;
}

.book-card h3,
.chapter-card h3{
    color:var(--portal-text) !important;
}

.book-card p,
.chapter-card p{
    color:var(--portal-muted) !important;
}

.chapter-card small{
    color:var(--portal-primary-dark) !important;
    background:var(--portal-blue-soft) !important;
}

/* Página /biblia usa .grid e .card no CSS inline */
.books-page .card{
    background:#fff !important;
    color:var(--portal-text) !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:0 12px 30px rgba(16,24,40,.065) !important;
}

.books-page .card::before{
    background:rgba(21,84,192,.08) !important;
}

.books-page .card h3{
    color:var(--portal-text) !important;
}

.books-page .card p{
    color:var(--portal-muted) !important;
}

.books-page .tag{
    color:var(--portal-primary-dark) !important;
    background:var(--portal-blue-soft) !important;
    border:1px solid #dbe8ff !important;
}

/* Filtros da página de livros */
.controls input,
.search-box input,
.search-filters select,
input,
select,
textarea{
    background:#fff !important;
    color:var(--portal-text) !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:0 5px 16px rgba(16,24,40,.035) !important;
}

.controls input::placeholder,
.search-box input::placeholder,
input::placeholder,
textarea::placeholder{
    color:#98a2b3 !important;
}

.filters .filter,
.filter{
    color:#475467 !important;
    background:#fff !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:none !important;
}

.filters .filter:hover,
.filter:hover{
    color:var(--portal-primary) !important;
    background:#eef4ff !important;
    transform:translateY(-2px);
}

.filters .filter.active,
.filter.active{
    color:#fff !important;
    background:linear-gradient(
        135deg,
        var(--portal-primary),
        var(--portal-secondary)
    ) !important;
    border-color:transparent !important;
}

/* Versículos */
.verse-card{
    backdrop-filter:none !important;
}

.verse-card:hover{
    background:#fbfcff !important;
    border-color:#d6e3ff !important;
}

.verse-card span{
    color:#fff !important;
    background:linear-gradient(
        135deg,
        var(--portal-primary),
        var(--portal-secondary)
    ) !important;
    box-shadow:0 8px 18px rgba(21,84,192,.18) !important;
}

/* Instalar app */
.install-app-box{
    background:linear-gradient(
        135deg,
        var(--portal-primary-dark),
        var(--portal-primary),
        var(--portal-secondary)
    ) !important;
    box-shadow:0 18px 42px rgba(21,84,192,.20) !important;
}

.install-app-box h3,
.install-app-box p{
    color:#fff !important;
}

.install-app-box button{
    background:#fff !important;
    color:var(--portal-primary) !important;
}

/* Navegação inferior */
.bottom-nav{
    background:rgba(255,255,255,.94) !important;
    border-top:1px solid var(--portal-border) !important;
    box-shadow:0 -10px 32px rgba(16,24,40,.09) !important;
    backdrop-filter:blur(24px) !important;
}

.nav-item{
    color:#667085 !important;
    opacity:.80 !important;
}

.nav-item.active{
    color:var(--portal-primary) !important;
    opacity:1 !important;
}

.nav-item.active::before{
    background:linear-gradient(
        90deg,
        var(--portal-primary),
        var(--portal-secondary)
    ) !important;
}

/* Hover de módulos sem voltar ao visual escuro */
.module-card:hover,
.quick-card:hover{
    color:var(--portal-text) !important;
    background:#f8faff !important;
    border-color:#d6e3ff !important;
}

/* Estado/status */
.status{
    color:var(--portal-muted) !important;
    background:#fff !important;
    border:1px solid var(--portal-border) !important;
    box-shadow:0 8px 22px rgba(16,24,40,.05) !important;
}

/* Acessibilidade */
button:focus-visible,
.portal-btn:focus-visible,
.btn:focus-visible,
.card:focus-visible,
.book-card:focus-visible,
.chapter-card:focus-visible,
.nav-item:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible{
    outline:none !important;
    box-shadow:0 0 0 4px rgba(21,84,192,.14) !important;
}

/* Mobile */
@media(max-width:768px){
    .topbar{
        flex-direction:row !important;
        align-items:center !important;
    }

    .top-actions{
        width:auto !important;
    }

    .portal-btn{
        width:auto !important;
    }

    .hero,
    .books-hero{
        border-radius:26px !important;
    }

    .books-page .grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    }

    .books-page .card{
        padding:15px !important;
    }
}

@media(max-width:390px){
    .books-page .grid{
        grid-template-columns:1fr !important;
    }
}