/* ============================================================
   RESET & BASE – light, refined
   ============================================================ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #F5F0EA;
    color: #2A2624;
    overflow: hidden;
}

#app {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    background: #FCFAF7;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

/* ============================================================
   MAIN CONTENT – scrollable, with soft padding
   ============================================================ */
#main-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 80px 0;
    scroll-behavior: smooth;
    background: #F8F4EE;
}

#main-content::-webkit-scrollbar {
    width: 3px;
}
#main-content::-webkit-scrollbar-track {
    background: transparent;
}
#main-content::-webkit-scrollbar-thumb {
    background: #D6CEC6;
    border-radius: 10px;
}

.tab-panel {
    display: none;
    animation: fadeUp 0.35s ease;
}
.tab-panel.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0.4;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   HERO – glass‑light, no heavy gradient
   ============================================================ */
.hero-section {
    background: linear-gradient(145deg, #5A2E8A 0%, #7B4FAE 80%);
    padding: 28px 20px 36px 20px;
    border-radius: 0 0 28px 28px;
    margin-bottom: 20px;
    position: relative;
    box-shadow: 0 4px 20px rgba(91, 46, 138, 0.12);
}

.hero-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.hero-top .greeting {
    font-size: clamp(13px, 1.4vw, 17px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.2px;
    margin-bottom: 2px;
}
.hero-top h1 {
    font-size: clamp(26px, 3.8vw, 40px);
    font-weight: 500;
    color: #FFFFFF;
    letter-spacing: -0.3px;
    margin: 0;
}

.streak-badge {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: clamp(12px, 0.9vw, 15px);
    font-weight: 400;
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}
.streak-badge i {
    margin-right: 4px;
}

/* Glass verse card – ultra‑light */
.hero-verse {
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 20px;
    padding: 20px 20px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.hero-verse .fa-quote-left {
    color: rgba(255, 255, 255, 0.35);
    font-size: 16px;
    margin-bottom: 2px;
}
.hero-verse .verse-text {
    font-size: clamp(18px, 2.2vw, 28px);
    font-weight: 400;
    color: #FFFFFF;
    line-height: 1.4;
    margin: 2px 0 6px 0;
}
.hero-verse .verse-ref {
    font-size: clamp(13px, 0.9vw, 16px);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.2px;
}

/* ============================================================
   QUICK ACTIONS – refined circles
   ============================================================ */
.quick-actions {
    padding: 0 20px 12px 20px;
}
.quick-actions h3 {
    font-size: clamp(15px, 1.1vw, 19px);
    font-weight: 500;
    color: #2A2624;
    margin-bottom: 16px;
}
.action-grid {
    display: grid;
    gap: 14px;
}
.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: 0.15s;
}
.action-item i {
    width: clamp(54px, 7vw, 76px);
    height: clamp(54px, 7vw, 76px);
    background: #FFFFFF;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(20px, 2.2vw, 30px);
    color: #6B3FA0;
    box-shadow: 0 2px 12px rgba(107, 63, 160, 0.04);
    border: 1px solid #EFEAE4;
    transition: 0.15s;
}
.action-item:active i {
    transform: scale(0.95);
    background: #F5F0EA;
}
.action-item span {
    font-size: clamp(11px, 0.8vw, 14px);
    font-weight: 400;
    color: #4A4442;
    letter-spacing: 0.1px;
}

/* ============================================================
   DAILY READING CARD – minimal, clean
   ============================================================ */
.daily-reading-card {
    background: #FFFFFF;
    border-radius: 20px;
    padding: 20px 22px;
    margin: 8px 20px 20px 20px;
    border: 1px solid #EFEAE4;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.02);
}
.daily-reading-card .card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.daily-reading-card .card-header i {
    color: #6B3FA0;
    font-size: 16px;
}
.daily-reading-card .card-header h4 {
    font-size: 13px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6B3FA0;
    margin: 0;
}
.daily-reading-card p {
    font-size: clamp(15px, 1.2vw, 19px);
    font-weight: 400;
    color: #2A2624;
    line-height: 1.5;
    margin: 4px 0 6px 0;
}
.daily-reading-card .reading-ref {
    font-size: 13px;
    color: #8A7A7A;
    font-weight: 300;
}
.progress-indicator {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #F0EBE4;
    font-size: 13px;
    font-weight: 400;
    color: #6B3FA0;
}
.progress-indicator i {
    font-size: 13px;
    opacity: 0.4;
}

/* ============================================================
   BIBLE & SERMONS – shared headers
   ============================================================ */
.tab-header {
    padding: 20px 20px 0 20px;
    margin-bottom: 16px;
}
.tab-header h1 {
    font-weight: 500;
    font-size: clamp(24px, 2.8vw, 34px);
    color: #2A2624;
}
.tab-header h1 i {
    color: #6B3FA0;
    margin-right: 6px;
}
.tab-header .subhead {
    font-size: clamp(13px, 0.9vw, 16px);
    color: #8A7A7A;
    font-weight: 300;
    margin-top: 2px;
}

.bible-search {
    display: flex;
    gap: 10px;
    padding: 0 20px;
    margin-bottom: 20px;
}
.bible-search input {
    flex: 1;
    padding: 12px 16px;
    border-radius: 14px;
    border: 1px solid #E8E0D8;
    background: #FFFFFF;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    outline: none;
    transition: 0.2s;
}
.bible-search input:focus {
    border-color: #6B3FA0;
    box-shadow: 0 0 0 3px rgba(107, 63, 160, 0.06);
}
.bible-search button {
    background: #6B3FA0;
    border: none;
    border-radius: 14px;
    width: 50px;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    transition: 0.2s;
}
.bible-search button:hover {
    background: #5A2E8A;
}

/* Sermon list – clean items */
.sermon-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0 20px 20px 20px;
}
.sermon-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #FFFFFF;
    border-radius: 16px;
    padding: 12px 16px;
    border: 1px solid #EFEAE4;
    transition: 0.15s;
    cursor: default;
}
.sermon-item:active {
    background: #F5F0EA;
}
.sermon-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #6B3FA0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}
.sermon-info h4 {
    font-size: clamp(15px, 1.1vw, 18px);
    font-weight: 500;
    color: #2A2624;
    margin: 0;
}
.sermon-info p {
    font-size: 13px;
    color: #8A7A7A;
    font-weight: 300;
    margin: 2px 0 0 0;
}

/* ============================================================
   BOTTOM NAV – pill, light, anchored with Profile tab
   ============================================================ */
#bottom-nav {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid rgba(239, 234, 228, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(4px, 2vw, 24px);
    padding: 6px 12px env(safe-area-inset-bottom, 10px);
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.02);
}

#bottom-nav a,
#bottom-nav .tab-btn {
    text-decoration: none;
    font-family: inherit;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    color: #A09898;
    transition: all 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
    min-width: 52px;
    position: relative;
}

#bottom-nav a i,
#bottom-nav .tab-btn i {
    font-size: clamp(18px, 1.8vw, 24px);
    transition: transform 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

#bottom-nav a span,
#bottom-nav .tab-btn span {
    font-size: clamp(10px, 0.7vw, 13px);
    font-weight: 400;
    letter-spacing: 0.1px;
    transition: opacity 0.2s ease;
}

/* Active state */
#bottom-nav a.active,
#bottom-nav .tab-btn.active {
    background: linear-gradient(135deg, #6B3FA0, #5A2E8A);
    color: #FFFFFF;
    box-shadow: 0 4px 16px rgba(107, 63, 160, 0.25);
    transform: translateY(-1px);
}

#bottom-nav a.active i,
#bottom-nav .tab-btn.active i {
    transform: scale(1.05);
}

/* Hover state for non-active */
#bottom-nav a:not(.active):hover,
#bottom-nav .tab-btn:not(.active):hover {
    color: #6B3FA0;
    background: rgba(107, 63, 160, 0.06);
    transform: translateY(-1px);
}

#bottom-nav a:not(.active):hover i,
#bottom-nav .tab-btn:not(.active):hover i {
    transform: translateY(-2px);
}

/* ============================================================
   PROFILE TAB SPECIAL STYLING
   ============================================================ */
#bottom-nav a[data-tab="profile"],
#bottom-nav .tab-btn[data-tab="profile"] {
    position: relative;
}

/* Profile icon with gradient when active */
#bottom-nav a[data-tab="profile"].active i,
#bottom-nav .tab-btn[data-tab="profile"].active i {
    background: linear-gradient(135deg, #FFFFFF, rgba(255, 255, 255, 0.8));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Profile hover state */
#bottom-nav a[data-tab="profile"]:not(.active):hover i,
#bottom-nav .tab-btn[data-tab="profile"]:not(.active):hover i {
    background: linear-gradient(135deg, #6B3FA0, #9B6FC0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Profile active indicator dot */
#bottom-nav a[data-tab="profile"].active::after,
#bottom-nav .tab-btn[data-tab="profile"].active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #FFFFFF;
    opacity: 0.6;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 480px) {
    #bottom-nav {
        gap: clamp(2px, 1.5vw, 12px);
        padding: 4px 8px env(safe-area-inset-bottom, 8px);
    }

    #bottom-nav a,
    #bottom-nav .tab-btn {
        padding: 4px 10px;
        min-width: 44px;
        gap: 0px;
    }

    #bottom-nav a i,
    #bottom-nav .tab-btn i {
        font-size: clamp(16px, 1.6vw, 20px);
    }

    #bottom-nav a span,
    #bottom-nav .tab-btn span {
        font-size: clamp(8px, 0.6vw, 10px);
    }
}

@media (max-width: 380px) {
    #bottom-nav {
        gap: 2px;
        padding: 4px 4px env(safe-area-inset-bottom, 6px);
    }

    #bottom-nav a,
    #bottom-nav .tab-btn {
        padding: 3px 8px;
        min-width: 36px;
    }

    #bottom-nav a i,
    #bottom-nav .tab-btn i {
        font-size: clamp(14px, 1.4vw, 17px);
    }

    #bottom-nav a span,
    #bottom-nav .tab-btn span {
        font-size: 7px;
    }
}

/* ============================================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================================ */
@media (hover: none) {
    #bottom-nav a:not(.active):hover,
    #bottom-nav .tab-btn:not(.active):hover {
        transform: none !important;
        background: transparent !important;
    }

    #bottom-nav a:not(.active):hover i,
    #bottom-nav .tab-btn:not(.active):hover i {
        transform: none !important;
    }

    #bottom-nav a[data-tab="profile"]:not(.active):hover i,
    #bottom-nav .tab-btn[data-tab="profile"]:not(.active):hover i {
        background: none !important;
        -webkit-text-fill-color: #A09898 !important;
    }

    #bottom-nav a.active,
    #bottom-nav .tab-btn.active {
        transform: none !important;
    }

    #bottom-nav a.active i,
    #bottom-nav .tab-btn.active i {
        transform: none !important;
    }
}

/* ============================================================
   DARK MODE SUPPORT
   ============================================================ */
@media (prefers-color-scheme: dark) {
    #bottom-nav {
        background: rgba(30, 26, 26, 0.92);
        border-top-color: rgba(255, 255, 255, 0.06);
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
    }

    #bottom-nav a,
    #bottom-nav .tab-btn {
        color: rgba(255, 255, 255, 0.5);
    }

    #bottom-nav a:not(.active):hover,
    #bottom-nav .tab-btn:not(.active):hover {
        color: #9B6FC0;
        background: rgba(155, 111, 192, 0.08);
    }

    #bottom-nav a.active,
    #bottom-nav .tab-btn.active {
        background: linear-gradient(135deg, #6B3FA0, #5A2E8A);
        color: #FFFFFF;
        box-shadow: 0 4px 16px rgba(107, 63, 160, 0.3);
    }

    #bottom-nav a[data-tab="profile"]:not(.active):hover i,
    #bottom-nav .tab-btn[data-tab="profile"]:not(.active):hover i {
        background: linear-gradient(135deg, #9B6FC0, #6B3FA0);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
#bottom-nav a:focus-visible,
#bottom-nav .tab-btn:focus-visible {
    outline: 2px solid #6B3FA0;
    outline-offset: 2px;
    border-radius: 30px;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    #bottom-nav a,
    #bottom-nav .tab-btn {
        transition: none !important;
    }

    #bottom-nav a i,
    #bottom-nav .tab-btn i {
        transition: none !important;
    }

    #bottom-nav a:not(.active):hover,
    #bottom-nav .tab-btn:not(.active):hover {
        transform: none !important;
    }

    #bottom-nav a:not(.active):hover i,
    #bottom-nav .tab-btn:not(.active):hover i {
        transform: none !important;
    }

    #bottom-nav a.active,
    #bottom-nav .tab-btn.active {
        transform: none !important;
    }

    #bottom-nav a.active i,
    #bottom-nav .tab-btn.active i {
        transform: none !important;
    }
}

/* ============================================================
   SAFE AREA FOR NOTCH DEVICES
   ============================================================ */
@supports (padding: max(0px)) {
    #bottom-nav {
        padding-bottom: max(10px, env(safe-area-inset-bottom, 10px));
    }
       }

/* ============================================================
   RESPONSIVE – maintain lightness
   ============================================================ */
@media (max-width: 640px) {
    .hero-section {
        border-radius: 0 0 20px 20px;
        padding: 20px 16px 28px 16px;
    }
    .daily-reading-card {
        margin: 6px 16px 16px 16px;
        padding: 16px 16px;
    }
    .quick-actions {
        padding: 0 16px 8px 16px;
    }
    .tab-header {
        padding: 16px 16px 0 16px;
    }
    .bible-search {
        padding: 0 16px;
    }
    .sermon-list {
        padding: 0 16px 16px 16px;
    }
    #bottom-nav {
        gap: 2px;
        padding: 4px 4px env(safe-area-inset-bottom, 6px);
    }
    #bottom-nav a,
    #bottom-nav .tab-btn {
        min-width: 44px;
        padding: 4px 8px;
    }
}

@media (min-width: 768px) {
    .hero-section {
        padding: 36px 40px 44px 40px;
        border-radius: 0 0 32px 32px;
    }
    .daily-reading-card {
        margin: 12px 40px 24px 40px;
        padding: 24px 28px;
    }
    .quick-actions {
        padding: 0 40px 16px 40px;
    }
    .tab-header {
        padding: 24px 40px 0 40px;
    }
    .bible-search {
        padding: 0 40px;
    }
    .sermon-list {
        padding: 0 40px 24px 40px;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
    #bottom-nav {
        gap: 16px;
        padding: 10px 32px env(safe-area-inset-bottom, 14px);
    }
    #bottom-nav a,
    #bottom-nav .tab-btn {
        padding: 8px 20px;
    }
}

@media (min-width: 1024px) {
    .action-item i {
        width: 80px;
        height: 80px;
        font-size: 32px;
    }
    .sermon-list {
        grid-template-columns: 1fr 1fr 1fr;
    }
}
