* {
    margin: 0;
    padding: 0;
    box-sizing: border-box
}

:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --text-primary: #111111;
    --text-secondary: #888888;
    --border-light: #e5e5e5;
    --accent: #111111;
    --accent-soft: #f0f0f0;
    --highlight: rgba(0, 0, 0, .04);
    --progress-fill: #111111;
    --icon-color: #555555;
    --shadow: 0 2px 8px rgba(0, 0, 0, .03);
    --nav-highlight: rgba(0, 0, 0, .06);
    --success: #111;
    --danger: #888
}

.dark {
    --bg: #0a0a0a;
    --surface: #141414;
    --text-primary: #eeeeee;
    --text-secondary: #777777;
    --border-light: #222222;
    --accent: #eeeeee;
    --accent-soft: #1e1e1e;
    --highlight: rgba(255, 255, 255, .04);
    --progress-fill: #eeeeee;
    --icon-color: #999999;
    --shadow: 0 2px 8px rgba(0, 0, 0, .25);
    --nav-highlight: rgba(255, 255, 255, .06)
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.5;
    transition: background .2s, color .2s;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

a,
button {
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--border-light);
    outline-offset: 2px;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column
}

/* App Bar */
.app-bar {
    position: sticky;
    top: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    z-index: 20
}

.app-bar-container {
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: -.5px;
    text-decoration: none;
    color: var(--text-primary);
    -webkit-text-fill-color: var(--text-primary);
    background: none
}

.app-bar-actions {
    display: flex;
    gap: 8px
}

.icon-button {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--icon-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s
}

.icon-button:hover {
    background: var(--highlight);
    color: var(--text-primary)
}

/* Main */
.main-content {
    flex: 1;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
    padding: 24px 20px 96px
}

.view {
    display: none
}

.view.active {
    display: block
}

/* Cards */
.card {
    background: var(--surface);
    border-radius: 28px;
    padding: 24px;
    margin-bottom: 16px;
    border: 1px solid var(--border-light);
    transition: .2s
}

.card h3 {
    font-weight: 500;
    font-size: .8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px
}

.meta-chip {
    color: var(--text-secondary);
    font-size: .8rem;
    background: var(--highlight);
    padding: 4px 12px;
    border-radius: 40px;
    border: 1px solid var(--border-light);
    display: inline-block
}

/* Home: Greeting */
.greeting-card {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border-light)
}

.greeting-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start
}

.greeting-label {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: 4px
}

.greeting-name {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -.3px
}

.dark .greeting-card {
    background: var(--surface)
}

.ramadan-badge {
    background: var(--text-primary);
    color: var(--bg);
    padding: 6px 14px;
    border-radius: 40px;
    font-weight: 600;
    font-size: .8rem
}

.hijri-date {
    margin-top: 16px;
    font-size: .8rem;
    color: var(--text-secondary)
}

/* Home: Countdowns */
.countdown-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px
}

.countdown-card {
    text-align: center;
    padding: 20px 16px;
    margin-bottom: 0
}

.countdown-card .material-icons-round {
    font-size: 24px;
    margin-bottom: 8px;
    color: var(--text-secondary)
}

.countdown-label {
    font-size: .7rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 1px
}

.countdown-time {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums
}

.countdown-at {
    font-size: .75rem;
    color: var(--text-secondary);
    margin-top: 4px
}

.suhoor-card .material-icons-round {
    color: var(--text-secondary)
}

.iftar-card .material-icons-round {
    color: var(--text-secondary)
}

/* Home: Next Prayer */
.next-prayer-card {
    border: 1px solid var(--border-light)
}

.next-prayer-header {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px
}

.next-prayer-body {
    text-align: center
}

.next-prayer-body h2 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -.3px
}

.next-prayer-countdown {
    color: var(--text-secondary);
    font-size: .95rem;
    margin-top: 4px;
    font-variant-numeric: tabular-nums
}

/* Home: Progress Ring */
.ramadan-progress-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative
}

.progress-ring {
    width: 120px;
    height: 120px;
    transform: rotate(-90deg)
}

.progress-ring-bg {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 6
}

.progress-ring-fill {
    fill: none;
    stroke: var(--text-primary);
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: 326.73;
    transition: stroke-dashoffset .6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: stroke-dashoffset;
}

.progress-ring-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: 600;
    font-size: 1.5rem;
    color: var(--text-primary)
}

.progress-ring-text small {
    font-size: .8rem;
    font-weight: 400;
    color: var(--text-secondary)
}

/* Home: Verse */
.verse-card blockquote {
    font-family: 'Lateef', 'Amiri', 'Inter', serif;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--text-primary);
    font-style: italic;
    padding: 0;
    margin-bottom: 12px
}

.verse-ref {
    font-size: .8rem;
    color: var(--text-secondary);
    font-weight: 500
}

/* Verse / Hadith Tabs */
.verse-tabs {
    display: flex;
    margin-bottom: 16px;
    background: var(--highlight);
    border-radius: 100px;
    position: relative;
}

.verse-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 12px;
    border: none;
    background: transparent;
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
    transition: color .25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.verse-tab .material-icons-round {
    font-size: 16px;
}

.verse-tab.active {
    color: var(--bg);
}

.verse-tab:active {
    transform: scale(0.96);
}

.verse-tabs .tab-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 50%;
    background: var(--text-primary);
    border-radius: 100px;
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    z-index: 0;
}

.verse-tabs .tab-slider.pos-1 {
    transform: translateX(100%);
}

/* Waqf Rules Rows */
.waqf-row {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
}

.waqf-row:last-child {
    border-bottom: none;
}

.waqf-symbol {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.6rem;
    color: var(--text-primary);
    min-width: 32px;
    text-align: center;
    font-weight: bold;
    line-height: 1;
    padding-top: 2px;
}

.waqf-row strong {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-primary);
}

.waqf-row small {
    font-size: .78rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.waqf-category {
    font-size: .82rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 20px 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
    text-transform: uppercase;
    letter-spacing: .5px;
    opacity: 0.7;
}

.waqf-category:first-of-type {
    margin-top: 16px;
}

/* Prayer View */
.locate-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--highlight);
    cursor: pointer;
    flex-shrink: 0;
    font-family: inherit;
    transition: .2s
}

.locate-btn .material-icons-round {
    font-size: 20px;
    color: var(--text-primary)
}

.locate-btn:hover {
    opacity: .8
}

.prayer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px
}

.location-header {
    display: flex;
    align-items: center;
    gap: 8px
}

.location-header .material-icons-round {
    color: var(--text-secondary);
    font-size: 20px
}

.date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin: 0 0 10px;
    padding: 7px 12px;
    background: var(--highlight);
    border-radius: 40px;
    border: 1px solid var(--border-light);
    font-size: .8rem;
    color: var(--text-secondary)
}

.date-display .material-icons-round {
    font-size: 14px
}

.prayer-grid {
    display: flex;
    flex-direction: column
}

.prayer-time-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    transition: .2s;
    flex-wrap: nowrap;
    width: 100%
}

.prayer-time-row:last-child {
    border-bottom: none
}

.prayer-time-row.highlight {
    background: var(--highlight);
    border-radius: 8px;
    padding: 10px 10px;
    margin: 0 -10px;
    border-bottom-color: transparent
}

.prayer-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 450;
    font-size: .88rem;
    flex-shrink: 0
}

.prayer-name .material-icons-round {
    color: var(--text-secondary);
    font-size: 18px
}

.prayer-time {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    flex-shrink: 0;
    min-width: 80px
}

/* Qibla */
.qibla-card {
    text-align: center
}

.qibla-instruction {
    font-size: .78rem;
    color: var(--text-secondary);
    margin-bottom: 2px;
    line-height: 1.4;
}

.qibla-compass {
    padding: 20px 0 8px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: opacity .3s;
}

.phone-pointer {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 10px solid #e74c3c;
    z-index: 10;
    filter: drop-shadow(0 1px 2px rgba(231, 76, 60, .25));
}

.compass-outer {
    position: relative;
    width: 160px;
    height: 160px;
}

.compass-ring {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 2px solid var(--border-light);
    background: var(--surface);
    box-shadow: 0 1px 10px rgba(0, 0, 0, .05), inset 0 0 12px rgba(0, 0, 0, .02);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    transition: none;
}

.compass-ticks {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.compass-label {
    position: absolute;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-secondary);
    z-index: 3;
    letter-spacing: .3px;
}

.compass-label.north {
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    color: #e74c3c;
    font-size: .78rem;
}

.compass-label.south {
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
}

.compass-label.east {
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
}

.compass-label.west {
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
}

/* Qibla arrow */
.compass-arrow {
    position: absolute;
    width: 4px;
    height: 80px;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    margin-left: -2px;
    z-index: 4;
    pointer-events: none;
}

.compass-arrow-line {
    width: 2px;
    height: 100%;
    margin: 0 auto;
    background: linear-gradient(to top, transparent 0%, #2ecc71 60%);
    border-radius: 2px;
}

.kaaba-tip {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.2rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .12));
}

.compass-center-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-primary);
    z-index: 5;
    box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--border-light);
}

.qibla-degrees {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 10px;
}

.qibla-note {
    font-size: .7rem;
    color: var(--text-secondary);
    margin-top: 2px
}

/* Tracker */
.sub-tabs {
    display: flex;
    margin-bottom: 20px;
    background: var(--highlight);
    border-radius: 100px;
    position: relative;
}

.sub-tab {
    flex: 1;
    padding: 12px 6px;
    border: none;
    background: transparent;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
    transition: color .25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.sub-tab.active {
    color: var(--bg);
}

.sub-tab:active {
    transform: scale(0.93);
}

.sub-tabs .tab-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--text-primary);
    border-radius: 100px;
    transition: left .3s cubic-bezier(0.4, 0, 0.2, 1), width .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    z-index: 0;
}

.subtab-content {
    display: none
}

.subtab-content.active {
    display: block;
    animation: fadeSlideIn .3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

.tracker-list {
    display: flex;
    flex-direction: column
}

.tracker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 9px 0;
    border-bottom: 1px solid var(--border-light);
    font-weight: 450;
    font-size: .85rem
}

.tracker-item:last-child {
    border-bottom: none
}

.checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--text-secondary);
    border-radius: 6px;
    cursor: pointer;
    transition: .1s;
    background: transparent;
    flex-shrink: 0
}

.checkbox:checked {
    background: var(--text-primary);
    border-color: var(--text-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 11px;
    background-position: center;
    background-repeat: no-repeat
}

.dark .checkbox:checked {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%230a0a0a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E")
}

.progress-section {
    margin-top: 16px
}

.progress-bar {
    height: 4px;
    background: var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    width: 100%
}

.progress-fill {
    height: 100%;
    width: 0;
    background: var(--text-primary);
    border-radius: 12px;
    transition: width .3s
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: .78rem
}

.tracker-desc {
    color: var(--text-secondary);
    font-size: .8rem;
    margin-bottom: 12px
}

/* History Calendar */
.history-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px
}

.cal-day {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .65rem;
    font-weight: 500;
    background: var(--highlight);
    color: var(--text-secondary)
}

.cal-day.done {
    background: var(--text-primary);
    color: var(--bg)
}

.cal-day.partial {
    background: var(--accent-soft);
    border: 1px solid var(--text-secondary)
}

.cal-day.today {
    outline: 2px solid var(--text-primary);
    outline-offset: -2px;
    font-weight: 700
}

.cal-day.empty {
    background: transparent
}

/* Juz Grid */
.juz-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    margin-bottom: 20px
}

.juz-item {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    border-radius: 14px;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s;
    color: var(--text-secondary)
}

.juz-item.done {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary)
}

/* Charity & Goals */
.charity-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px
}

.text-input {
    flex: 1;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 10px 14px;
    font-size: .9rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: .2s
}

.text-input:focus {
    border-color: var(--text-primary)
}

.text-input.small {
    max-width: 200px
}

.add-btn {
    background: var(--text-primary);
    color: var(--bg);
    border: none;
    width: 42px;
    height: 42px;
    border-radius: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: .2s
}

.add-btn:hover {
    opacity: .8
}

.charity-list,
.goals-list {
    display: flex;
    flex-direction: column
}

.charity-entry,
.goal-entry {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: .9rem
}

.charity-entry:last-child,
.goal-entry:last-child {
    border-bottom: none
}

.goal-entry.done span {
    text-decoration: line-through;
    opacity: .4
}

.empty-state {
    color: var(--text-secondary);
    text-align: center;
    padding: 20px;
    font-size: .85rem
}

.del-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    font-size: 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: .2s
}

.del-btn:hover {
    color: var(--text-primary)
}

/* Tasbih */
.tasbih-container {
    text-align: center;
    padding: 32px 16px
}

.phrase-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-bottom: 24px
}

.phrase-chip {
    padding: 6px 14px;
    border-radius: 40px;
    border: 1px solid var(--border-light);
    background: transparent;
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    transition: .2s;
    color: var(--text-secondary);
    font-family: inherit
}

.phrase-chip.active {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary)
}

.tasbih-arabic {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    direction: rtl
}

.counter-number {
    font-size: 4.5rem;
    font-weight: 300;
    line-height: 1;
    margin: 16px 0 8px;
    color: var(--text-primary);
    letter-spacing: -2px
}

.tasbih-target {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 28px
}

.tap-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    padding: 14px 44px;
    border-radius: 60px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: .15s;
    font-family: inherit;
    user-select: none
}

.tap-btn:hover {
    background: var(--text-primary);
    color: var(--bg)
}

.tap-btn:active {
    transform: scale(.96) translateZ(0);
}

.tap-btn.pulse {
    animation: pulse .3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateZ(0);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 0, 0, .2)
    }

    70% {
        box-shadow: 0 0 0 10px transparent
    }

    100% {
        box-shadow: 0 0 0 0 transparent
    }
}

.dark .tap-btn.pulse {
    animation: pulseDark .3s
}

@keyframes pulseDark {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, .2)
    }

    70% {
        box-shadow: 0 0 0 10px transparent
    }

    100% {
        box-shadow: 0 0 0 0 transparent
    }
}

.reset-btn {
    margin-top: 20px;
    font-size: .8rem;
    color: var(--text-secondary);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-color: var(--border-light)
}

/* Duas */
.dua-item {
    margin-bottom: 6px;
    border: 1px solid var(--border-light);
    border-radius: 18px;
    background: var(--bg-secondary);
    overflow: hidden
}

.dua-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    font-weight: 450;
    font-size: .9rem
}

.dua-header .material-icons-round {
    font-size: 18px;
    color: var(--text-secondary);
    transition: .2s
}

.dua-header.open .material-icons-round:not(.favorite-icon) {
    transform: rotate(180deg)
}

.dua-body {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    padding: 0 16px 0;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.3s ease;
    border-top: 1px solid transparent;
}

.dua-body.open {
    max-height: 2000px;
    opacity: 1;
    padding: 0 16px 16px;
    border-top-color: var(--border-light);
}

.dua-arabic {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.6rem;
    direction: rtl;
    text-align: right;
    line-height: 2;
    color: var(--text-primary);
    margin: 12px 0
}

.dua-translit {
    font-style: italic;
    color: var(--text-secondary);
    font-size: .85rem;
    margin-bottom: 8px
}

.dua-translation {
    color: var(--text-primary);
    font-size: .85rem;
    line-height: 1.6
}

/* 99 Names */
.search-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--border-light);
    border-radius: 40px;
    padding: 8px 16px;
    margin-bottom: 16px
}

.search-box .material-icons-round {
    color: var(--text-secondary);
    font-size: 18px
}

.search-box input {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: .9rem;
    outline: none;
    font-family: inherit
}

.search-box input::placeholder {
    color: var(--text-secondary)
}

.names-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px
}

.name-card {
    padding: 8px 4px;
    background: var(--highlight);
    border-radius: 12px;
    border: 1px solid transparent;
    text-align: center;
    transition: .2s
}

.name-card:hover {
    border-color: var(--border-light)
}

.name-arabic {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1px
}

.name-translit {
    font-size: .62rem;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: .2px
}

.name-meaning {
    font-size: .58rem;
    color: var(--text-secondary);
    margin-top: 1px
}

/* Settings */
.setting-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    font-weight: 450;
    font-size: .9rem
}

.setting-row:last-child {
    border-bottom: none
}

.toggle {
    position: relative;
    width: 44px;
    height: 26px;
    display: inline-block
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border-light);
    border-radius: 26px;
    transition: .2s
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: var(--bg);
    border-radius: 50%;
    transition: .2s;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .15)
}

.toggle input:checked+.toggle-slider {
    background: var(--text-primary)
}

.toggle input:checked+.toggle-slider::before {
    transform: translateX(18px)
}

.about-text {
    color: var(--text-secondary);
    font-size: .95rem;
    line-height: 1.7
}

/* Bottom Nav */
.bottom-nav {
    position: fixed;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 32px);
    max-width: 520px;
    height: 60px;
    background: var(--surface);
    border-radius: 40px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    z-index: 30;
    padding: 0 4px
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: .65rem;
    font-weight: 500;
    transition: .2s;
    padding: 8px 14px;
    border-radius: 20px;
    min-width: 52px
}

.bottom-nav-link .material-icons-round {
    font-size: 20px;
    color: var(--text-secondary);
    transition: .2s
}

.bottom-nav-link.active {
    color: var(--text-primary)
}

.bottom-nav-link.active .material-icons-round {
    color: var(--text-primary)
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px)
}

.modal-card {
    background: var(--surface);
    border-radius: 20px;
    padding: 32px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border-light)
}

.modal-card h2 {
    margin-bottom: 8px;
    font-size: 1.3rem;
    font-weight: 600
}

.modal-card p {
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-size: .9rem
}

.location-hint {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 6px;
    display: block;
    text-align: center;
    margin: 8px auto 0;
    cursor: pointer;
    transition: .2s;
    opacity: 0.8;
}

.location-hint:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.03);
    display: inline-block;
    /* Make it look like a button on hover */
}

.location-hint:active {
    transform: scale(0.96);
}

/* Confetti */
#confettiContainer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 200
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    top: -20px;
    animation: confettiFall 3s ease-out forwards
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translateY(0) rotate(0)
    }

    100% {
        opacity: 0;
        transform: translateY(100vh) rotate(720deg)
    }
}

/* Install Button */
.install-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--text-primary);
    color: var(--bg);
    border: none;
    border-radius: 40px;
    padding: 8px 16px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: .2s
}

.install-btn:hover {
    opacity: .8
}

.install-btn .material-icons-round {
    font-size: 18px
}

/* Streak Card */
.streak-card {
    border: 1px solid var(--border-light)
}

.streak-content {
    display: flex;
    align-items: center;
    gap: 16px
}

.streak-fire {
    font-size: 2rem
}

.streak-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary)
}

.streak-label {
    font-size: .8rem;
    color: var(--text-secondary);
    margin-top: 2px
}

/* Daily Message & Stats */
.daily-message {
    text-align: center;
    font-size: .78rem;
    color: var(--text-secondary);
    margin-top: 10px;
    padding: 8px;
    background: var(--highlight);
    border-radius: 8px;
    border: 1px solid var(--border-light)
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 6px;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 10px
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary)
}

.stat-label {
    font-size: .65rem;
    color: var(--text-secondary);
    margin-top: 3px;
    font-weight: 500
}

.stat-insights {
    display: flex;
    flex-direction: column;
    gap: 6px
}

.insight-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: .78rem;
    color: var(--text-primary)
}

.insight-item .material-icons-round {
    font-size: 16px;
    color: var(--text-secondary);
    flex-shrink: 0
}

/* Journal */
.journal-textarea {
    width: 100%;
    min-height: 150px;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px;
    font-size: .9rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    resize: vertical;
    transition: border-color .2s;
    line-height: 1.6
}

.journal-textarea:focus {
    border-color: var(--text-primary)
}

.journal-date {
    font-size: .75rem;
    color: var(--text-secondary);
    margin-bottom: 10px
}

.journal-save-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    margin-top: 12px;
    background: var(--text-primary);
    color: var(--bg);
    border: none;
    border-radius: 100px;
    font-size: .9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .2s
}

.journal-save-btn:hover {
    opacity: .85
}

.journal-save-btn .material-icons-round {
    font-size: 20px
}

.journal-saved-badge {
    display: block;
    text-align: center;
    font-size: .8rem;
    color: var(--text-secondary);
    margin-top: 8px;
    opacity: 0;
    transition: opacity .3s
}

.past-journal-entry {
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 10px
}

.past-journal-date {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px
}

.past-journal-text {
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap
}

/* Last 10 Nights */
.last-ten-card {
    border: 1px solid var(--border-light)
}

.last-ten-subtitle {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: 16px
}

.last-ten-nights {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px
}

.night-circle {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    color: var(--text-secondary)
}

.night-circle.odd {
    border-color: var(--text-primary);
    color: var(--text-primary);
    font-weight: 700
}

.night-circle.current {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary)
}

.night-circle.passed {
    opacity: .4
}

.last-ten-dua {
    background: var(--highlight);
    border-radius: 12px;
    padding: 16px;
    text-align: center
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s
}

.action-btn:hover {
    background: var(--highlight)
}

/* Update Toast */
/* Update Toast */
.update-toast {
    position: fixed;
    bottom: 90px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #1a1a1a;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: .4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: max-content;
    max-width: 90%;
}

.dark .update-toast {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #111111;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.update-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.update-toast span {
    font-size: 0.9rem;
    font-weight: 500;
}

.update-toast button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.3);
    transition: .2s;
}

.update-toast button:active {
    transform: scale(0.95);
}

/* Tracker Navigation */
.tracker-header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-light);
}

.nav-btn {
    display: none;
}

/* Calendar Selected State */
.cal-day.selected {
    box-shadow: inset 0 0 0 2px var(--text-primary);
    border-radius: 6px;
}

.past-journal-date {
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px
}

.past-journal-text {
    font-size: .85rem;
    color: var(--text-primary);
    line-height: 1.5;
    white-space: pre-wrap
}

/* Last 10 Nights */
.last-ten-card {
    border: 1px solid var(--border-light)
}

.last-ten-subtitle {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-bottom: 16px
}

.last-ten-nights {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 20px
}

.night-circle {
    aspect-ratio: 1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    color: var(--text-secondary)
}

.night-circle.odd {
    border-color: var(--text-primary);
    color: var(--text-primary);
    font-weight: 700
}

.night-circle.current {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary)
}

.night-circle.passed {
    opacity: .4
}

.last-ten-dua {
    background: var(--highlight);
    border-radius: 12px;
    padding: 16px;
    text-align: center
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid var(--text-primary);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: .2s
}

.action-btn:hover {
    background: var(--highlight)
}


/* Tasbih Chart */
.tasbih-chart {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.chart-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.chart-bar-container {
    height: 8px;
    background: var(--highlight);
    border-radius: 4px;
    overflow: hidden;
}

.chart-bar-fill {
    height: 100%;
    background: var(--text-primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* ===================== QURAN READER ===================== */

/* Open card / button */
.quran-open-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: .2s;
}

.quran-open-card:active {
    transform: scale(0.98);
    opacity: 0.8;
}

/* Overlay */
.quran-overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: var(--bg);
    overflow: hidden;
    animation: quranSlideUp .3s ease;
}

@keyframes quranSlideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }

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

.quran-view {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.quran-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    z-index: 10;
    flex-shrink: 0;
}

.quran-header h2 {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -.3px;
}

.quran-surah-title {
    flex: 1;
    min-width: 0;
}

.quran-surah-title h2 {
    font-size: 1.05rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quran-surah-title small {
    display: block;
    font-size: .75rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.quran-back-btn,
.quran-bookmark-filter-btn,
.quran-bookmark-btn {
    background: var(--highlight);
    border: 1px solid var(--border-light);
    color: var(--icon-color);
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: .2s;
    flex-shrink: 0;
}

.quran-back-btn:hover,
.quran-bookmark-filter-btn:hover,
.quran-bookmark-btn:hover {
    background: var(--highlight);
    color: var(--text-primary);
}

.quran-bookmark-filter-btn.active {
    background: var(--text-primary);
    color: var(--bg);
    border-color: var(--text-primary);
}

.quran-bookmark-btn.bookmarked {
    color: var(--text-primary);
}

/* Search */
.quran-search-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 16px 20px 8px;
    padding: 10px 14px;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 100px;
    flex-shrink: 0;
}

.quran-search-container .material-icons-round {
    color: var(--text-secondary);
    font-size: 20px;
}

.quran-search-container input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: .9rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}

.quran-search-container input::placeholder {
    color: var(--text-secondary);
}

/* Surah/Para Tabs */
.quran-tabs {
    display: flex;
    margin: 8px 20px 4px;
    background: var(--highlight);
    border-radius: 100px;
    flex-shrink: 0;
    position: relative;
}

.quran-tab {
    flex: 1;
    padding: 12px 6px;
    border: none;
    background: transparent;
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-secondary);
    font-family: inherit;
    transition: color .25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.quran-tab.active {
    color: var(--bg);
}

.quran-tab:active {
    transform: scale(0.93);
}

.quran-tabs .tab-slider {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--text-primary);
    border-radius: 100px;
    transition: left .3s cubic-bezier(0.4, 0, 0.2, 1), width .3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .1);
    z-index: 0;
}

/* Surah List */
.quran-surah-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px 20px 96px;
    -webkit-overflow-scrolling: touch;
}

.quran-surah-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: .15s;
}

.quran-surah-item:last-child {
    border-bottom: none;
}

.quran-surah-item:active {
    opacity: 0.6;
}

.quran-surah-num {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.quran-surah-info {
    flex: 1;
    min-width: 0;
}

.quran-surah-info-name {
    font-weight: 500;
    font-size: .95rem;
    color: var(--text-primary);
}

.quran-surah-info-detail {
    font-size: .78rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

.quran-surah-arabic {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.6rem;
    color: var(--text-primary);
    flex-shrink: 0;
}

.quran-surah-bookmark {
    color: var(--text-secondary);
    font-size: 20px;
    flex-shrink: 0;
    cursor: pointer;
    transition: .2s;
    padding: 4px;
}

.quran-surah-bookmark.active {
    color: var(--text-primary);
}

/* Ayah List / Reader */
.quran-ayah-list {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 96px;
    -webkit-overflow-scrolling: touch;
}

.quran-bismillah {
    text-align: center;
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.6rem;
    color: var(--text-primary);
    padding: 16px 0 20px;
    margin-bottom: 4px;
    opacity: 0.8;
}

/* Book-style Surah Header */
.quran-book-surah-header {
    text-align: center;
    padding: 28px 16px 20px;
    margin: 8px 0;
    border-top: 2px solid var(--border-light);
    border-bottom: 2px solid var(--border-light);
    background: var(--highlight);
    border-radius: 20px;
}

.quran-book-surah-header:first-child {
    margin-top: 0;
}

.quran-book-surah-name-ar {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.4;
}

.quran-book-surah-name-en {
    font-size: .8rem;
    color: var(--text-secondary);
    font-weight: 500;
    letter-spacing: .5px;
}

/* Play All Button */
.quran-play-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 10px;
    padding: 6px 14px;
    border: 1px solid var(--border-light);
    background: transparent;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    transition: .2s;
}

.quran-play-all-btn .material-icons-round {
    font-size: 16px;
}

.quran-play-all-btn:active {
    opacity: 0.6;
}

/* Currently Playing Ayah */
.quran-book-ayah.quran-playing {
    background: rgba(var(--text-primary-rgb, 0, 0, 0), 0.04);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 2px -12px;
}

/* Book-style Ayah */
.quran-book-ayah {
    padding: 10px 0;
}

.quran-book-arabic {
    font-family: 'Lateef', 'Amiri', serif;
    font-size: 1.9rem;
    line-height: 2.4;
    color: var(--text-primary);
    text-align: right;
    direction: rtl;
    margin: 0 0 6px 0;
    word-spacing: 3px;
}

.quran-book-ayah-marker {
    font-size: 1rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.quran-book-translation {
    font-size: .78rem;
    line-height: 1.6;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0 0 2px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

/* Reader Hint */
.quran-reader-hint {
    padding: 6px 14px;
    font-size: .68rem;
    color: var(--text-secondary);
    opacity: 0.6;
    text-align: center;
}

/* Last Read Marker */
.quran-book-ayah.quran-last-read {
    background: var(--highlight);
    border-radius: 10px;
    padding: 12px 14px;
    margin: 4px -14px;
    border-left: 3px solid var(--text-primary);
}

.quran-last-read-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .7rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 8px;
}

.quran-last-read-badge .material-icons-round {
    font-size: 14px;
}

/* Continue Reading Card */
.quran-continue-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 20px;
    padding: 12px 16px;
    background: var(--highlight);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    cursor: pointer;
    transition: .2s;
    flex-shrink: 0;
}

.quran-continue-card:active {
    opacity: 0.7;
    transform: scale(0.98);
}

/* Reader Toolbar */
.quran-reader-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 16px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.quran-reader-toolbar button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: .2s;
}

.quran-reader-toolbar button:active {
    background: var(--highlight);
}

.quran-reader-toolbar button.active {
    color: var(--text-primary);
    background: var(--highlight);
}

.quran-reader-toolbar button .material-icons-round {
    font-size: 20px;
}

/* Next/Prev Navigation */
.quran-surah-nav {
    display: flex;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    gap: 10px;
}

.quran-surah-nav button {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--border-light);
    background: var(--highlight);
    border-radius: 100px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
    font-family: inherit;
    transition: .2s;
}

.quran-surah-nav button .material-icons-round {
    font-size: 16px;
}

.quran-surah-nav button:disabled {
    opacity: 0.3;
    cursor: default;
}

.quran-surah-nav button:not(:disabled):active {
    opacity: 0.7;
}

/* Jump Panel */
.quran-jump-panel {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow-y: auto;
}

.quran-jump-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quran-jump-section label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.quran-jump-section select {
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    background: var(--highlight);
    border-radius: 10px;
    font-size: .85rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%23999' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.quran-jump-divider {
    text-align: center;
    font-size: .75rem;
    color: var(--text-secondary);
    opacity: 0.6;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.quran-jump-row input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    background: var(--highlight);
    border-radius: 16px;
    font-size: .85rem;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
}

.quran-jump-row input::placeholder {
    color: var(--text-secondary);
}

.quran-jump-row button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 16px;
    border: none;
    background: var(--text-primary);
    color: var(--bg);
    border-radius: 16px;
    font-size: .85rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: .2s;
}

.quran-jump-row button:active {
    opacity: 0.7;
}

/* Search Results */
.quran-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 8px 20px;
}

.quran-search-result-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    cursor: pointer;
    transition: .2s;
}

.quran-search-result-item:active {
    opacity: 0.6;
}

.quran-search-result-ref {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.quran-search-result-text {
    font-size: .82rem;
    line-height: 1.5;
    color: var(--text-secondary);
}

.quran-search-result-text mark {
    background: rgba(255, 200, 0, 0.3);
    color: inherit;
    border-radius: 2px;
    padding: 0 2px;
}

/* Audio Play Button */
.quran-play-btn {
    display: block;
    color: var(--text-secondary);
    font-size: 22px !important;
    cursor: pointer;
    opacity: 0.5;
    transition: .2s;
    margin-top: 4px;
}

.quran-play-btn:hover,
.quran-play-btn:active {
    opacity: 1;
    color: var(--text-primary);
}

/* Transliteration */
.quran-book-translit {
    font-size: .82rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 2px 0 6px;
    font-style: italic;
    opacity: 0.8;
}

/* Tajweed Colors */
.tajweed-ghunnah {
    color: #e53935;
}

.tajweed-qalqalah {
    color: #1e88e5;
}

.tajweed-idgham {
    color: #43a047;
}

.tajweed-ikhfa {
    color: #f57c00;
}

.tajweed-iqlab {
    color: #8e24aa;
}

.tajweed-madd {
    color: #00897b;
}

/* Night Reading Mode */
.quran-night-mode {
    background: #1a1410 !important;
}

.quran-night-mode .quran-header {
    background: #1e1812 !important;
    border-color: #3a2e22 !important;
}

.quran-night-mode .quran-reader-toolbar {
    border-color: #3a2e22 !important;
}

.quran-night-mode .quran-reader-toolbar button {
    color: #b8a88a !important;
}

.quran-night-mode .quran-reader-toolbar button.active {
    color: #e8dcc8 !important;
    background: #2a2018 !important;
}

.quran-night-mode .quran-surah-nav {
    border-color: #3a2e22 !important;
}

.quran-night-mode .quran-surah-nav button {
    background: #2a2018 !important;
    border-color: #3a2e22 !important;
    color: #e8dcc8 !important;
}

.quran-night-mode .quran-book-surah-header {
    background: #2a2018 !important;
    border-color: #3a2e22 !important;
}

.quran-night-mode .quran-book-surah-name-ar,
.quran-night-mode .quran-header h2,
.quran-night-mode .quran-header small {
    color: #e8dcc8 !important;
}

.quran-night-mode .quran-book-surah-name-en {
    color: #b8a88a !important;
}

.quran-night-mode .quran-book-arabic {
    color: #f0e6d0 !important;
}

.quran-night-mode .quran-book-translation {
    color: #8a7e6a !important;
    border-color: #2a2018 !important;
}

.quran-night-mode .quran-bismillah {
    color: #e8dcc8 !important;
}

.quran-night-mode .quran-book-ayah-marker {
    color: #8a7e6a !important;
}

.quran-night-mode .quran-reader-hint {
    color: #8a7e6a !important;
}

.quran-night-mode .quran-play-btn {
    color: #8a7e6a !important;
}

.quran-night-mode .quran-last-read-badge {
    color: #e8dcc8 !important;
}

.quran-night-mode .quran-book-ayah.quran-last-read {
    background: #2a2018 !important;
    border-left-color: #e8dcc8 !important;
}

.quran-night-mode .quran-header .quran-back-btn,
.quran-night-mode .quran-header .quran-bookmark-btn {
    color: #e8dcc8 !important;
}

/* Empty state */
.quran-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.quran-empty .material-icons-round {
    font-size: 48px;
    opacity: 0.3;
    margin-bottom: 12px;
}

.quran-empty p {
    font-size: .9rem;
}

/* Loading */
.quran-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    gap: 12px;
}

.quran-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: quranSpin .8s linear infinite;
}

@keyframes quranSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ===================== PRAYER GUIDE ===================== */
#prayerGuideOverlay {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    height: 100vh;
    height: 100dvh;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    animation: quranSlideUp .3s ease;
}

.prayer-guide-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    padding-bottom: 100px;
    max-width: 560px;
    margin: 0 auto;
    width: 100%;
}

.prayer-step-header {
    text-align: center;
    margin-bottom: 28px;
    padding: 0 8px;
}

.prayer-step-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    letter-spacing: -.3px;
}

.prayer-step-instruction {
    font-size: .95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.prayer-text-card {
    background: var(--highlight);
    border-radius: 24px;
    padding: 24px 20px;
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.prayer-arabic {
    font-family: 'Lateef', 'Uthmani', 'Amiri', serif;
    font-size: 2rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
    color: var(--text-primary);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.prayer-transliteration {
    font-size: .95rem;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-light);
    opacity: 0.75;
}

.prayer-translation {
    font-size: .95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Prayer Guide Card */
.prayer-guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: .2s;
}

.prayer-guide-card:active {
    transform: scale(0.98);
    opacity: 0.85;
}

.prayer-guide-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--accent-soft);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.prayer-guide-card-icon .material-icons-round {
    font-size: 24px;
    color: var(--text-primary);
}

.prayer-guide-card-body {
    flex: 1;
    min-width: 0;
}

.prayer-guide-card-title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.prayer-guide-card-subtitle {
    font-size: .78rem;
    color: var(--text-secondary);
}

/* Prayer Guide Footer */
.prayer-guide-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    z-index: 10;
}