/* --- VARIÁVEIS E TEMA --- */
:root {
    --bg-body: #F4F7F6; --bg-card: #FFFFFF; --bg-header: rgba(44, 62, 80, 0.95);
    --bg-footer: #FFFFFF; --azul-principal: #2C3E50; --verde-destaque: #2ECC71;
    --cinza-icones: #BDC3C7; --texto-p: #556677; --texto-h: #2C3E50;
    --sombra: 0 4px 12px rgba(0, 0, 0, 0.08);
    --font-reader: 1.05rem;
    --highlighter: #fff176;
}

body.dark-mode {
    --bg-body: #121212; --bg-card: #121212; --bg-header: rgba(26, 26, 26, 0.95);
    --bg-footer: #121212; --texto-p: #B0B0B0; --texto-h: #E0E0E0;
    --sombra: none;
    --highlighter: #fbc02d;
}

/* --- BASE DO CORPO --- */
body {
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-body);
    margin: 0; 
    color: var(--texto-h);
    transition: background 0.3s ease; 
    overflow-x: hidden;
    padding-bottom: 60px;
}

/* --- CABEÇALHO --- */
.header {
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000; 
    box-sizing: border-box; 
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--sombra);
}

.header h2 { 
    font-size: 1.3rem; 
    font-weight: 300; 
    letter-spacing: -0.5px; 
    margin: 0;
    border-left: 2px solid var(--verde-destaque); 
    padding-left: 10px;
    display: flex;
    align-items: center;
}

.header h2 b {
    font-weight: 600;
    color: white;
}

/* --- BOTÕES DE AÇÃO DO HEADER --- */
.actions { display: flex; gap: 8px; }
.btn-action {
    cursor: pointer; background: rgba(255, 255, 255, 0.12);
    width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    color: white; display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease; font-size: 1rem;
}

/* --- TRANSIÇÕES E SEÇÕES --- */
.view-section { display: none; animation: fadeIn 0.4s ease; }
.view-section.active { display: block; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* --- CARD DE CONTEÚDO PRINCIPAL --- */
.content-card {
    margin-top: 60px; 
    padding: 30px 20px 30px 20px;
    background: var(--bg-card);
    min-height: calc(100vh - 135px); 
    position: relative; 
    box-sizing: border-box;
}

/* --- BÍBLIA: SELETORES ESTILO VIDRO --- */
.bible-selector { 
    display: flex; 
    flex-direction: row; 
    gap: 8px; 
    margin-bottom: 25px; 
    align-items: center;
    background: rgba(255, 255, 255, 0.4); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 8px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

body.dark-mode .bible-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.bible-selector input {
    padding: 10px;
    border-radius: 14px; 
    border: none;
    background: rgba(255, 255, 255, 0.5); 
    color: var(--texto-h); 
    font-size: 16px; 
    outline: none;
    box-sizing: border-box;
    height: 40px;
    margin: 0;
    font-weight: 500;
    -webkit-text-size-adjust: 100%;
}

body.dark-mode .bible-selector input {
    background: rgba(0, 0, 0, 0.2);
    color: #fff;
}

.bible-selector input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px var(--verde-destaque);
}

input[type=number]::-webkit-inner-spin-button, 
input[type=number]::-webkit-outer-spin-button { 
    -webkit-appearance: none; 
    margin: 0; 
}

.btn-glass {
    background: var(--verde-destaque);
    color: white; border: none;
    width: 40px; height: 40px; border-radius: 14px;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: all 0.3s ease; box-shadow: 0 4px 12px rgba(46, 204, 113, 0.3);
    flex-shrink: 0;
}

.bible-reader { line-height: 1.8; font-size: var(--font-reader); }

.verse-p { 
    padding: 5px 8px; 
    margin: 0 -8px; 
    border-radius: 6px; 
    cursor: pointer; 
    transition: background 0.3s ease;
}

.verse-p.highlighted {
    background-color: var(--highlighter);
    color: #000 !important;
}

.verse-num { color: var(--verde-destaque); font-weight: 600; margin-right: 8px; font-size: 0.85em; }

/* --- ORAÇÕES --- */
.prayer-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-body);
    padding: 16px;
    margin-bottom: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.03);
}
.prayer-list-item:active { transform: scale(0.98); }
.prayer-list-item span { font-weight: 500; font-size: 0.95rem; }

.prayer-guide-glass {
    max-height: 0;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    transition: all 0.5s ease;
    margin: 0 auto;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--texto-p);
    font-style: italic;
}

.prayer-guide-glass.show {
    max-height: 200px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .prayer-guide-glass {
    background: rgba(0, 0, 0, 0.2);
}

/* ESTILOS DO STORIES FULLSCREEN */
#story-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 10000;
    background: #000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.story-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
    z-index: -1;
}

.story-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 40%, rgba(0,0,0,0.7) 100%);
    z-index: 0;
}

.story-header {
    position: absolute;
    top: 45px;
    width: 90%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
}

.story-progress {
    position: absolute;
    top: 35px;
    width: 90%;
    height: 2px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
}

.story-progress-fill {
    height: 100%;
    width: 100%;
    background: #fff;
    animation: progressRun 10s linear;
}

@keyframes progressRun { from { width: 0%; } to { width: 100%; } }

.story-content {
    padding: 40px;
    z-index: 5;
    text-align: center;
    width: 100%;
}

.story-text {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: 1.8rem;
    line-height: 1.4;
    margin-bottom: 25px;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
}

.story-ref {
    font-family: 'Inter', sans-serif;
    color: #2ECC71;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.story-footer {
    position: absolute;
    bottom: 40px;
    width: 100%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 10;
}

.story-action-btn {
    color: #fff;
    font-size: 1.8rem;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.5));
    cursor: pointer;
    transition: transform 0.2s;
}

.story-action-btn:active { transform: scale(0.9); }
.story-action-btn.liked { color: #e74c3c; animation: heartBeat 0.4s; }

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

.btn-close-story {
    color: #fff;
    font-size: 1.5rem;
    background: none;
    border: none;
    padding: 10px;
}

/* --- MELHORIA VISUAL DO VERSÍCULO (STORE/STORY INDICATOR) --- */
.verse-story-wrapper {
    position: relative;
    padding: 15px;
    margin: 15px 0;
    border-radius: 12px;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-card, #fff), var(--bg-card, #fff)) padding-box,
                linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%) border-box;
    cursor: pointer;
    transition: transform 0.2s ease;
    animation: pulse-story 2.5s infinite;
}

.verse-story-wrapper:active { transform: scale(0.97); }

.verse-story-wrapper::after {
    content: 'STORY';
    position: absolute;
    top: -10px;
    right: 15px;
    background: #dc2743;
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

@keyframes pulse-story {
    0% { box-shadow: 0 0 0 0 rgba(220, 39, 67, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(220, 39, 67, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 39, 67, 0); }
}

#bible-text { cursor: pointer; margin: 0; }

/* --- NAVEGAÇÃO INFERIOR --- */
.footer-nav {
    position: fixed; 
    bottom: 0; 
    left: 0;
    width: 100%; 
    height: 75px;
    background: var(--bg-footer); 
    display: flex; 
    justify-content: space-around;
    align-items: center; 
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    box-sizing: border-box;
}

.nav-item {
    text-decoration: none; color: var(--cinza-icones);
    display: flex; flex-direction: column; align-items: center; flex: 1; cursor: pointer;
}

.nav-item.active { color: var(--verde-destaque); }
.nav-item i { font-size: 1.4rem; margin-bottom: 4px; }
.nav-item span { font-size: 0.7rem; font-weight: 500; }

/* --- LOGO E ASSINATURA --- */
.logo-container { display: flex; align-items: center; gap: 8px; }
.logo-icon { color: var(--verde-destaque); font-size: 1.1rem; }

/* --- MODAL E PIX --- */
.modal-overlay {
    position: fixed;
    top: 0; 
    left: 50%; 
    transform: translateX(-50%); 
    width: 100vw; 
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none; 
    justify-content: center;
    align-items: center;
    z-index: 9999; 
}

.modal-content {
    background: var(--bg-card);
    width: 85%; 
    max-width: 300px; 
    padding: 20px;
    border-radius: 28px; 
    text-align: center;
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* --- MODAL DE INSTALAÇÃO IOS --- */
.ios-install-modal {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    width: 90%;
    max-width: 350px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 20px;
    z-index: 10001;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.4);
    text-align: center;
}

.ios-install-modal.show { transform: translateX(-50%) translateY(0); }

.ios-install-modal h4 { margin: 0 0 10px 0; color: var(--azul-principal); }

.install-step {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    text-align: left;
    font-size: 0.9rem;
    color: var(--texto-p);
}

.install-step i {
    font-size: 1.2rem;
    color: var(--verde-destaque);
    width: 25px;
    text-align: center;
}

.btn-close-install {
    margin-top: 10px;
    background: var(--verde-destaque);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
}

@keyframes modalPop { from { transform: scale(0.8); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.qr-placeholder {
    width: 140px; 
    height: 140px;
    background: white;
    margin: 15px auto;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0,0,0,0.05);
}

.pix-key-box {
    background: var(--bg-body);
    padding: 10px;
    border-radius: 12px;
    font-size: 0.75rem; 
    word-break: break-all;
    margin: 12px 0;
    border: 1px solid rgba(0,0,0,0.03);
    color: var(--texto-p);
    font-weight: 500;
}

.btn-close-modal {
    background: none; border: none; color: var(--cinza-icones);
    font-size: 0.9rem; cursor: pointer; margin-top: 10px; text-decoration: underline;
}

/* --- CARD DE REVIEW GLASS --- */
.review-glass-card {
    margin-top: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

body.dark-mode .review-glass-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.review-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--texto-h);
}

.star-rating {
    display: flex;
    justify-content: center;
    gap: 12px;
    direction: row;
}

.star-rating i {
    font-size: 1.8rem;
    color: rgba(189, 195, 197, 0.4); 
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.star-rating i.active {
    color: #FFD700;
    transform: scale(1.2);
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

.star-rating i:active { transform: scale(0.9); }

/* --- TELA DE CARREGAMENTO (SPLASH) --- */
#splash-screen {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100dvh;
    background-color: var(--bg-body);
    display: flex; flex-direction: column;
    justify-content: center; align-items: center;
    z-index: 99999;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.splash-logo {
    font-size: 4rem;
    color: var(--verde-destaque);
    animation: pulse-dove 1.8s infinite ease-in-out;
}

.splash-title {
    margin-top: 20px;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--azul-principal);
    letter-spacing: -1px;
}

.splash-title b { font-weight: 600; }

@keyframes pulse-dove {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.15); opacity: 1; }
}

.splash-hidden {
    opacity: 0;
    visibility: hidden;
}

/* =========================================================
   LAYOUY DESKTOP FULLSCREEN (100% TELA)
   ========================================================= */
#desktop-blocker {
    display: none; position: fixed; top: 0; left: 0; 
    width: 100vw; height: 100vh; background: #fff;
    z-index: 20000; font-family: 'Inter', sans-serif; overflow: hidden;
}

.desktop-container { display: flex; width: 100%; height: 100%; }

.desktop-visual {
    flex: 1.2; padding: 60px; color: white; text-align: center;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: linear-gradient(rgba(46, 204, 113, 0.8), rgba(44, 62, 80, 0.9)), 
                url('https://images.unsplash.com/photo-1504052434569-70ad5836ab65?q=80&w=2070&auto=format&fit=crop') center/cover;
}

.desktop-info {
    flex: 0.8; background: #f8fbf9; padding: 60px 40px; box-sizing: border-box;
    display: flex; flex-direction: column; justify-content: space-around; align-items: center;
}

.desktop-brand h1 { font-family: 'Playfair Display', serif; font-size: 3.5rem; color: #2C3E50; margin: 20px 0; }
.desktop-brand b { color: #2ECC71; }

.qr-box {
    background: white; padding: 35px; border-radius: 30px; text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.06); border: 1px solid #edf2f0;
    display: flex; flex-direction: column; align-items: center; max-width: 350px;
}

.qr-placeholder-img {
    width: 200px; height: 200px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
}

.app-badges { display: flex; gap: 15px; justify-content: center; margin-top: 20px; }
.app-badges img { height: 45px; cursor: pointer; }

@media (min-width: 1025px) {
    #desktop-blocker { display: block; }
}

/* --- CARD DE AJUDA --- */
.help-card {
    margin-top: 25px; padding: 20px;
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1) 0%, rgba(44, 62, 80, 0.05) 100%);
    border-radius: 20px; border: 1px dashed var(--verde-destaque); text-align: center;
}
.help-title {
    font-size: 1rem; font-weight: 600; color: var(--texto-h);
    margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.help-info { font-size: 0.85rem; color: var(--texto-p); line-height: 1.5; margin-bottom: 15px; }
.btn-help {
    background: var(--azul-principal); color: white; border: none;
    padding: 10px 20px; border-radius: 12px; font-size: 0.85rem;
    font-weight: 600; cursor: pointer; transition: all 0.3s ease;
    display: inline-flex; align-items: center; gap: 8px;
}
.btn-help:active { transform: scale(0.95); }
body.dark-mode .help-card { background: rgba(255, 255, 255, 0.03); }

/* --- SISTEMA --- */
.loader { 
    border: 2px solid var(--cinza-icones); border-top: 2px solid var(--verde-destaque); 
    border-radius: 50%; width: 18px; height: 18px; 
    animation: spin 0.8s linear infinite; display: inline-block; margin-right: 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* --- ROSÁRIO / TERÇO --- */
.rosary-container {
    margin-top: 40px; padding: 20px;
    background: rgba(44, 62, 80, 0.05); border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: 20px; text-align: center;
}
body.dark-mode .rosary-container { background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); }
.rosary-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--verde-destaque); font-weight: 600; }
.rosary-count { font-size: 3rem; font-weight: 300; margin: 10px 0; color: var(--texto-h); }
.rosary-date { font-size: 0.7rem; color: var(--cinza-icones); margin-bottom: 15px; display: block; }
.rosary-actions { display: flex; justify-content: center; gap: 15px; }
.btn-rosary-main {
    background: var(--verde-destaque); border: none; color: white;
    width: 60px; height: 60px; border-radius: 50%; font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3); cursor: pointer;
}
.btn-rosary-reset {
    background: none; border: 1px solid var(--cinza-icones); color: var(--cinza-icones);
    padding: 0 15px; border-radius: 10px; font-size: 0.8rem; cursor: pointer;
}