:root {
    --primary: #1a2a6c;
    --secondary: #b21f1f;
    --accent: #fdbb2d;
    --bg-dark: #0f172a;
    --bg-glass: rgba(30, 41, 59, 0.7);
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Calendário Minimalista Premium */
.minimal-calendar-header {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 25px;
    padding: 10px 0;
}

.calendar-chip {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 12px 25px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.calendar-chip:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.calendar-chip i {
    color: var(--accent);
    font-size: 1.1rem;
}

.calendar-chip span {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: capitalize;
}

/* Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #312e81 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    min-height: 100vh;
    padding-bottom: 80px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header & Date Styling */
header {
    text-align: center;
    padding: 40px 0;
}

h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.date-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--bg-glass);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 20px;
}

/* Cards & Content */
.card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
}

.card-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 12px;
}

.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    margin-bottom: 16px;
    color: #fff;
}

.reading-text {
    font-family: 'Lora', serif;
    line-height: 1.9;
    font-size: 1.05rem;
    color: #e2e8f0;
    letter-spacing: 0.01em;
    word-break: break-word;
}

.reading-text p {
    margin-bottom: 1.2rem;
}

.reading-text strong {
    color: var(--accent);
    font-weight: 700;
}

.liturgy-meta {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 10px;
}

.tag {
    font-size: 0.7rem;
    padding: 4px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.1);
}

/* Bottom Nav */
.nav-bar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    display: flex;
    justify-content: space-around;
    padding: 12px;
    z-index: 1000;
}

.nav-item {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.7rem;
    gap: 4px;
}

.nav-item.active {
    color: var(--accent);
}

.nav-item i {
    font-size: 1.2rem;
}

/* Loading Animation */
.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 1.8rem;
    }

    .card {
        padding: 20px;
    }
}

/* Auth Elements */
.auth-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    padding: 15px;
    border-radius: 15px;
    color: white;
    margin-bottom: 12px;
    font-size: 1rem;
}

.auth-input:focus {
    outline: none;
    border-color: var(--accent);
}

.btn-primary {
    width: 100%;
    background: var(--accent);
    color: #000;
    border: none;
    padding: 15px;
    border-radius: 15px;
    font-weight: 800;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* Page Loader override for buttons */
.btn-primary .loader {
    width: 20px;
    height: 20px;
    border-width: 3px;
}

/* Botões de Ação por Card (Premium) */
.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.card-actions-mini {
    display: flex;
    gap: 15px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.card-actions-mini i {
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-actions-mini i:hover {
    color: var(--accent);
    transform: scale(1.2);
}

.card-actions-mini i.fa-check {
    color: #22c55e;
}

/* Antigos botões globais - Ocultar */
.share-actions {
    display: none !important;
}

/* Hero Section Premium */
.hero-section {
    position: relative;
    width: calc(100% + 40px);
    margin-left: -20px;
    height: 300px;
    background: url('hero.png') center/cover no-repeat;
    border-radius: 0 0 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: -40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, var(--bg-dark));
    border-radius: 0 0 40px 40px;
}

.hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--accent);
    text-shadow:
        1px 1px 0 #fff,
        -1px -1px 0 #fff,
        1px -1px 0 #fff,
        -1px 1px 0 #fff,
        2px 2px 10px rgba(0, 0, 0, 0.8);
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.home-search {
    width: 90%;
    background: white;
    padding: 12px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 3;
    margin-top: 20px;
}

.home-search input {
    border: none;
    outline: none;
    flex: 1;
    font-size: 0.9rem;
    color: #333;
    margin-left: 10px;
}

.home-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 60px;
}

.home-tile {
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #008eb7 0%, #004e92 100%);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    gap: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.home-tile:nth-child(even) {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.home-tile:nth-child(3) {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.home-tile:nth-child(4) {
    background: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
}

.home-tile i {
    font-size: 2.2rem;
}

.home-tile span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Remover padding lateral no container quando for home */
.home-active .container {
    padding-top: 0;
}

.home-active header {
    display: none;
}

/* Catecismo Tabs */
.catechism-tabs {
    background: rgba(255, 255, 255, 0.03);
    padding: 5px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.tab-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.tab-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.05) !important;
}

.tab-btn.active {
    box-shadow: 0 4px 15px rgba(253, 187, 45, 0.3);
}

/* Catecismo Styles */
.pilar-card {
    background: var(--bg-glass);
    padding: 20px;
    border-radius: 18px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
}

.pilar-card:hover {
    transform: scale(1.02);
    background: rgba(255, 255, 255, 0.08);
}

.pilar-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pilar-info i {
    font-size: 1.5rem;
}

.pilar-info h3 {
    font-size: 1rem;
    font-weight: 700;
}

.pergunta-item {
    padding: 15px;
    border-bottom: 1px solid var(--glass-border);
    cursor: pointer;
}

.pergunta-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.pergunta-num {
    background: var(--accent);
    color: #000;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    white-space: nowrap;
}

.pergunta-txt {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
}

.resposta-txt {
    display: none;
    margin-top: 15px;
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
}

.pergunta-item.active .resposta-txt {
    display: block;
    animation: fadeIn 0.3s ease;
}

.pergunta-item.active .pergunta-txt {
    color: var(--accent);
}

/* Animação Pulsante para a Cruz */
.pulse-loader {
    display: inline-block;
}

@keyframes pulse-glow {
    0% {
        transform: scale(1);
        opacity: 0.7;
        filter: drop-shadow(0 0 0px var(--accent));
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
        filter: drop-shadow(0 0 10px var(--accent));
    }

    100% {
        transform: scale(1);
        opacity: 0.7;
        filter: drop-shadow(0 0 0px var(--accent));
    }
}

/* PWA Install Styles */
.install-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 400px;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--accent);
    border-radius: 20px;
    padding: 30px;
    z-index: 10000;
    text-align: center;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: modalFadeIn 0.3s ease-out;
}

.install-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
}

.ios-install-prompt {
    position: fixed;
    bottom: 20px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 20px;
    border-radius: 15px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -40%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.btn-install {
    background: var(--accent);
    color: #000;
    border: none;
    padding: 12px 25px;
    border-radius: 10px;
    font-weight: bold;
    margin-top: 20px;
    cursor: pointer;
    width: 100%;
}

/* Auth Styles & Password Toggle Management */
.auth-input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1rem;
}

.password-container {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.password-container .auth-input {
    margin-bottom: 0 !important;
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.3s;
    z-index: 10;
    padding: 10px;
    display: flex;
    align-items: center;
}

.password-toggle:hover {
    color: var(--accent);
}