/* ============================================
   DOMINION AI BIBLE WIDGET - EMBEDDABLE STYLES
   Scoped to widget elements only
   ============================================ */

#dominion-ai-root *, #dominion-ai-root *::before, #dominion-ai-root *::after,
.thread-overlay *, .thread-overlay *::before, .thread-overlay *::after,
.edit-modal-overlay *, .edit-modal-overlay *::before, .edit-modal-overlay *::after,
.toast, .xp-popup, .badge-popup, .levelup-popup {
    box-sizing: border-box;
}

#dominion-ai-root, .thread-overlay, .edit-modal-overlay {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.5;
}

/* ============================================
   WIDGET TOGGLE BUTTON - Custom SVG Icon
   ============================================ */

.widget-toggle {
    position: fixed !important; bottom: 24px !important; right: 24px !important;
    left: auto !important; top: auto !important;
    height: 56px; padding: 0 20px 0 14px;
    border-radius: 28px;
    background: linear-gradient(135deg, #0f2440 0%, #1a365d 50%, #2d5a87 100%);
    border: none; cursor: pointer;
    box-shadow: 0 6px 28px rgba(15, 36, 64, 0.45), 0 0 0 1px rgba(212,175,55,0.2);
    display: flex; align-items: center; gap: 10px;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s;
    z-index: 9999; color: white; overflow: visible;
}
.widget-toggle:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 40px rgba(15, 36, 64, 0.55), 0 0 0 2px rgba(212,175,55,0.3);
}
.widget-toggle:active { transform: translateY(-1px) scale(0.98); }

.toggle-pulse {
    position: absolute; inset: -4px; border-radius: 32px;
    border: 2px solid rgba(212,175,55,0.4);
    animation: togglePulse 3s ease-in-out infinite;
}
@keyframes togglePulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

.toggle-inner {
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(212,175,55,0.15);
    display: flex; align-items: center; justify-content: center;
    position: relative; z-index: 1;
}
.toggle-svg { display: block; }

.toggle-label {
    font-size: 14px; font-weight: 700; position: relative; z-index: 1;
    letter-spacing: 0.3px; white-space: nowrap;
}
.widget-toggle.hidden { opacity: 0; pointer-events: none; transform: scale(0.8); }
.widget-toggle:not(.hidden) { opacity: 1; pointer-events: auto; transform: scale(1); }

/* ============================================
   WIDGET CONTAINER
   ============================================ */

.widget-container {
    position: fixed !important; bottom: 24px !important; right: 24px !important;
    left: auto !important; top: auto !important;
    width: 400px; height: 640px;
    background: white; border-radius: 20px;
    box-shadow: 0 16px 56px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.05);
    display: none; flex-direction: column; overflow: hidden;
    z-index: 10000;
}
.widget-container.active {
    display: flex;
    animation: widgetOpen 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes widgetOpen {
    from { opacity: 0; transform: translateY(20px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.widget-screen { display: flex; flex-direction: column; height: 100%; }
.widget-screen.hidden { display: none; }

/* ============================================
   ONBOARDING SCREEN
   ============================================ */

#onboardingScreen {
    background: linear-gradient(160deg, #0a1929 0%, #0f2440 30%, #1a365d 60%, #2d5a87 100%);
    color: white; height: 100%;
}
.onboard-header {
    text-align: center; padding: 36px 24px 20px; position: relative; overflow: hidden;
}
.onboard-glow {
    position: absolute; top: -40px; left: 50%; transform: translateX(-50%);
    width: 200px; height: 200px;
    background: radial-gradient(circle, rgba(212,175,55,0.2) 0%, transparent 70%);
    animation: onboardGlow 4s ease-in-out infinite;
}
@keyframes onboardGlow {
    0%, 100% { opacity: 0.6; transform: translateX(-50%) scale(1); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.3); }
}
.onboard-cross {
    display: inline-block; margin-bottom: 16px; position: relative;
    animation: floatIcon 3s ease-in-out infinite;
}
@keyframes floatIcon {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
.onboard-header h2 {
    font-family: 'Playfair Display', serif; font-size: 1.6rem;
    line-height: 1.3; margin-bottom: 8px; position: relative;
}
.gold-text { color: #d4af37; }
.onboard-sub { font-size: 0.9rem; opacity: 0.8; position: relative; }

.onboard-form { padding: 8px 24px 24px; }
.input-group { margin-bottom: 18px; }
.input-group label {
    display: block; font-size: 0.75rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-bottom: 8px; opacity: 0.8;
}
.input-group input {
    width: 100%; padding: 14px 16px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px; color: white; font-size: 1rem;
    outline: none; transition: all 0.3s;
    font-family: 'Inter', sans-serif;
}
.input-group input::placeholder { color: rgba(255,255,255,0.35); }
.input-group input:focus {
    border-color: #d4af37; background: rgba(255,255,255,0.12);
    box-shadow: 0 0 0 3px rgba(212,175,55,0.15);
}
.input-hint { font-size: 0.72rem; opacity: 0.45; margin-top: 6px; display: block; }

.onboard-btn {
    width: 100%; padding: 16px; margin-top: 8px;
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 50%, #e6c34d 100%);
    border: none; border-radius: 14px; color: #1a365d;
    font-size: 1rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.3s; position: relative; overflow: hidden;
}
.onboard-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(201,162,39,0.4); }
.onboard-btn:active { transform: translateY(0); }

.btn-shine {
    position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shine 3s ease-in-out infinite;
}
@keyframes shine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

.onboard-privacy {
    text-align: center; font-size: 0.72rem; opacity: 0.35; margin-top: 16px;
}

/* ============================================
   WIDGET HEADER
   ============================================ */

.widget-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #0f2440 0%, #1a365d 50%, #2d5a87 100%);
    color: white; flex-shrink: 0;
}
.widget-title { display: flex; align-items: center; gap: 10px; }
.widget-logo-wrap {
    width: 32px; height: 32px; border-radius: 8px;
    background: rgba(212,175,55,0.15);
    display: flex; align-items: center; justify-content: center;
}
.widget-name { font-weight: 700; font-size: 0.95rem; display: block; }
.widget-greeting { font-size: 0.72rem; opacity: 0.7; display: block; }
.widget-controls { display: flex; gap: 6px; }
.control-btn {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: rgba(255,255,255,0.15); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.control-btn:hover { background: rgba(255,255,255,0.25); transform: scale(1.05); }
#minimizeBtn {
    background: rgba(255,255,255,0.2);
    width: 34px; height: 34px;
}
#maximizeBtn .minimize-fs-icon { display: none; }
#maximizeBtn .maximize-icon { display: block; }

/* Fullscreen mode */
.widget-container.fullscreen {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    width: 100vw !important; height: 100vh !important;
    max-width: 100vw !important; max-height: 100vh !important;
    border-radius: 0 !important;
    animation: widgetFullscreen 0.35s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.widget-container.fullscreen #maximizeBtn .minimize-fs-icon { display: block; }
.widget-container.fullscreen #maximizeBtn .maximize-icon { display: none; }

@keyframes widgetFullscreen {
    from { opacity: 0.9; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* ============================================
   ANSWERED PRAYER STYLES
   ============================================ */

.sticky-note.answered {
    background: linear-gradient(135deg, #fffef0 0%, #fff8dc 50%, #fdf5d6 100%) !important;
    border: 2px solid #d4af37 !important;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.25), 0 0 15px rgba(212, 175, 55, 0.1) !important;
    position: relative;
    overflow: visible;
}
.sticky-note.answered::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(255,215,0,0.08));
    z-index: 0;
    pointer-events: none;
}
.answered-ribbon {
    position: absolute;
    top: -1px; right: -1px;
    background: linear-gradient(135deg, #d4af37 0%, #f0d060 100%);
    color: #1a365d;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 10px 3px 8px;
    border-radius: 0 8px 0 8px;
    display: flex;
    align-items: center;
    gap: 3px;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(212,175,55,0.3);
    animation: ribbonShimmer 3s ease-in-out infinite;
}
.answered-ribbon svg {
    width: 10px; height: 10px;
}
@keyframes ribbonShimmer {
    0%, 100% { box-shadow: 0 2px 8px rgba(212,175,55,0.3); }
    50% { box-shadow: 0 2px 16px rgba(212,175,55,0.5), 0 0 8px rgba(255,215,0,0.2); }
}
.answered-sparkles {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}
.answered-sparkles span {
    position: absolute;
    font-size: 8px;
    animation: sparkleFloat 4s ease-in-out infinite;
    opacity: 0;
}
.answered-sparkles span:nth-child(1) { top: 10%; left: 15%; animation-delay: 0s; }
.answered-sparkles span:nth-child(2) { top: 60%; right: 10%; animation-delay: 1.2s; }
.answered-sparkles span:nth-child(3) { bottom: 15%; left: 40%; animation-delay: 2.4s; }
@keyframes sparkleFloat {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    30% { opacity: 0.8; transform: translateY(-5px) scale(1); }
    70% { opacity: 0.6; transform: translateY(-10px) scale(0.8); }
}

/* Mark as Answered button in My Prayers */
.answer-btn {
    background: none; border: 1px solid #d4af37; color: #d4af37;
    font-size: 0.7rem; font-weight: 600; padding: 4px 10px;
    border-radius: 12px; cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all 0.2s;
}
.answer-btn:hover {
    background: #d4af37; color: white;
}
.answer-btn.answered {
    background: linear-gradient(135deg, #d4af37, #f0d060);
    color: #1a365d; border-color: #d4af37;
    cursor: default;
}
.answer-btn.answered:hover {
    background: linear-gradient(135deg, #d4af37, #f0d060);
    color: #1a365d;
}
.my-prayer-card.answered-card {
    background: linear-gradient(135deg, #fffef0 0%, #fff8dc 100%);
    border-left-color: #d4af37 !important;
    position: relative;
}
.my-prayer-card.answered-card::after {
    content: '\2728 Prayer Answered';
    position: absolute;
    top: 8px; right: 8px;
    font-size: 0.6rem;
    font-weight: 700;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   JOURNEY PROGRESS BAR
   ============================================ */

.journey-bar {
    padding: 8px 16px; background: #fefce8;
    border-bottom: 1px solid #fef08a; flex-shrink: 0;
}
.journey-info {
    display: flex; align-items: center; gap: 8px; margin-bottom: 5px;
}
.journey-level {
    background: linear-gradient(135deg, #c9a227, #d4af37);
    color: white; font-size: 0.62rem; font-weight: 800;
    padding: 2px 8px; border-radius: 6px;
}
.journey-title { font-size: 0.78rem; font-weight: 600; color: #92400e; }
.journey-xp { font-size: 0.68rem; color: #a16207; margin-left: auto; }
.journey-progress {
    height: 3px; background: #fde68a; border-radius: 3px; overflow: hidden;
}
.journey-fill {
    height: 100%;
    background: linear-gradient(90deg, #c9a227, #d4af37);
    border-radius: 3px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   FEATURE NAVIGATION - 6 tabs
   ============================================ */

.feature-nav {
    display: flex; padding: 8px 8px; gap: 2px;
    background: #f8fafc; border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.feature-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 2px; padding: 6px 2px; border: none; background: transparent;
    border-radius: 8px; cursor: pointer; transition: all 0.25s;
    position: relative; min-width: 0;
}
.feature-btn:hover { background: #e2e8f0; }
.feature-btn.active {
    background: linear-gradient(135deg, #c9a227 0%, #d4af37 100%);
    color: white; transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(201,162,39,0.3);
}
.feature-icon { font-size: 1rem; }
.feature-label {
    font-size: 0.58rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.2px;
    white-space: nowrap;
}

/* ============================================
   FEATURE CONTENT - SCROLLABLE
   ============================================ */

.feature-content {
    flex: 1; overflow-y: auto; overflow-x: hidden;
    padding: 16px; position: relative;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Custom scrollbar */
.feature-content::-webkit-scrollbar { width: 4px; }
.feature-content::-webkit-scrollbar-track { background: transparent; }
.feature-content::-webkit-scrollbar-thumb {
    background: rgba(201,162,39,0.3); border-radius: 4px;
}
.feature-content::-webkit-scrollbar-thumb:hover { background: rgba(201,162,39,0.5); }

.feature-panel { display: none; }
.feature-panel.active {
    display: block;
    animation: panelIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes panelIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.feature-panel h3 {
    font-size: 1rem; color: #1a365d; margin-bottom: 12px; font-weight: 700;
}
.panel-subtitle {
    font-size: 0.85rem; color: #64748b; margin-bottom: 14px; margin-top: -8px;
}

/* ============================================
   TOPIC FEATURE
   ============================================ */

.trending-topics { margin-bottom: 12px; }
.trending-label {
    font-size: 0.72rem; color: #94a3b8; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    display: block; margin-bottom: 8px;
}
.topic-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.topic-tag {
    padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 20px;
    background: white; font-size: 0.8rem; cursor: pointer;
    transition: all 0.25s; color: #475569; font-weight: 500;
}
.topic-tag:hover {
    background: #fefce8; border-color: #d4af37; color: #92400e;
    transform: translateY(-2px); box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}
.topic-tag:active { transform: translateY(0); }

.topic-search {
    display: flex; gap: 8px; margin-bottom: 14px;
}
.topic-search input {
    flex: 1; padding: 10px 14px; border: 1px solid #e2e8f0;
    border-radius: 12px; font-size: 0.88rem; outline: none;
    transition: all 0.3s; font-family: 'Inter', sans-serif;
}
.topic-search input:focus { border-color: #c9a227; box-shadow: 0 0 0 3px rgba(201,162,39,0.1); }
.search-btn {
    width: 42px; height: 42px; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #1a365d, #2d5a87); color: white;
    border: none; border-radius: 12px; cursor: pointer; transition: all 0.2s;
    flex-shrink: 0;
}
.search-btn:hover { transform: scale(1.05); }

/* ============================================
   AI RESPONSE
   ============================================ */

.ai-response {
    border-radius: 14px; overflow: hidden;
    max-height: 0; opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.ai-response.active {
    max-height: 600px; opacity: 1; padding: 16px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0; margin-top: 8px;
}
.response-verse {
    font-family: 'Playfair Display', serif; font-size: 1rem;
    color: #1a365d; line-height: 1.6; margin-bottom: 8px;
    padding-left: 12px; border-left: 3px solid #c9a227;
}
.response-reference {
    font-size: 0.82rem; color: #c9a227; font-weight: 600; margin-bottom: 12px;
}
.response-insight {
    font-size: 0.88rem; color: #475569; line-height: 1.7;
}
.response-actions {
    display: flex; gap: 8px; margin-top: 12px; padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}
.resp-action-btn {
    padding: 7px 12px; border: 1px solid #e2e8f0; border-radius: 8px;
    background: white; font-size: 0.78rem; cursor: pointer;
    display: flex; align-items: center; gap: 5px;
    transition: all 0.2s; color: #475569;
}
.resp-action-btn:hover { background: #f1f5f9; border-color: #c9a227; transform: translateY(-1px); }

/* ============================================
   MOOD FEATURE
   ============================================ */

.mood-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 6px; margin-bottom: 12px;
}
.mood-btn {
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 10px 4px; border: 1px solid #e2e8f0; border-radius: 12px;
    background: white; cursor: pointer; transition: all 0.3s;
}
.mood-btn:hover {
    background: #fefce8; border-color: #d4af37;
    transform: translateY(-3px); box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.mood-btn.selected {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #d4af37; transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(201,162,39,0.2);
}
.mood-emoji { font-size: 1.4rem; transition: transform 0.3s; }
.mood-btn:hover .mood-emoji { transform: scale(1.2) rotate(5deg); }
.mood-text { font-size: 0.62rem; color: #64748b; font-weight: 500; }

/* ============================================
   DEVOTIONAL FEATURE
   ============================================ */

.devotional-intro { color: #64748b; font-size: 0.88rem; margin-bottom: 14px; }
.generate-btn {
    width: 100%; padding: 14px;
    background: linear-gradient(135deg, #c9a227, #d4af37, #e6c34d);
    color: #1a365d; border: none; border-radius: 12px;
    font-size: 0.92rem; font-weight: 700; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    transition: all 0.3s; margin-bottom: 14px;
    position: relative; overflow: hidden;
}
.generate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(201,162,39,0.35);
}
.generate-btn:active { transform: translateY(0); }
.btn-sparkle { font-size: 1.1rem; animation: sparkle 2s ease-in-out infinite; }
@keyframes sparkle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    25% { transform: rotate(10deg) scale(1.15); }
    75% { transform: rotate(-10deg) scale(1.15); }
}

.devotional-card {
    background: linear-gradient(145deg, #0a1929, #0f2440, #1a365d);
    border-radius: 16px; padding: 20px; color: white;
    animation: cardReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.devotional-card.hidden { display: none; }
@keyframes cardReveal {
    from { opacity: 0; transform: scale(0.95) translateY(8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.devotional-verse {
    font-family: 'Playfair Display', serif; font-size: 1rem;
    line-height: 1.6; margin-bottom: 8px;
}
.devotional-reference {
    font-size: 0.82rem; color: #d4af37; font-weight: 600; margin-bottom: 14px;
}
.devotional-insight {
    font-size: 0.85rem; line-height: 1.7; opacity: 0.9;
    margin-bottom: 12px; padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.devotional-action {
    background: rgba(212,175,55,0.12); padding: 10px 12px;
    border-radius: 10px; font-size: 0.82rem; margin-bottom: 12px;
    border-left: 3px solid #d4af37;
}
.devotional-actions { display: flex; gap: 8px; }
.action-btn {
    flex: 1; padding: 9px; background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12); border-radius: 8px;
    color: white; font-size: 0.8rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: all 0.2s;
}
.action-btn:hover { background: rgba(255,255,255,0.18); transform: translateY(-1px); }

/* ============================================
   PRAYER WALL FEATURE - STICKY NOTES ON A WALL
   ============================================ */

/* Wall Container */
.wall-container {
    height: 100%; display: flex; flex-direction: column;
}

.wall-header {
    padding: 12px 0 8px; text-align: center;
}
.wall-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem; color: #4a3728; margin-bottom: 2px;
}
.wall-subtitle {
    font-size: 0.78rem; color: #8b7355; font-style: italic;
}

/* The actual wall background for the prayers panel */
#prayersPanel {
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 49px,
            rgba(139,115,85,0.08) 49px,
            rgba(139,115,85,0.08) 50px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 49px,
            rgba(139,115,85,0.05) 49px,
            rgba(139,115,85,0.05) 50px
        ),
        linear-gradient(180deg, 
            #d4c5a9 0%, 
            #c9b896 15%,
            #bfad84 30%,
            #c4b48e 50%,
            #d0c19a 70%,
            #c9b896 85%,
            #bfad84 100%);
    border-radius: 0;
    position: relative;
}
#prayersPanel::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100' height='100' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none; z-index: 0;
}

/* Compose toggle - hidden on desktop, shown on mobile */
.compose-toggle { display: none; }

/* Compose Note (the form) */
.wall-compose {
    padding: 0 12px 8px; position: relative; z-index: 1;
}
.compose-note {
    background: #fff9c4;
    padding: 14px 14px 10px;
    border-radius: 2px;
    box-shadow: 2px 3px 12px rgba(0,0,0,0.15), 0 1px 3px rgba(0,0,0,0.1);
    position: relative;
    transform: rotate(-0.5deg);
    transition: transform 0.3s, box-shadow 0.3s;
}
.compose-note:hover {
    transform: rotate(0deg) scale(1.01);
    box-shadow: 3px 5px 18px rgba(0,0,0,0.2);
}
.compose-pin {
    position: absolute; top: -6px; left: 50%; transform: translateX(-50%);
    width: 16px; height: 16px; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #e74c3c, #c0392b);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.3);
    z-index: 2;
}
.compose-pin::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 5px; height: 5px; border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

.compose-note textarea {
    width: 100%; padding: 8px; border: none;
    background: transparent; font-size: 0.85rem; outline: none;
    font-family: 'Inter', sans-serif; resize: none; line-height: 1.5;
    color: #4a3728;
}
.compose-note textarea::placeholder { color: #a89060; }

.compose-footer { margin-top: 6px; }
.compose-cats {
    display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap;
}
.prayer-cat {
    padding: 3px 8px; border: 1px solid rgba(139,115,85,0.3); border-radius: 12px;
    background: rgba(255,255,255,0.6); font-size: 0.68rem; cursor: pointer;
    transition: all 0.2s; color: #6b5a45; font-weight: 500;
}
.prayer-cat:hover { border-color: #c9a227; color: #92400e; background: rgba(255,255,255,0.9); }
.prayer-cat.active {
    background: #c9a227; color: white; border-color: #c9a227;
}

.compose-actions {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.char-count { font-size: 0.68rem; color: #a89060; }

.pin-prayer-btn {
    padding: 6px 14px;
    background: #4a3728; color: #fff9c4;
    border: none; border-radius: 8px;
    font-size: 0.78rem; font-weight: 600; cursor: pointer;
    transition: all 0.3s; margin-left: auto;
}
.pin-prayer-btn:hover {
    background: #2d1f14; transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}
.pin-prayer-btn:active { transform: translateY(0); }

.story-form-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 8px;
}

.submit-story-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #1a365d, #2d5a87);
    color: white; border: none; border-radius: 10px;
    font-size: 0.82rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: all 0.3s;
}
.submit-story-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(26,54,93,0.3);
}
.submit-story-btn:active { transform: translateY(0); }

.story-form textarea {
    width: 100%; padding: 12px; border: 1px solid #e2e8f0;
    border-radius: 12px; font-size: 0.88rem; outline: none;
    transition: all 0.3s; font-family: 'Inter', sans-serif;
    resize: none; line-height: 1.5;
}
.story-form textarea:focus {
    border-color: #c9a227; box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}

/* ============================================
   STICKY NOTES WALL GRID
   ============================================ */

.sticky-wall {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 12px;
    position: relative; z-index: 1;
}

.sticky-note {
    padding: 16px 14px 10px;
    border-radius: 2px;
    min-height: 100px;
    position: relative;
    transform: rotate(var(--rotate, 0deg));
    box-shadow: 2px 3px 10px rgba(0,0,0,0.12), 0 1px 3px rgba(0,0,0,0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, z-index 0s;
    animation: stickyDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    cursor: default;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.sticky-note:hover {
    transform: rotate(0deg) scale(1.05) translateY(-4px);
    box-shadow: 4px 8px 24px rgba(0,0,0,0.2);
    z-index: 5;
}

@keyframes stickyDrop {
    0% { opacity: 0; transform: rotate(var(--rotate, 0deg)) translateY(-30px) scale(0.8); }
    60% { opacity: 1; transform: rotate(var(--rotate, 0deg)) translateY(4px) scale(1.02); }
    100% { opacity: 1; transform: rotate(var(--rotate, 0deg)) translateY(0) scale(1); }
}

/* Pin on sticky note */
.sticky-pin {
    position: absolute; top: -5px; left: 50%; transform: translateX(-50%);
    width: 14px; height: 14px; border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #e74c3c, #c0392b);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.3);
    z-index: 2;
}
.sticky-pin::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 4px; height: 4px; border-radius: 50%;
    background: rgba(255,255,255,0.4);
}

/* Tape on some sticky notes */
.sticky-tape {
    position: absolute; top: -4px; right: 10px;
    width: 40px; height: 14px;
    background: rgba(255,255,255,0.45);
    transform: rotate(15deg);
    border-radius: 1px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.sticky-note:nth-child(even) .sticky-tape { display: none; }
.sticky-note:nth-child(even) .sticky-pin {
    background: radial-gradient(circle at 40% 35%, #3498db, #2980b9);
}
.sticky-note:nth-child(3n) .sticky-pin {
    background: radial-gradient(circle at 40% 35%, #f39c12, #e67e22);
}

.sticky-text {
    font-size: 0.78rem; color: #3a2f20;
    line-height: 1.5; flex: 1;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    word-break: break-word;
}

.sticky-footer {
    display: flex; justify-content: space-between; align-items: center;
    border-top: 1px dashed rgba(0,0,0,0.1);
    padding-top: 6px; margin-top: auto;
    flex-wrap: wrap; gap: 2px;
}
.sticky-category {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #92400e;
    background: rgba(212,175,55,0.2);
    padding: 1px 6px;
    border-radius: 8px;
    margin-bottom: 4px;
}
.sticky-time {
    font-size: 0.55rem;
    color: rgba(0,0,0,0.35);
    font-style: italic;
}
.sticky-author {
    font-size: 0.65rem; color: #6b5a45;
    font-style: italic; font-weight: 500;
}
.sticky-pray-btn {
    display: flex; align-items: center; gap: 3px;
    padding: 3px 8px; border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px; background: rgba(255,255,255,0.5);
    font-size: 0.72rem; cursor: pointer;
    transition: all 0.3s; color: #6b5a45;
}
.sticky-pray-btn:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.sticky-pray-btn.prayed {
    background: rgba(212,175,55,0.2);
    border-color: rgba(212,175,55,0.4);
    color: #92400e;
}
.sticky-pray-btn.prayed:hover { transform: scale(1); cursor: default; }
.sticky-pray-count { font-weight: 600; }

.prayer-loading, .stories-loading {
    text-align: center; padding: 20px; color: #8b7355;
    grid-column: 1 / -1;
}

/* ============================================
   FAITH STORIES FEATURE
   ============================================ */

.story-prompt-card {
    background: linear-gradient(145deg, #0a1929, #0f2440, #1a365d);
    border-radius: 14px; padding: 18px; color: white; margin-bottom: 14px;
    position: relative; overflow: hidden;
    animation: cardReveal 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.prompt-badge {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: #d4af37; margin-bottom: 10px;
    padding: 3px 10px; border: 1px solid rgba(212,175,55,0.3);
    border-radius: 12px;
}
.prompt-text {
    font-family: 'Playfair Display', serif; font-size: 1.05rem;
    line-height: 1.5; margin-bottom: 10px;
}
.prompt-verse {
    font-size: 0.78rem; color: #d4af37; font-style: italic;
}

.story-form { margin-bottom: 16px; }

.stories-list { display: flex; flex-direction: column; gap: 10px; }

.story-card {
    background: white; border: 1px solid #e2e8f0; border-radius: 14px;
    padding: 14px; transition: all 0.3s;
    animation: prayerCardIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.story-card:hover {
    border-color: #d4af37; box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.story-card.featured {
    border-color: #d4af37; background: linear-gradient(135deg, #fffbeb, #fefce8);
}
.featured-badge {
    display: inline-block; font-size: 0.62rem; font-weight: 700;
    color: #c9a227; background: #fef3c7; padding: 2px 8px;
    border-radius: 8px; margin-bottom: 6px;
}

.story-author {
    display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.story-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #2d5a87, #1a365d);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem; color: white; font-weight: 700;
}
.story-name { font-size: 0.82rem; font-weight: 600; color: #1a365d; }
.story-time { font-size: 0.68rem; color: #94a3b8; margin-left: auto; }

.story-text {
    font-size: 0.88rem; color: #475569; line-height: 1.6; margin-bottom: 10px;
    font-style: italic;
}

.story-actions {
    display: flex; align-items: center; gap: 12px;
    padding-top: 8px; border-top: 1px solid #f1f5f9;
}
.heart-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 12px; border: 1px solid #e2e8f0; border-radius: 20px;
    background: white; font-size: 0.78rem; cursor: pointer;
    transition: all 0.3s; color: #64748b;
}
.heart-btn:hover {
    background: #fef2f2; border-color: #f87171; color: #dc2626;
    transform: scale(1.05);
}
.heart-btn.hearted {
    background: #fef2f2; border-color: #f87171; color: #dc2626;
}
.heart-btn.hearted:hover { transform: scale(1); cursor: default; }
.heart-count { font-size: 0.72rem; color: #94a3b8; }

/* Heart animation */
@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}
.heart-btn.animate { animation: heartBeat 0.6s ease-in-out; }

/* ============================================
   JOURNEY PANEL
   ============================================ */

.journey-header-card {
    text-align: center; padding: 18px;
    background: linear-gradient(145deg, #0a1929, #0f2440, #1a365d);
    border-radius: 14px; color: white; margin-bottom: 14px;
}
.journey-avatar { font-size: 2.2rem; margin-bottom: 6px; }
.journey-header-card h3 { color: white; margin-bottom: 4px; font-size: 0.95rem; }
.journey-level-text { font-size: 0.82rem; color: #d4af37; font-weight: 600; }

.journey-stats {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 8px; margin-bottom: 14px;
}
.stat-item {
    text-align: center; padding: 12px 6px;
    background: #f8fafc; border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}
.stat-item:hover { border-color: #d4af37; transform: translateY(-2px); }
.stat-num {
    display: block; font-size: 1.3rem; font-weight: 800; color: #1a365d;
}
.stat-lbl {
    font-size: 0.62rem; color: #94a3b8; text-transform: uppercase;
    letter-spacing: 0.4px; font-weight: 600;
}

.badges-section { margin-bottom: 14px; }
.badges-section h4 {
    font-size: 0.82rem; color: #475569; margin-bottom: 8px; font-weight: 700;
}
.badges-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.badge-item {
    display: flex; align-items: center; gap: 5px;
    padding: 5px 10px; background: #fefce8; border: 1px solid #fde68a;
    border-radius: 16px; font-size: 0.75rem; color: #92400e;
    animation: badgeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.2s;
}
.badge-item:hover { transform: scale(1.05); box-shadow: 0 2px 8px rgba(201,162,39,0.2); }
@keyframes badgeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}
.badge-icon { font-size: 0.9rem; }
.badge-empty {
    font-size: 0.8rem; color: #94a3b8; font-style: italic; padding: 6px 0;
}

.share-section h4 {
    font-size: 0.82rem; color: #475569; margin-bottom: 8px; font-weight: 700;
}
.share-card {
    border-radius: 14px; overflow: hidden; margin-bottom: 10px;
    background: linear-gradient(145deg, #0a1929, #0f2440, #1a365d);
    color: white;
}
.share-card-inner { padding: 16px; }
.share-brand { font-size: 0.72rem; opacity: 0.7; display: block; margin-bottom: 10px; }
.share-verse-text {
    font-family: 'Playfair Display', serif; font-size: 0.92rem;
    line-height: 1.5; margin-bottom: 6px;
}
.share-ref { font-size: 0.8rem; color: #d4af37; font-weight: 600; }

.share-buttons { display: flex; gap: 8px; }
.share-btn {
    flex: 1; padding: 9px; border: none; border-radius: 10px;
    font-size: 0.8rem; font-weight: 600; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 5px;
    transition: all 0.2s;
}
.share-btn.twitter { background: #0f1419; color: white; }
.share-btn.copy { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.share-btn:hover { transform: translateY(-1px); }

/* ============================================
   PROFILE PANEL
   ============================================ */

.profile-panel {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: white; z-index: 20; overflow-y: auto;
    animation: slideFromRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.profile-panel.hidden { display: none; }
@keyframes slideFromRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}
.profile-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #0f2440, #1a365d, #2d5a87);
    color: white; font-weight: 600;
}
.back-btn {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: rgba(255,255,255,0.12); color: white; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
}
.back-btn:hover { background: rgba(255,255,255,0.22); }

.profile-content { padding: 20px 16px; text-align: center; }
.profile-avatar-large { font-size: 2.8rem; margin-bottom: 8px; }
.profile-content h3 { font-size: 1.15rem; color: #1a365d; margin-bottom: 4px; }
.profile-level { font-size: 0.82rem; color: #c9a227; font-weight: 600; margin-bottom: 14px; }
.profile-xp-bar {
    height: 6px; background: #e2e8f0; border-radius: 3px;
    overflow: hidden; margin-bottom: 4px;
}
.profile-xp-fill {
    height: 100%; background: linear-gradient(90deg, #c9a227, #d4af37);
    border-radius: 3px; transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.profile-xp-text { font-size: 0.72rem; color: #94a3b8; margin-bottom: 16px; }
.profile-stats-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.pstat {
    padding: 12px; background: #f8fafc; border-radius: 12px;
    border: 1px solid #e2e8f0; transition: all 0.2s;
}
.pstat:hover { border-color: #d4af37; }
.pstat-num { display: block; font-size: 1.2rem; font-weight: 800; color: #1a365d; }
.pstat-lbl {
    font-size: 0.62rem; color: #94a3b8; text-transform: uppercase;
    letter-spacing: 0.4px; font-weight: 600;
}

/* ============================================
   POPUPS & NOTIFICATIONS
   ============================================ */

.xp-popup {
    position: fixed; bottom: 90px; right: 40px;
    background: linear-gradient(135deg, #c9a227, #d4af37);
    color: #1a365d; padding: 8px 16px; border-radius: 20px;
    font-size: 0.85rem; font-weight: 800; z-index: 10002;
    pointer-events: none;
}
.xp-popup.hidden { display: none; }
.xp-popup.show {
    animation: xpFloat 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes xpFloat {
    0% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translateY(-60px); }
}

.badge-popup {
    position: fixed; bottom: 90px; right: 24px;
    background: white; padding: 12px 16px; border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    display: flex; align-items: center; gap: 10px;
    z-index: 10002;
}
.badge-popup.hidden { display: none; }
.badge-popup.show {
    animation: badgeSlide 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes badgeSlide {
    0% { opacity: 0; transform: translateX(100px); }
    15% { opacity: 1; transform: translateX(0); }
    85% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0; transform: translateX(100px); }
}
.badge-popup-icon { font-size: 1.8rem; }
.badge-popup-text { display: flex; flex-direction: column; }
.badge-popup-text strong { font-size: 0.82rem; color: #1a365d; }
.badge-popup-text span { font-size: 0.72rem; color: #64748b; }

.levelup-popup {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #0a1929, #0f2440, #1a365d);
    color: white; padding: 36px; border-radius: 24px;
    text-align: center; z-index: 10003;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.levelup-popup.hidden { display: none; }
.levelup-popup.show {
    animation: levelUp 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes levelUp {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    15% { opacity: 1; transform: translate(-50%, -50%) scale(1.05); }
    25% { transform: translate(-50%, -50%) scale(1); }
    80% { opacity: 1; }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(0.95); }
}
.levelup-icon { font-size: 2.8rem; margin-bottom: 10px; }
.levelup-popup h3 { font-size: 1.3rem; margin-bottom: 6px; color: #d4af37; }
.levelup-popup p { font-size: 0.92rem; opacity: 0.9; }

/* Loading */
.loading-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.95); display: none;
    flex-direction: column; align-items: center; justify-content: center;
    gap: 14px; z-index: 10;
}
.loading-overlay.active { display: flex; }
.loading-dots { display: flex; gap: 6px; }
.loading-dots span {
    width: 8px; height: 8px; background: #c9a227;
    border-radius: 50%; animation: dotBounce 1.4s infinite ease-in-out both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes dotBounce {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}
.loading-overlay p { color: #64748b; font-size: 0.88rem; }

/* Toast */
.toast {
    position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: #1a365d; color: white; padding: 10px 20px;
    border-radius: 12px; font-size: 0.88rem; font-weight: 500;
    opacity: 0; visibility: hidden; transition: all 0.3s;
    z-index: 10001; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}
.toast.active { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

/* Ripple effect */
.ripple {
    position: absolute; border-radius: 50%;
    background: rgba(212,175,55,0.3);
    transform: scale(0); animation: ripple 0.6s linear;
    pointer-events: none;
}
@keyframes ripple {
    to { transform: scale(4); opacity: 0; }
}

/* ============================================
   ANONYMOUS TOGGLE
   ============================================ */

.prayer-footer-left {
    display: flex; align-items: center; gap: 12px;
}

.anon-toggle {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; user-select: none;
}
.anon-toggle input[type="checkbox"] {
    display: none;
}
.anon-slider {
    width: 32px; height: 18px; background: #e2e8f0;
    border-radius: 9px; position: relative;
    transition: all 0.3s; flex-shrink: 0;
}
.anon-slider::after {
    content: ''; position: absolute;
    width: 14px; height: 14px; background: white;
    border-radius: 50%; top: 2px; left: 2px;
    transition: all 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.anon-toggle input:checked + .anon-slider {
    background: linear-gradient(135deg, #c9a227, #d4af37);
}
.anon-toggle input:checked + .anon-slider::after {
    left: 16px;
}
.anon-label {
    font-size: 0.68rem; color: #8b7355; font-weight: 500;
    transition: color 0.3s;
}
.anon-toggle input:checked ~ .anon-label {
    color: #c9a227;
}

/* ============================================
   ALTAR ANIMATION
   ============================================ */

.altar-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(180deg, 
        rgba(10, 25, 41, 0.97) 0%, 
        rgba(15, 36, 64, 0.98) 40%,
        rgba(26, 54, 93, 0.95) 100%);
    display: none; flex-direction: column;
    align-items: center; justify-content: center;
    z-index: 15; padding: 24px;
    overflow: hidden;
}
.altar-overlay.active {
    display: flex;
    animation: altarFadeIn 0.6s ease-out;
}
@keyframes altarFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.altar-scene {
    display: flex; flex-direction: column;
    align-items: center; position: relative;
    width: 100%;
}

/* Flames */
.altar-flames {
    display: flex; gap: 16px; margin-bottom: 16px;
    position: relative;
}
.flame {
    width: 12px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
}
.flame-1 {
    height: 40px;
    background: linear-gradient(0deg, #d4af37 0%, #f0d060 40%, #ff8c00 70%, transparent 100%);
    animation: flameFlicker1 1.2s ease-in-out infinite alternate;
}
.flame-2 {
    height: 52px;
    background: linear-gradient(0deg, #d4af37 0%, #f0d060 30%, #ff6600 60%, #ff4400 80%, transparent 100%);
    animation: flameFlicker2 0.9s ease-in-out infinite alternate;
}
.flame-3 {
    height: 36px;
    background: linear-gradient(0deg, #d4af37 0%, #f0d060 40%, #ff8c00 70%, transparent 100%);
    animation: flameFlicker3 1.4s ease-in-out infinite alternate;
}

@keyframes flameFlicker1 {
    0% { height: 36px; opacity: 0.8; transform: scaleX(0.9) rotate(-2deg); }
    100% { height: 44px; opacity: 1; transform: scaleX(1.1) rotate(2deg); }
}
@keyframes flameFlicker2 {
    0% { height: 48px; opacity: 0.9; transform: scaleX(1.1) rotate(1deg); }
    100% { height: 56px; opacity: 1; transform: scaleX(0.9) rotate(-1deg); }
}
@keyframes flameFlicker3 {
    0% { height: 32px; opacity: 0.8; transform: scaleX(0.85) rotate(3deg); }
    100% { height: 40px; opacity: 1; transform: scaleX(1.15) rotate(-2deg); }
}

/* Altar Stone */
.altar-stone {
    width: 160px; height: 60px;
    background: linear-gradient(180deg, #8b7355 0%, #6b5a45 50%, #5a4a38 100%);
    border-radius: 8px 8px 4px 4px;
    display: flex; align-items: center; justify-content: center;
    position: relative; margin-bottom: 24px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.1);
    animation: altarGlow 2s ease-in-out infinite;
}
.altar-stone::before {
    content: ''; position: absolute; top: -6px; left: -6px; right: -6px; bottom: -6px;
    border-radius: 12px;
    background: radial-gradient(ellipse, rgba(212,175,55,0.3) 0%, transparent 70%);
    animation: stoneGlow 2s ease-in-out infinite;
}
@keyframes altarGlow {
    0%, 100% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 20px rgba(212,175,55,0.1); }
    50% { box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 40px rgba(212,175,55,0.3); }
}
@keyframes stoneGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
.altar-cross {
    font-size: 1.6rem; color: #d4af37;
    text-shadow: 0 0 10px rgba(212,175,55,0.5);
    animation: crossPulse 2s ease-in-out infinite;
}
@keyframes crossPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
}

/* Prayer text rising */
.altar-prayer-text {
    max-width: 280px; text-align: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.92rem; font-style: italic;
    color: rgba(255,255,255,0.9); line-height: 1.6;
    margin-bottom: 20px;
    animation: prayerRise 3.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes prayerRise {
    0% { opacity: 0; transform: translateY(40px); }
    15% { opacity: 1; transform: translateY(0); }
    70% { opacity: 1; transform: translateY(0); }
    85% { opacity: 0.8; transform: translateY(-10px) scale(0.98); }
    100% { opacity: 0.3; transform: translateY(-20px) scale(0.95); }
}

/* Altar message */
.altar-message {
    font-size: 0.82rem; color: #d4af37;
    font-weight: 600; letter-spacing: 0.5px;
    animation: messageAppear 3.5s ease forwards;
    text-align: center;
}
@keyframes messageAppear {
    0%, 40% { opacity: 0; transform: translateY(10px); }
    55% { opacity: 1; transform: translateY(0); }
    85% { opacity: 1; }
    100% { opacity: 0.5; }
}

/* Particles */
.altar-particles {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none; overflow: hidden;
}
.particle {
    position: absolute; font-size: 0.8rem;
    animation: particleFloat 3s ease-out infinite;
}
.particle:nth-child(1) { left: 15%; top: 60%; animation-delay: 0s; animation-duration: 2.5s; }
.particle:nth-child(2) { left: 75%; top: 55%; animation-delay: 0.4s; animation-duration: 3s; }
.particle:nth-child(3) { left: 35%; top: 70%; animation-delay: 0.8s; animation-duration: 2.8s; }
.particle:nth-child(4) { left: 60%; top: 65%; animation-delay: 1.2s; animation-duration: 2.6s; }
.particle:nth-child(5) { left: 25%; top: 50%; animation-delay: 0.6s; animation-duration: 3.2s; }
.particle:nth-child(6) { left: 80%; top: 45%; animation-delay: 1s; animation-duration: 2.4s; }
@keyframes particleFloat {
    0% { opacity: 0; transform: translateY(0) scale(0.5); }
    20% { opacity: 1; transform: translateY(-20px) scale(1); }
    100% { opacity: 0; transform: translateY(-80px) scale(0.3); }
}

/* ============================================
   WALL TABS (Community Wall / My Prayers)
   ============================================ */

.wall-tabs {
    display: flex; gap: 4px;
    background: rgba(0,0,0,0.08); border-radius: 10px;
    padding: 3px;
}
.wall-tab {
    flex: 1; padding: 7px 8px;
    border: none; border-radius: 8px;
    background: transparent; font-size: 0.72rem;
    font-weight: 600; cursor: pointer;
    color: #6b5a45; transition: all 0.3s;
    white-space: nowrap;
}
.wall-tab:hover { background: rgba(255,255,255,0.4); }
.wall-tab.active {
    background: rgba(255,255,255,0.8);
    color: #4a3728;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.wall-view { display: none; flex-direction: column; flex: 1; min-height: 0; }
.wall-view.active { display: flex; }

/* ============================================
   SEARCH & FILTER BAR
   ============================================ */

.wall-filters {
    padding: 8px 12px 4px;
    position: relative; z-index: 2;
}
.filter-search {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(139,115,85,0.2);
    border-radius: 10px; padding: 6px 10px;
    margin-bottom: 6px;
    transition: all 0.3s;
}
.filter-search:focus-within {
    border-color: #c9a227;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}
.filter-search svg { color: #8b7355; flex-shrink: 0; }
.filter-search input {
    border: none; background: transparent; outline: none;
    font-size: 0.78rem; color: #4a3728; width: 100%;
    font-family: 'Inter', sans-serif;
}
.filter-search input::placeholder { color: #a89060; }

.filter-row {
    display: flex; gap: 6px;
}
.filter-select {
    flex: 1; padding: 5px 8px;
    border: 1px solid rgba(139,115,85,0.2);
    border-radius: 8px; background: rgba(255,255,255,0.6);
    font-size: 0.7rem; color: #6b5a45;
    font-family: 'Inter', sans-serif;
    cursor: pointer; outline: none;
    transition: all 0.3s;
}
.filter-select:focus {
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}

/* ============================================
   LIKE / AMEN REACTION BUTTONS
   ============================================ */

.sticky-reactions {
    display: flex; gap: 4px; margin-top: 4px;
}
.reaction-btn {
    display: flex; align-items: center; gap: 3px;
    padding: 2px 7px; border: 1px solid rgba(0,0,0,0.08);
    border-radius: 10px; background: rgba(255,255,255,0.5);
    font-size: 0.65rem; cursor: pointer;
    transition: all 0.3s; color: #6b5a45;
    position: relative; overflow: hidden;
}
.reaction-btn:hover {
    background: rgba(255,255,255,0.9);
    transform: scale(1.08);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.reaction-btn .reaction-icon {
    font-size: 0.8rem;
    transition: transform 0.3s;
}
.reaction-btn:hover .reaction-icon {
    transform: scale(1.2);
}
.reaction-btn.active {
    border-color: rgba(212,175,55,0.4);
    background: rgba(212,175,55,0.15);
    color: #92400e;
}
.reaction-btn.active:hover { transform: scale(1); cursor: default; }
.reaction-btn .reaction-burst {
    position: absolute; top: 50%; left: 50%;
    width: 0; height: 0; border-radius: 50%;
    background: rgba(212,175,55,0.3);
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.reaction-btn.burst .reaction-burst {
    animation: burstExpand 0.7s ease-out;
}
@keyframes burstExpand {
    0% { width: 0; height: 0; opacity: 1; }
    100% { width: 60px; height: 60px; opacity: 0; }
}
.reaction-count { font-weight: 600; font-size: 0.62rem; }

/* Amen burst animation */
@keyframes amenBurst {
    0% { transform: scale(1); }
    20% { transform: scale(1.4); }
    40% { transform: scale(0.9); }
    60% { transform: scale(1.2); }
    80% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.reaction-btn.amen-animate .reaction-icon {
    animation: amenBurst 0.6s ease-in-out;
}

/* Like heart burst animation */
@keyframes heartBurstReaction {
    0% { transform: scale(1); }
    15% { transform: scale(1.5) rotate(-10deg); }
    30% { transform: scale(0.85) rotate(5deg); }
    50% { transform: scale(1.3) rotate(-3deg); }
    70% { transform: scale(0.95); }
    100% { transform: scale(1); }
}
.reaction-btn.like-animate .reaction-icon {
    animation: heartBurstReaction 0.7s ease-in-out;
}

/* Floating reaction particles */
.reaction-particle {
    position: absolute; pointer-events: none;
    font-size: 0.7rem;
    animation: reactionFloat 0.8s ease-out forwards;
}
@keyframes reactionFloat {
    0% { opacity: 1; transform: translateY(0) scale(1); }
    100% { opacity: 0; transform: translateY(-30px) scale(0.5); }
}

/* ============================================
   MY PRAYERS VIEW
   ============================================ */

.my-prayers-header {
    padding: 8px 12px;
}
.my-prayers-subtitle {
    font-size: 0.78rem; color: #8b7355; font-style: italic;
}

.my-prayers-list {
    padding: 8px 12px;
    display: flex; flex-direction: column; gap: 8px;
    overflow-y: auto;
}

.my-prayer-card {
    background: #fff9c4;
    padding: 12px 14px;
    border-radius: 4px;
    box-shadow: 2px 3px 10px rgba(0,0,0,0.1);
    position: relative;
    animation: cardReveal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.my-prayer-card:hover {
    box-shadow: 3px 5px 16px rgba(0,0,0,0.15);
}

.my-prayer-meta {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
}
.my-prayer-category {
    font-size: 0.62rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: #92400e; background: rgba(201,162,39,0.15);
    padding: 2px 8px; border-radius: 8px;
}
.my-prayer-date {
    font-size: 0.65rem; color: #a89060;
}
.my-prayer-text {
    font-size: 0.82rem; color: #4a3728;
    line-height: 1.5; margin-bottom: 8px;
}
.my-prayer-stats {
    display: flex; gap: 12px; margin-bottom: 8px;
    font-size: 0.68rem; color: #8b7355;
}
.my-prayer-stat {
    display: flex; align-items: center; gap: 3px;
}
.my-prayer-actions {
    display: flex; gap: 6px;
    border-top: 1px dashed rgba(0,0,0,0.1);
    padding-top: 8px;
}
.my-prayer-btn {
    padding: 5px 12px;
    border: 1px solid rgba(139,115,85,0.2);
    border-radius: 8px; background: rgba(255,255,255,0.6);
    font-size: 0.72rem; font-weight: 500;
    cursor: pointer; color: #6b5a45;
    transition: all 0.3s;
    display: flex; align-items: center; gap: 4px;
}
.my-prayer-btn:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.my-prayer-btn.delete-btn:hover {
    background: #fef2f2; border-color: #f87171; color: #dc2626;
}

.my-prayer-edit, .my-prayer-delete {
    padding: 5px 12px;
    border: 1px solid rgba(139,115,85,0.2);
    border-radius: 8px; background: rgba(255,255,255,0.6);
    font-size: 0.72rem; font-weight: 500;
    cursor: pointer; color: #6b5a45;
    transition: all 0.3s;
    display: flex; align-items: center; gap: 4px;
}
.my-prayer-edit:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.my-prayer-delete:hover {
    background: #fef2f2; border-color: #f87171; color: #dc2626;
}
.my-prayer-cat {
    font-size: 0.62rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.5px;
    color: #92400e; background: rgba(201,162,39,0.15);
    padding: 2px 8px; border-radius: 8px;
}
.my-prayer-time {
    font-size: 0.65rem; color: #a89060;
}
.my-prayer-stats {
    font-size: 0.68rem; color: #8b7355;
}

.my-prayers-empty {
    text-align: center; padding: 24px;
    color: #8b7355; font-size: 0.85rem;
}
.my-prayers-empty-icon {
    font-size: 2rem; margin-bottom: 8px; display: block;
}

/* ============================================
   EDIT PRAYER MODAL
   ============================================ */

.edit-modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center;
    z-index: 10005;
    animation: fadeIn 0.3s ease;
}
.edit-modal-overlay.hidden { display: none; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.edit-modal {
    background: #fff9c4;
    border-radius: 8px;
    padding: 20px;
    width: 90%; max-width: 360px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
    animation: modalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.edit-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.edit-modal-header h4 {
    font-size: 0.95rem; color: #4a3728;
    font-family: 'Playfair Display', serif;
}
.edit-modal-close {
    width: 28px; height: 28px; border-radius: 6px;
    border: none; background: rgba(0,0,0,0.06);
    cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    color: #6b5a45; transition: all 0.2s;
}
.edit-modal-close:hover { background: rgba(0,0,0,0.12); }

.edit-modal textarea {
    width: 100%; padding: 10px;
    border: 1px solid rgba(139,115,85,0.3);
    border-radius: 8px; background: rgba(255,255,255,0.6);
    font-size: 0.85rem; outline: none;
    font-family: 'Inter', sans-serif;
    resize: none; line-height: 1.5;
    color: #4a3728; margin-bottom: 10px;
    transition: all 0.3s;
}
.edit-modal textarea:focus {
    border-color: #c9a227;
    box-shadow: 0 0 0 3px rgba(201,162,39,0.1);
}

.edit-modal-cats {
    display: flex; gap: 4px; margin-bottom: 14px; flex-wrap: wrap;
}

.edit-modal-actions {
    display: flex; gap: 8px; justify-content: flex-end;
}
.edit-cancel-btn {
    padding: 8px 16px; border: 1px solid rgba(139,115,85,0.3);
    border-radius: 8px; background: transparent;
    font-size: 0.8rem; cursor: pointer; color: #6b5a45;
    transition: all 0.2s;
}
.edit-cancel-btn:hover { background: rgba(0,0,0,0.05); }
.edit-save-btn {
    padding: 8px 16px; border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #c9a227, #d4af37);
    color: #1a365d; font-size: 0.8rem;
    font-weight: 700; cursor: pointer;
    transition: all 0.3s;
}
.edit-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(201,162,39,0.3);
}

/* ============================================
   COMMENT COUNT BADGE ON STICKY NOTES
   ============================================ */

.sticky-comment-btn {
    display: flex; align-items: center; gap: 4px;
    background: none; border: none; cursor: pointer;
    color: #8b7355; font-size: 0.72rem; padding: 2px 6px;
    border-radius: 10px; transition: all 0.2s;
    margin-top: 4px;
}
.sticky-comment-btn:hover {
    background: rgba(139,115,85,0.1); color: #6b5335;
}
.sticky-comment-btn svg { opacity: 0.7; }

/* ============================================
   PRAYER THREAD OVERLAY
   ============================================ */

.thread-overlay {
    position: fixed; inset: 0; z-index: 10001;
    display: flex; align-items: flex-end; justify-content: flex-end;
    padding: 24px;
    background: rgba(0,0,0,0.3);
    animation: threadFadeIn 0.25s ease;
}
.thread-overlay.hidden { display: none; }
@keyframes threadFadeIn { from { opacity: 0; } to { opacity: 1; } }

.thread-panel {
    width: 400px; height: 640px;
    background: #faf8f4;
    border-radius: 20px;
    display: flex; flex-direction: column;
    box-shadow: 0 16px 56px rgba(0,0,0,0.22), 0 0 0 1px rgba(0,0,0,0.06);
    overflow: hidden;
    animation: threadSlideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}
@keyframes threadSlideUp {
    from { opacity: 0; transform: translateY(30px) scale(0.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.thread-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c5282 100%);
    color: white;
    flex-shrink: 0;
}
.thread-back-btn {
    display: flex; align-items: center; gap: 4px;
    background: rgba(255,255,255,0.15); border: none;
    color: white; cursor: pointer; font-size: 0.82rem;
    font-weight: 600; padding: 6px 12px; border-radius: 8px;
    transition: background 0.2s;
}
.thread-back-btn:hover { background: rgba(255,255,255,0.25); }
.thread-title {
    font-size: 0.88rem; font-weight: 700;
    letter-spacing: 0.02em;
}
.thread-close-btn {
    background: rgba(255,255,255,0.15); border: none;
    color: white; cursor: pointer; padding: 6px;
    border-radius: 8px; display: flex; align-items: center;
    transition: background 0.2s;
}
.thread-close-btn:hover { background: rgba(255,255,255,0.25); }

.thread-body {
    flex: 1; overflow-y: auto; padding: 16px;
    min-height: 0;
}

/* The prayer card at top of thread */
.thread-prayer-card {
    background: #fff9c4;
    border-radius: 12px; padding: 16px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 16px; position: relative;
}
.thread-prayer-card::before {
    content: ''; position: absolute; top: -4px; left: 50%;
    transform: translateX(-50%); width: 30px; height: 8px;
    background: #d4af37; border-radius: 0 0 4px 4px; opacity: 0.6;
}
.thread-prayer-category {
    display: inline-block; font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: #8b7355; background: rgba(139,115,85,0.12);
    padding: 2px 8px; border-radius: 4px; margin-bottom: 8px;
}
.thread-prayer-text {
    font-size: 0.95rem; line-height: 1.5; color: #3d3425;
    margin-bottom: 10px; font-family: 'Inter', sans-serif;
}
.thread-prayer-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 0.75rem; color: #8b7355;
}
.thread-prayer-author { font-weight: 600; }
.thread-prayer-reactions {
    display: flex; gap: 12px; margin-top: 10px;
    padding-top: 10px; border-top: 1px solid rgba(139,115,85,0.15);
}
.thread-prayer-reactions .reaction-btn {
    font-size: 0.8rem; padding: 4px 10px;
}

/* Comments section */
.thread-comments-section { margin-top: 4px; }
.thread-comments-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 12px;
}
.thread-comments-count {
    font-size: 0.82rem; font-weight: 700; color: #3d3425;
    letter-spacing: 0.02em;
}
.thread-no-comments {
    text-align: center; color: #8b7355; font-size: 0.85rem;
    padding: 24px 16px; font-style: italic;
}

/* Individual comment */
.thread-comment {
    display: flex; gap: 10px; margin-bottom: 14px;
    animation: commentFadeIn 0.3s ease;
}
@keyframes commentFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.thread-comment.reply {
    margin-left: 36px; padding-left: 12px;
    border-left: 2px solid rgba(212,175,55,0.3);
}
.comment-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #f0d060);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: white;
    flex-shrink: 0;
}
.comment-avatar.anon {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
}
.comment-body { flex: 1; min-width: 0; }
.comment-header {
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 3px;
}
.comment-author {
    font-size: 0.78rem; font-weight: 700; color: #3d3425;
}
.comment-time {
    font-size: 0.68rem; color: #94a3b8;
}
.comment-text {
    font-size: 0.84rem; line-height: 1.45; color: #4a4a4a;
    word-wrap: break-word;
}
.comment-actions {
    display: flex; gap: 12px; margin-top: 4px;
}
.comment-action-btn {
    background: none; border: none; cursor: pointer;
    font-size: 0.72rem; color: #8b7355; padding: 2px 0;
    font-weight: 600; transition: color 0.2s;
}
.comment-action-btn:hover { color: #d4af37; }
.comment-delete-btn { color: #e57373; }
.comment-delete-btn:hover { color: #c62828; }

/* Comment compose area */
.thread-compose {
    padding: 10px 16px 12px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.08);
    flex-shrink: 0;
}
.thread-compose-row {
    display: flex; align-items: flex-end; gap: 8px;
}
.thread-compose-row textarea {
    flex: 1; border: 1px solid #e2d8c8;
    border-radius: 16px; padding: 8px 14px;
    font-size: 0.84rem; font-family: 'Inter', sans-serif;
    resize: none; outline: none; max-height: 80px;
    line-height: 1.4; background: #faf8f4;
    transition: border-color 0.2s;
}
.thread-compose-row textarea:focus {
    border-color: #d4af37;
}
.thread-send-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, #d4af37, #c9a227);
    border: none; cursor: pointer; display: flex;
    align-items: center; justify-content: center;
    color: white; flex-shrink: 0;
    transition: transform 0.2s, box-shadow 0.2s;
}
.thread-send-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 3px 10px rgba(201,162,39,0.35);
}
.thread-send-btn:active { transform: scale(0.95); }

.thread-compose-options {
    display: flex; align-items: center; gap: 12px;
    margin-top: 6px; padding-left: 2px;
}
.thread-anon-toggle {
    display: flex; align-items: center; gap: 6px;
    cursor: pointer; font-size: 0.72rem;
}
.thread-anon-toggle input { display: none; }
.thread-anon-toggle .anon-slider {
    width: 28px; height: 16px; background: #ccc;
    border-radius: 8px; position: relative;
    transition: background 0.2s;
}
.thread-anon-toggle .anon-slider::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 12px; height: 12px; background: white;
    border-radius: 50%; transition: transform 0.2s;
}
.thread-anon-toggle input:checked + .anon-slider {
    background: #d4af37;
}
.thread-anon-toggle input:checked + .anon-slider::after {
    transform: translateX(12px);
}
.thread-replying-to {
    font-size: 0.72rem; color: #8b7355;
    display: flex; align-items: center; gap: 4px;
}
.thread-replying-to.hidden { display: none; }
.thread-cancel-reply {
    background: none; border: none; cursor: pointer;
    color: #e57373; font-size: 1rem; font-weight: 700;
    padding: 0 2px; line-height: 1;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */

@media (max-width: 480px) {
    /* === WIDGET CONTAINER: full screen, flex column, no overflow === */
    .widget-container {
        position: fixed !important;
        top: 0 !important; left: 0 !important;
        right: 0 !important; bottom: 0 !important;
        width: 100% !important; height: 100% !important;
        max-height: 100vh !important; max-height: 100dvh !important;
        border-radius: 0;
        z-index: 10000;
    }

    /* Ensure main screen fills exactly and doesn't overflow */
    .widget-screen { height: 100%; max-height: 100vh; max-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }

    /* === HEADER: compact, collapse button always visible === */
    .widget-header {
        padding: 10px 12px;
        flex-shrink: 0;
    }
    .widget-name { font-size: 0.88rem; }
    .widget-greeting { font-size: 0.68rem; }
    .widget-controls { gap: 8px; }
    #minimizeBtn {
        width: 40px; height: 40px;
        background: rgba(255,255,255,0.3);
        border-radius: 12px;
        border: 1px solid rgba(255,255,255,0.2);
    }
    #minimizeBtn svg { width: 18px; height: 18px; }
    .control-btn { width: 34px; height: 34px; }

    /* === JOURNEY BAR: compact === */
    .journey-bar {
        padding: 6px 12px;
        flex-shrink: 0;
    }

    /* === FEATURE NAV: compact tabs === */
    .feature-nav {
        padding: 4px 4px;
        gap: 1px;
        flex-shrink: 0;
    }
    .feature-btn { padding: 4px 1px; }
    .feature-label { font-size: 0.48rem; }
    .feature-icon { font-size: 0.85rem; }

    /* === FEATURE CONTENT: takes remaining space === */
    .feature-content {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    /* For non-prayer panels, allow scrolling */
    .feature-panel:not(#prayersPanel) {
        padding: 10px;
        max-height: 100%;
        overflow-y: auto;
    }

    /* Prayer panel fills the feature-content via flex */
    #prayersPanel {
        height: 100% !important;
    }
    #prayersPanel.active {
        display: flex !important;
        flex-direction: column !important;
        height: 100% !important;
        overflow: hidden !important;
    }

    /* Feature content must also be flex to pass height down */
    .feature-content {
        display: flex !important;
        flex-direction: column !important;
    }

    /* === PRAYER WALL: flex column, scrollable === */
    .wall-container {
        flex: 1;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }
    .wall-header { flex-shrink: 0; padding: 8px 0 4px; }
    .wall-tabs { flex-shrink: 0; }
    .wall-view {
        flex: 1;
        min-height: 0;
        overflow: hidden;
        display: none;
        flex-direction: column;
    }
    .wall-view.active { display: flex; }

    /* Community wall view internal layout */
    #communityWallView {
        overflow: hidden;
        position: relative;
    }
    .wall-filters { flex-shrink: 0; padding: 4px 8px 2px; }
    .filter-row { gap: 4px; }

    /* Compose toggle button - visible on mobile */
    .compose-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        gap: 6px;
        width: calc(100% - 16px);
        margin: 4px 8px;
        padding: 8px 12px;
        background: linear-gradient(135deg, #f5e6b8, #e8d5a0);
        border: 1px dashed #c9a227;
        border-radius: 8px;
        color: #5a4a2a;
        font-size: 0.78rem;
        font-weight: 600;
        cursor: pointer;
        flex-shrink: 0;
        transition: all 0.2s;
    }
    .compose-toggle:hover { background: linear-gradient(135deg, #e8d5a0, #dbc48e); }
    .compose-toggle.active .compose-chevron { transform: rotate(180deg); }
    .compose-chevron { transition: transform 0.2s; }

    /* Compose form - hidden by default on mobile */
    .wall-compose {
        flex-shrink: 0;
        padding: 0 8px 6px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    .wall-compose.expanded {
        max-height: 200px;
    }
    .compose-note { padding: 10px 10px 8px; }
    .compose-note textarea { font-size: 0.8rem; padding: 6px; rows: 1; }
    .compose-cats { gap: 3px; }
    .prayer-cat { padding: 2px 6px; font-size: 0.62rem; }
    .compose-actions { gap: 6px; }
    .pin-prayer-btn { padding: 5px 10px; font-size: 0.72rem; }
    .char-count { font-size: 0.62rem; }

    /* Sticky wall: overflow scroll within remaining space */
    .sticky-wall {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px; padding: 8px;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        min-height: 0 !important;
        flex: 1 1 0px !important;
    }
    .sticky-note { min-height: 70px; padding: 12px 8px 6px; }
    .sticky-text { font-size: 0.7rem; }
    .sticky-author { font-size: 0.58rem; }
    .sticky-comment-btn { font-size: 0.62rem; }
    .sticky-category { font-size: 0.5rem; padding: 1px 5px; }
    .sticky-time { font-size: 0.5rem; }
    .reaction-btn { padding: 2px 5px; font-size: 0.6rem; }
    .reaction-count { font-size: 0.58rem; }

    /* My Prayers view */
    .my-prayers-list { overflow-y: auto; flex: 1; min-height: 0; padding: 6px 8px; }

    /* === THREAD OVERLAY: full screen on mobile === */
    .thread-overlay {
        padding: 0;
        align-items: stretch;
        justify-content: stretch;
    }
    .thread-panel {
        width: 100%; height: 100%;
        max-height: 100vh; max-height: 100dvh;
        border-radius: 0;
    }
    .thread-header { padding: 10px 12px; }
    .thread-body { padding: 12px; }
    .thread-compose { padding: 8px 12px 10px; }
    .thread-prayer-card { padding: 12px; }
    .thread-prayer-text { font-size: 0.88rem; }
    .thread-comment.reply { margin-left: 24px; }

    /* === TOGGLE BUTTON === */
    .widget-toggle { right: 16px !important; bottom: 16px !important; }
    .toggle-label { display: none; }
    .widget-toggle { padding: 0; width: 56px; justify-content: center; }

    /* === DEMO PAGE === */
    .demo-background { padding: 12px; }
    .demo-header h1 { font-size: 1.4rem; }
    .demo-content { padding: 20px; }

    /* === OTHER PANELS === */
    .mood-grid { gap: 4px; }
    .mood-btn { padding: 6px 2px; }
    .mood-emoji { font-size: 1.1rem; }
    .mood-text { font-size: 0.55rem; }
    .onboard-header { padding: 24px 20px 16px; }
    .onboard-header h2 { font-size: 1.3rem; }
    .onboard-form { padding: 6px 20px 20px; }
    .input-group input { padding: 12px 14px; font-size: 0.95rem; }
    .onboard-btn { padding: 14px; font-size: 0.95rem; }

    /* Filter row compact */
    .filter-search { padding: 5px 8px; margin-bottom: 4px; }
    .filter-search input { font-size: 0.72rem; }
    .filter-select { font-size: 0.65rem; padding: 4px 6px; }
}

@media (max-width: 360px) {
    .feature-label { display: none; }
    .feature-btn { padding: 6px 4px; }
    .feature-icon { font-size: 1rem; }
    .sticky-wall { grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 6px; }
    .sticky-note { min-height: 60px; padding: 10px 6px 5px; }
    .sticky-text { font-size: 0.65rem; }
}
