/* 🌍 Global Reset & Layout */
* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: #0f172a;
    color: #f1f5f9;
    margin: 0;
    padding: 20px 10px;
    display: flex;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.app-container {
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column !important;
}

/* 🎯 Header Element Setup */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    width: 100%;
}

.app-header h1 {
    font-size: 24px;
    font-weight: 800;
    margin: 0;
    background: linear-gradient(135deg, #ec4899, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-theme-toggle {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s;
    padding: 0;
}
.btn-theme-toggle:hover { transform: scale(1.2); }

.btn-add-nav {
    background: #ffffff;
    color: #0f172a;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
}

/* 📊 Grid Dashboard Component */
.pc-dashboard-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    clear: both !important;
}

.pc-stat-card {
    flex: 1 !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15) !important;
}

.stat-icon {
    font-size: 20px;
    background: rgba(255, 255, 255, 0.06);
    padding: 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.stat-info h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
}

.stat-info p {
    margin: 2px 0 0 0;
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
/* 📜 Daily Verse Canvas Component (Font Size Increased) */
.pc-verse-block {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.06) !important;
    padding: 16px 18px !important;
    border-radius: 14px !important;
    margin-bottom: 20px !important;
    width: 100% !important;
    display: block !important;
    clear: both !important;
    border-left: 5px solid var(--primary, #8b5cf6);
}

.verse-title {
    font-size: 12px !important;
    text-transform: uppercase;
    letter-spacing: 1px !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
    background: linear-gradient(135deg, #f472b6, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

#verse-text, #thought-text {
    margin: 0 0 8px 0 !important;
    font-size: 16.5px !important;
    line-height: 1.5 !important;
    font-style: italic;
    color: #f1f5f9 !important;
    font-weight: 700 !important;
}

#verse-ref {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #8b5cf6;
}
/* 🔍 Filter Container Tabs Element */
.filter-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 10px;
    margin-bottom: 20px;
    scrollbar-width: none;
    width: 100%;
}
.filter-container::-webkit-scrollbar { display: none; }

.filter-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
    white-space: nowrap;
    transition: all 0.2s;
    font-weight: 800 !important;
    letter-spacing: 0.3px !important;
}
.filter-btn:hover, .filter-btn.active {
    background: #8b5cf6;
    color: white;
    border-color: #8b5cf6;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.25);
}

/* 🗂️ Cards Stream Container Styles */
.prayer-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.prayer-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    width: 100%;
}

.card-category {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

/* 🚨 Urgent Tag Blinking Animation */
.tag-urgent-alert {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #f87171 !important;
    border: 1px solid rgba(239, 68, 68, 0.5) !important;
    animation: blinker-animation 1.2s linear infinite;
    font-weight: 800;
}
@keyframes blinker-animation {
    50% { opacity: 0.4; }
}

.card-name {
    font-size: 16px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 6px;
    margin-top: 6px;
}

.card-details {
    font-size: 14px;
    color: #cbd5e1;
    line-height: 1.5;
    margin-bottom: 14px;
}

.card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.btn-pray {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    gap: 5px;
}
.btn-pray:hover:not(:disabled) { 
    background: rgba(255, 255, 255, 0.15); 
    transform: scale(1.04);
}

.btn-pray:disabled {
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.pray-count {
    font-size: 12px;
    color: #94a3b8;
    font-weight: 500;
}

/* 🛡️ Admin Controls */
.btn-admin-edit, .btn-admin-delete {
    background: none;
    border: none;
    color: #64748b;
    font-size: 13px;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.2s;
}
.btn-admin-edit:hover { color: #3b82f6; }
.btn-admin-delete:hover { color: #ef4444; }

/* 💬 Comments Elements */
.comments-section {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.comments-list { max-height: 120px; overflow-y: auto; margin-bottom: 8px; }
.comment-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #cbd5e1;
    margin-bottom: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.comment-admin-actions { display: inline-flex; gap: 6px; font-size: 10px; }
.comment-admin-link { color: #64748b; cursor: pointer; }
.comment-admin-link.edt:hover { color: #3b82f6; }
.comment-admin-link.del:hover { color: #ef4444; }

.comment-form { display: flex; gap: 6px; margin-top: 6px; }
.input-comment {
    flex: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 10px;
    border-radius: 6px;
    color: white;
    font-size: 12px;
}
.btn-comment-submit {
    background: #8b5cf6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

/* 📥 Form Overlay Popup Elements */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center; z-index: 1000;
}
.modal-content {
    background: #1e293b; width: 90%; max-width: 400px;
    padding: 20px; border-radius: 14px; border: 1px solid rgba(255, 255, 255, 0.1);
}
.modal-content input[type="password"] {
    width: 100%; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px; border-radius: 8px; color: white; font-size: 13px;
}
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-header h2 { margin: 0; font-size: 18px; color: white; }
.btn-close { font-size: 20px; color: #64748b; cursor: pointer; }
.form-group { margin-bottom: 12px; }
.form-group label { display: block; font-size: 11px; text-transform: uppercase; color: #94a3b8; margin-bottom: 4px; font-weight: 600; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; background: rgba(0, 0, 0, 0.2); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 8px 12px; border-radius: 8px; color: white; font-size: 13px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.btn-cancel { background: none; border: none; color: #94a3b8; cursor: pointer; font-size: 13px; }
.btn-submit { background: linear-gradient(135deg, #ec4899, #8b5cf6); color: white; border: none; padding: 8px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; font-size: 13px; }

/* 📜 Custom Scrollbar for Legal Text Boxes */
.legal-scroll-box::-webkit-scrollbar { width: 5px; }
.legal-scroll-box::-webkit-scrollbar-track { background: rgba(0,0,0,0.1); border-radius: 10px; }
.legal-scroll-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

/* 🎨 Color Badges Fixed */
.tag-family { background: rgba(236, 72, 153, 0.15) !important; color: #ec4899 !important; border: 1px solid rgba(236, 72, 153, 0.3); }
.tag-health { background: rgba(239, 68, 68, 0.15) !important; color: #ef4444 !important; border: 1px solid rgba(239, 68, 68, 0.3); }
.tag-education { background: rgba(16, 185, 129, 0.15) !important; color: #10b981 !important; border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-job { background: rgba(59, 130, 246, 0.15) !important; color: #3b82f6 !important; border: 1px solid rgba(59, 130, 246, 0.3); }
.tag-work { background: rgba(245, 158, 11, 0.15) !important; color: #f59e0b !important; border: 1px solid rgba(245, 158, 11, 0.3); }
.tag-relationships { background: rgba(139, 92, 246, 0.15) !important; color: #8b5cf6 !important; border: 1px solid rgba(139, 92, 246, 0.3); }
.tag-loneliness { background: rgba(99, 102, 241, 0.15) !important; color: #6366f1 !important; border: 1px solid rgba(99, 102, 241, 0.3); }
.tag-financial { background: rgba(234, 179, 8, 0.15) !important; color: #eab308 !important; border: 1px solid rgba(234, 179, 8, 0.3); }
.tag-ministry { background: rgba(6, 182, 212, 0.15) !important; color: #06b6d4 !important; border: 1px solid rgba(6, 182, 212, 0.3); }
.tag-other { background: rgba(148, 163, 184, 0.15) !important; color: #94a3b8 !important; border: 1px solid rgba(148, 163, 184, 0.3); }

/* ☀️ High-Contrast Light Mode Rules */
body.light-mode {
    background: #f1f5f9;
    color: #0f172a;
}
body:not(.light-mode) {
    background: #0f172a !important;
    color: #f1f5f9 !important;
}
body.light-mode .pc-stat-card, 
body.light-mode .pc-verse-block, 
body.light-mode .prayer-card,
body.light-mode .modal-content {
    background: #ffffff; border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}
body.light-mode .stat-info h3 { color: #0f172a; }
body.light-mode .stat-info p { color: #475569; font-weight: 700; }
body.light-mode #verse-text, body.light-mode #thought-text { color: #1e293b !important; font-weight: 600 !important; }
body.light-mode .verse-title { color: #db2777 !important; font-weight: 800 !important; }
body.light-mode #verse-ref { color: #7c3aed !important; font-weight: 700 !important; }
body.light-mode .card-name { color: #0f172a; }
body.light-mode .card-details { color: #334155; }
body.light-mode .filter-btn { background: #e2e8f0; border-color: #cbd5e1; color: #475569; font-weight: 800 !important; }
body.light-mode .filter-btn.active { background: #8b5cf6; color: white; border-color: #8b5cf6; }
body.light-mode .comment-item { background: #f8fafc; color: #1e293b; border: 1px solid #e2e8f0; font-weight: 500; }
body.light-mode .input-comment, body.light-mode .form-group input, body.light-mode .form-group select, body.light-mode .form-group textarea, body.light-mode .modal-content input[type="password"] {
    background: #f8fafc; border-color: #cbd5e1; color: #0f172a;
}
body.light-mode .modal-header h2 { color: #0f172a; }
body.light-mode .btn-pray { background: #f1f5f9; border-color: #cbd5e1; color: #334155; }
body.light-mode .legal-scroll-box { color: #334155 !important; }
body.light-mode .app-footer { color: #475569 !important; border-top-color: #cbd5e1 !important; }
body.light-mode .app-footer span { color: #1e293b !important; }
/* ☀️ Fix for About and Contact Modal text readability in Light Mode */
body.light-mode #about-modal .modal-content,
body.light-mode #about-modal p,
body.light-mode #contact-modal .modal-content,
body.light-mode #contact-modal p {
    color: #1e293b !important;
}

body.light-mode #contact-modal div {
    background: #f1f5f9 !important;
    border-color: #cbd5e1 !important;
}
body:not(.light-mode) .btn-add-nav {
    background: #1e293b;
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.1);
}