:root {
    --bg: #FAF7F3;
    --card: #FFFFFF;
    --primary: #5F4A73;
    --secondary: #B79CCF;
    --accent: #CBA96A;
    --text: #2E2E2E;
    --border: #ECE4DA;
    --glass: rgba(255, 255, 255, .55);
    --shadow-sm: 0 4px 16px -6px rgba(95, 74, 115, .14);
    --shadow-md: 0 14px 34px -12px rgba(95, 74, 115, .22);
    --radius-lg: 24px;
    --radius-md: 18px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    background: var(--bg);
    color: var(--text);
    padding-bottom: 84px;
    min-height: 100vh;
    overflow-x: hidden;
}

@media (min-width:768px) {
    body {
        padding-bottom: 0;
    }
}

.quranic {
    font-family: 'Amiri Quran', serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

input {
    font-family: inherit;
}

::selection {
    background: var(--secondary);
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}

/* ---------- Top nav (desktop) ---------- */
.top-nav {
    display: none;
    position: sticky;
    top: 0;
    z-index: 60;
    align-items: center;
    justify-content: space-between;
    padding: 16px 40px;
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}

@media (min-width:768px) {
    .top-nav {
        display: flex;
    }
}

.top-nav .brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: var(--primary);
    font-size: 18px;
}

.top-nav .brand-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 2px 6px rgba(95, 74, 115, 0.15));
}

.top-nav .brand-icon-img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.08));
}

.top-nav .links {
    display: flex;
    gap: 6px;
}

.top-nav .links button {
    padding: 9px 18px;
    border-radius: 999px;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    transition: .2s;
}

.top-nav .links button.active,
.top-nav .links button:hover {
    background: rgba(95, 74, 115, .09);
}

.brand-mobile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 20px 6px;
}

@media (min-width:768px) {
    .brand-mobile {
        display: none;
    }
}

.brand-mobile .logo {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(150deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(95, 74, 115, 0.25);
}

.brand-mobile b {
    font-size: 16px;
    color: var(--primary);
}

.brand-mobile span {
    font-size: 11.5px;
    color: var(--secondary);
    display: block;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: pageIn .45s ease;
}

@keyframes pageIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Glass card ---------- */
.glass {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 88svh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 22px;
    overflow: hidden;
    background-image: url('Hero.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero .aurora {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(38% 32% at 22% 24%, rgba(183, 156, 207, .30), transparent 70%),
        radial-gradient(40% 34% at 78% 20%, rgba(203, 169, 106, .20), transparent 70%),
        radial-gradient(46% 40% at 50% 85%, rgba(95, 74, 115, .20), transparent 70%),
        rgba(250, 247, 243, 0.60);
    animation: drift 18s ease-in-out infinite alternate;
}

@keyframes drift {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-3%, 2%) scale(1.06);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 520px;
}

.lantern {
    width: 60px;
    height: 60px;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: radial-gradient(circle, #FBF0D8 0%, var(--accent) 68%, transparent 100%);
    box-shadow: 0 0 46px 14px rgba(203, 169, 106, .4);
    animation: pulseGlow 3.2s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        opacity: .7;
        transform: scale(1);
    }

    50% {
        opacity: 1;
        transform: scale(1.1);
    }
}

.bismillah {
    font-size: 13.5px;
    color: var(--secondary);
    margin-bottom: 10px;
    letter-spacing: .3px;
}

.hero h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 14px;
    line-height: 1.4;
}

.hero .farewell {
    font-size: 15px;
    color: var(--text);
    opacity: .75;
    line-height: 1.9;
    margin-bottom: 26px;
}

.hero .dua-line {
    font-size: 14.5px;
    color: var(--primary);
    line-height: 2.1;
    margin-bottom: 30px;
}

.hero-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.hero-btn {
    padding: 13px 22px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
    transition: transform .18s ease, box-shadow .18s ease;
}

.hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-btn.primary {
    background: linear-gradient(150deg, var(--primary), #4a3a5c);
    color: #fff;
    border: none;
}

.section-pad {
    padding: 20px 20px 6px;
    max-width: 720px;
    margin: 0 auto;
}

@media (min-width:768px) {
    .section-pad {
        padding: 36px 20px 6px;
    }
}

/* ---------- About ---------- */
.about {
    margin: 14px auto 20px;
    max-width: 680px;
    padding: 0 20px;
}

.about .glass {
    padding: 26px 24px;
}

.about h2 {
    font-size: 19px;
    color: var(--primary);
    margin-bottom: 12px;
    font-weight: 700;
}

.about h2::after {
    content: "";
    display: block;
    width: 36px;
    height: 3px;
    background: var(--accent);
    margin-top: 9px;
    border-radius: 3px;
}

.about p {
    font-size: 14.5px;
    line-height: 2.1;
    color: var(--text);
    opacity: .85;
}

/* ---------- Quote ---------- */
.quote-wrap {
    margin: 6px auto 22px;
    max-width: 680px;
    padding: 0 20px;
}

.quote-box {
    background: linear-gradient(150deg, var(--primary), #4a3a5c);
    color: #F4EFF7;
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    text-align: center;
    position: relative;
}

.quote-box .mark {
    font-size: 32px;
    color: var(--accent);
    line-height: 1;
}

.quote-box p {
    font-family: 'Amiri Quran';
    font-size: 19px;
    line-height: 2.1;
    margin-top: 10px;
    transition: opacity .4s ease;
}

.quote-box .src {
    font-size: 11.5px;
    opacity: .65;
    margin-top: 14px;
}

.quote-refresh {
    margin-top: 14px;
    font-size: 12px;
    color: #F4EFF7;
    opacity: .7;
    text-decoration: underline;
}

/* ---------- Cards grid (home shortcuts) ---------- */
.cards {
    max-width: 680px;
    margin: 0 auto;
    padding: 6px 20px 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 22px 12px 17px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .16s ease, box-shadow .16s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card:active {
    transform: scale(.97);
}

.card .icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: linear-gradient(150deg, #F1E9F5, #F7EEDD);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.card h3 {
    font-size: 14.5px;
    color: var(--text);
    margin-bottom: 5px;
    font-weight: 700;
}

.card p {
    font-size: 11px;
    color: var(--text);
    opacity: .6;
    line-height: 1.5;
}

.footer {
    margin-top: 16px;
    padding: 30px 22px 26px;
    text-align: center;
    background: linear-gradient(150deg, var(--primary), #4a3a5c);
    color: #F4EFF7;
}

.footer .brand-f {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 16px;
    font-family: 'Amiri Quran';
    font-size: 22px;
}

.footer .brand-icon-img {
    width: 52px;
    height: 52px;
    object-fit: contain;
    vertical-align: middle;
    filter: brightness(0) invert(1) drop-shadow(0 2px 6px rgba(0, 0, 0, 0.4));
}

.footer .brand-icon-img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 2px 6px rgba(255, 255, 255, 0.25)) brightness(1.15);
}

.footer p {
    font-size: 12.5px;
    line-height: 2.1;
    opacity: .85;
}

.footer .ig-line {
    margin-top: 12px;
    font-size: 12.5px;
    opacity: .8;
}

.footer .copy {
    margin-top: 16px;
    font-size: 10.5px;
    opacity: .55;
}

/* ---------- section head (inner pages) ---------- */
.section-head {
    text-align: center;
    padding-bottom: 6px;
}

.section-head h1 {
    font-size: 23px;
    color: var(--primary);
    font-weight: 700;
}

.section-head p {
    font-size: 13px;
    color: var(--text);
    opacity: .65;
    margin-top: 7px;
    line-height: 1.8;
}

/* ---------- Tasbeeh ---------- */
.tasbeeh-summary {
    max-width: 680px;
    margin: 16px auto 0;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.summary-chip {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-chip .n {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
}

.summary-chip .l {
    font-size: 11px;
    opacity: .6;
    margin-top: 3px;
}

.tasbeeh-list {
    max-width: 680px;
    margin: 16px auto 30px;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.counter-card {
    position: relative;
    overflow: hidden;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.counter-info h3 {
    font-family: 'Amiri Quran';
    font-size: 19px;
    color: var(--primary);
}

.counter-info .num {
    font-size: 12.5px;
    color: var(--text);
    opacity: .55;
    margin-top: 5px;
}

.tap-btn {
    position: relative;
    overflow: hidden;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(160deg, var(--secondary), var(--primary));
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px -8px rgba(95, 74, 115, .55);
    transition: transform .12s ease;
}

.tap-btn:active {
    transform: scale(.86);
}

.tap-btn.pulse {
    animation: tapPulse .35s ease;
}

@keyframes tapPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(95, 74, 115, .45);
    }

    100% {
        box-shadow: 0 0 0 16px rgba(95, 74, 115, 0);
    }
}

.ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .55);
    transform: scale(0);
    animation: rippleAnim .55s ease-out forwards;
    pointer-events: none;
}

@keyframes rippleAnim {
    to {
        transform: scale(2.6);
        opacity: 0;
    }
}

.reset-all-btn {
    display: block;
    margin: 4px auto 0;
    text-align: center;
    font-size: 13px;
    color: var(--primary);
    text-decoration: underline;
    opacity: .75;
}

/* ---------- modal ---------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(46, 38, 58, .42);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 24px;
}

.modal-overlay.show {
    display: flex;
    animation: fadeIn .2s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-box {
    background: var(--card);
    border-radius: 22px;
    padding: 26px 24px;
    max-width: 320px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.modal-box p {
    font-size: 14.5px;
    margin-bottom: 20px;
    color: var(--text);
    line-height: 1.8;
}

.modal-actions {
    display: flex;
    gap: 10px;
}

.modal-actions button {
    flex: 1;
    padding: 11px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
}

.modal-actions .cancel {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.modal-actions .confirm {
    background: var(--primary);
    color: #fff;
}

/* ---------- Dua grid ---------- */
.dua-grid {
    max-width: 900px;
    margin: 14px auto 30px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width:640px) {
    .dua-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.dua-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 20px 20px 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: space-between;
    transition: transform .16s ease;
}

.dua-card:hover {
    transform: translateY(-2px);
}

.dua-card p {
    font-family: 'Amiri Quran';
    font-size: 16.5px;
    line-height: 2;
    color: var(--primary);
}

.dua-card .row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.heart-btn {
    font-size: 19px;
    color: var(--secondary);
    transition: transform .2s ease;
}

.heart-btn.done {
    color: #c0546f;
    transform: scale(1.2);
}

.done-label {
    font-size: 11.5px;
    color: #c0546f;
    opacity: 0;
    transition: opacity .25s ease;
}

.done-label.show {
    opacity: 1;
}


/* ---------- Quran Reader Modern View ---------- */
.quran-search {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 12px;
}

.quran-search input {
    width: 100%;
    padding: 13px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 14px;
    box-shadow: var(--shadow-sm);
    color: var(--text);
}

.quran-chips {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.chip {
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    transition: .2s;
}

.chip.active,
.chip:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.surah-list {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 20px;
    max-height: 220px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 18px;
}

.surah-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 11px 14px;
    border-radius: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    font-size: 13.5px;
    cursor: pointer;
    color: var(--text);
    transition: .2s;
}

.surah-row.active,
.surah-row:hover {
    border-color: var(--primary);
    background: #F5F0F8;
}

.surah-row .num {
    color: var(--secondary);
    font-size: 12px;
}

.quran-reader-card {
    max-width: 680px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.quran-reader-inner {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 26px 20px;
    text-align: center;
}

.quran-reader-header {
    border-bottom: 1px dashed var(--border);
    padding-bottom: 16px;
    margin-bottom: 16px;
}

.quran-reader-header h2 {
    font-size: 24px;
    color: var(--primary);
    font-weight: 700;
    font-family: 'Amiri Quran', serif;
}

.quran-reader-header .meta-info {
    font-size: 12.5px;
    color: var(--secondary);
    margin-top: 4px;
}

.quran-audio-player {
    margin-top: 14px;
    width: 100%;
    max-width: 400px;
    height: 40px;
    border-radius: 20px;
    outline: none;
}

.quran-bismillah {
    font-family: 'Amiri Quran', serif;
    font-size: 23px;
    color: var(--accent);
    margin: 18px 0 14px;
}

.quran-verses-body {
    font-family: 'Amiri Quran', serif;
    font-size: 22px;
    line-height: 2.3;
    color: var(--text);
    text-align: justify;
    text-align-last: center;
    direction: rtl;
    padding: 10px 8px;
    max-height: 540px;
    overflow-y: auto;
}

.verse-num {
    display: inline-block;
    font-size: 13.5px;
    color: var(--accent);
    font-weight: bold;
    margin: 0 4px;
    vertical-align: middle;
}

.quran-note {
    max-width: 680px;
    margin: 0 auto 30px;
    padding: 0 20px;
    font-size: 11.5px;
    color: var(--text);
    opacity: .6;
    text-align: center;
    line-height: 1.7;
}

/* ---------- Memories ---------- */
.memories-wrap {
    max-width: 680px;
    margin: 0 auto 30px;
    padding: 0 20px;
}

.ig-card {
    background: linear-gradient(150deg, var(--primary), #4a3a5c);
    border-radius: var(--radius-lg);
    padding: 34px 24px;
    text-align: center;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.ig-card .icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    margin: 0 auto 14px;
    background: rgba(255, 255, 255, .14);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
}

.ig-card h3 {
    font-family: 'Amiri Quran';
    font-size: 20px;
    margin-bottom: 8px;
}

.ig-card p {
    font-size: 13px;
    opacity: .85;
    line-height: 1.9;
    margin-bottom: 20px;
}

.ig-btn {
    display: inline-block;
    background: #fff;
    color: var(--primary);
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 13.5px;
}

/* ---------- Album & Lightbox ---------- */
.album-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
}

.album-tabs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
}

.album-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.22s ease;
}

.album-tab:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.album-tab.active {
    background: #FFFFFF;
    color: var(--primary);
    font-weight: 700;
    border-color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.album-tab .count {
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    transition: all 0.22s ease;
}

.album-tab.active .count {
    background: rgba(95, 74, 115, 0.15);
    color: var(--primary);
}

.album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

@media (min-width: 580px) {
    .album-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

.album-item {
    aspect-ratio: 1;
    border-radius: 14px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    cursor: pointer;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.album-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.35);
}

/* ---------- Album pagination ---------- */
.album-pagination {
    grid-column: 1 / -1;   /* span full grid width */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-top: 6px;
    padding: 6px 0 2px;
}

.album-page-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background 0.2s ease, transform 0.18s ease;
}

.album-page-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.album-page-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.album-page-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    min-width: 48px;
    text-align: center;
}

.album-item:active {
    transform: scale(0.97);
}

.album-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.35s ease, transform 0.35s ease;
    opacity: 0;
}

.album-item img.loaded {
    opacity: 1;
}

.album-item:hover img {
    transform: scale(1.05);
}

.album-item .shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.18) 50%, transparent 70%);
    animation: shimmer 1.8s infinite;
    pointer-events: none;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.album-item img.loaded+.shimmer {
    display: none;
}

/* ---------- Lightbox Modal ---------- */
.album-lightbox {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.album-lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(18, 12, 24, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.lightbox-content {
    position: relative;
    z-index: 2;
    max-width: 94vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: lightboxZoom 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lightboxZoom {
    from {
        transform: scale(0.92);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
    margin-bottom: 12px;
    padding: 0 6px;
}

.lightbox-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14.5px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.lightbox-counter {
    font-size: 12px;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 10px;
    border-radius: 999px;
    opacity: 0.9;
}

.lightbox-close {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.08);
}

.lightbox-media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: 78vh;
}

.lightbox-media img {
    max-width: 88vw;
    max-height: 74vh;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all 0.2s ease;
    line-height: 1;
}

.lightbox-nav:hover {
    background: #fff;
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}

.lightbox-prev {
    right: -20px;
}

.lightbox-next {
    left: -20px;
}

@media (max-width: 640px) {
    .lightbox-prev {
        right: 4px;
    }

    .lightbox-next {
        left: 4px;
    }
}

/* ---------- Bottom nav (mobile) ---------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    right: 0;
    left: 0;
    z-index: 60;
    background: var(--glass);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 8px 4px calc(9px + env(safe-area-inset-bottom));
}

@media (min-width:768px) {
    .bottom-nav {
        display: none;
    }
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #9a8ba6;
    font-size: 10.5px;
    padding: 5px 10px;
    border-radius: 12px;
    transition: .2s;
}

.nav-item .ic {
    font-size: 19px;
}

.nav-item.active {
    color: var(--primary);
}

/* ---------- Floating prayer FAB ---------- */
.fab {
    position: fixed;
    left: 18px;
    bottom: 96px;
    z-index: 70;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(150deg, var(--accent), #b48c4d);
    box-shadow: 0 10px 24px -8px rgba(203, 169, 106, .6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    transition: transform .15s ease;
}

@media (min-width:768px) {
    .fab {
        bottom: 28px;
    }
}

.fab:active {
    transform: scale(.88);
}

.particle {
    position: fixed;
    z-index: 71;
    pointer-events: none;
    font-size: 13px;
    color: var(--accent);
    animation: floatUp 1.6s ease-out forwards;
}

@keyframes floatUp {
    0% {
        transform: translateY(0) scale(.6);
        opacity: 0;
    }

    15% {
        opacity: 1;
    }

    100% {
        transform: translateY(-140px) scale(1.1);
        opacity: 0;
    }
}

.fab-msg {
    position: fixed;
    left: 18px;
    bottom: 158px;
    z-index: 71;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 9px 16px;
    font-size: 12.5px;
    color: var(--primary);
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(6px);
    transition: .3s ease;
    font-family: 'Amiri Quran';
}

@media (min-width:768px) {
    .fab-msg {
        bottom: 90px;
    }
}

.fab-msg.show {
    opacity: 1;
    transform: translateY(0);
}

.icon-img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.nav-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: middle;
}

.btn-icon-img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    vertical-align: -3px;
    margin-left: 4px;
}

.h1-icon-img {
    width: 22px;
    height: 22px;
    object-fit: contain;
    vertical-align: -4px;
    margin-right: 6px;
}

.brand-icon-img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    vertical-align: middle;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.tap-icon-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
}

.fab-icon-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.ig-icon-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}