/**
 * MyTasbih Counter Page Styles
 * 
 * @package MyTasbih Theme
 * @version 1.0.0
 */

/* ========================================
   Counter Page Overrides
   ======================================== */
html {
    height: 100%;
}

body {
    min-height: 100%;
    touch-action: manipulation;
}

body.rtl {
    direction: rtl;
}

/* Override page wrapper for counter */
.page-wrapper.counter-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
}

.page-wrapper.counter-page .top-nav {
    flex-shrink: 0;
}

/* ========================================
   App Container
   ======================================== */
.app {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 4px 12px 2px;
    overflow: visible;
    min-height: 0;
    position: relative;
    z-index: 1;
}

/* ========================================
   Header Adjustments for Counter
   ======================================== */
.counter-page .header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
    padding: 0 4px;
    width: 100%;
}

/* Mobile: Logo and buttons on same line */
.counter-page .brand {
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.counter-page .brand-logo {
    width: 80px !important;
    height: 80px !important;
    flex-shrink: 0;
    border-radius: 8px;
    object-fit: contain;
}

.counter-page .brand-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.header-btns {
    display: flex !important;
    flex-direction: row !important;
    gap: 3px;
    align-items: center;
    flex-shrink: 0;
}

/* ========================================
   Language Select & Icon Buttons
   ======================================== */
.lang-select {
    padding: 0 18px 0 6px;
    border: 2px solid #cbd5e0 !important;
    border-radius: 6px !important;
    background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'%3E%3Cpath fill='%23666' d='M5 6L0 0h10z'/%3E%3C/svg%3E") no-repeat right 5px center !important;
    font-size: 10px !important;
    color: #334155 !important;
    cursor: pointer;
    -webkit-appearance: none !important;
    appearance: none !important;
    outline: none !important;
    height: 28px !important;
    line-height: 24px !important;
    text-align: center !important;
}

.lang-select:focus {
    border-color: var(--accent) !important;
}

.page-wrapper.dark .lang-select {
    background-color: #3d4555 !important;
    color: #e2e8f0 !important;
    border-color: #4a5568 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 10 6'%3E%3Cpath fill='%23aaa' d='M5 6L0 0h10z'/%3E%3C/svg%3E") !important;
}

.icon-btn {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    border: 2px solid #cbd5e0 !important;
    border-radius: 6px !important;
    background-color: #f8fafc !important;
    font-size: 11px !important;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform .15s;
    outline: none !important;
    padding: 0 !important;
}

.icon-btn:active {
    transform: scale(.95);
}

.icon-btn:focus {
    border-color: var(--accent) !important;
}

.page-wrapper.dark .icon-btn {
    background-color: #3d4555 !important;
    border-color: #4a5568 !important;
}

/* ========================================
   Main Counter Area
   ======================================== */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(2px, 0.8vh, 10px);
    max-width: 460px;
    margin: 0 auto;
    width: 100%;
    min-height: 0;
}

/* ========================================
   Counter Ring - MAIN FOCUS ELEMENT
   ======================================== */
.counter-wrap {
    position: relative;
    width: clamp(140px, 26vh, 260px);
    height: clamp(140px, 26vh, 260px);
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    transition: transform 0.08s ease;
}

.counter-wrap:active {
    transform: scale(0.98);
}

.progress-ring {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.ring-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 12;
}

.page-wrapper.dark .ring-bg {
    stroke: #4a5568;
}

.ring-bar {
    fill: none;
    stroke: var(--accent);
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset .4s;
}

.counter-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.count-num {
    font-size: clamp(30px, 6vh, 48px);
    font-weight: 700;
    line-height: 1;
}

.count-goal {
    font-size: 14px;
    color: #718096;
    font-weight: 500;
}

/* ========================================
   Spam Detection Overlay
   ======================================== */
.spam-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 240, 232, 0.85);
    backdrop-filter: blur(2px);
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s, visibility .25s;
    z-index: 5;
    pointer-events: none;
}

.spam-overlay.show {
    opacity: 1;
    visibility: visible;
}

.page-wrapper.dark .spam-overlay {
    background: rgba(26, 26, 46, 0.85);
}

.spam-overlay-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-align: center;
    padding: 0 24px;
    line-height: 1.4;
}

.counter-wrap.shake {
    animation: counterShake .4s ease;
}

@keyframes counterShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}

/* ========================================
   Dhikr Display (Clickable)
   ======================================== */
button.dhikr-box,
button.dhikr-box:hover,
button.dhikr-box:focus,
button.dhikr-box:active {
    text-align: center;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-bottom: 2px solid transparent !important;
    padding: clamp(2px, 0.5vh, 4px) 16px clamp(4px, 1vh, 8px);
    cursor: pointer;
    display: block;
    width: auto;
    margin: 0 auto;
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-shadow: none !important;
    color: inherit;
}

button.dhikr-box:hover {
    border-bottom: 2px solid var(--accent) !important;
}

button.dhikr-box:active {
    transform: scale(0.98);
}

.dhikr-main {
    font-size: clamp(16px, 2.8vh, 22px);
    font-weight: 600;
    color: var(--accent);
    margin-bottom: clamp(4px, 1vh, 10px);
    line-height: 1.2;
    display: block;
}

/* Arabic counter: use Amiri font and bigger size for dhikr text */
body.rtl .dhikr-main {
    font-family: 'Amiri', serif;
    font-size: 28px;
    line-height: 1.5;
}

.dhikr-arabic {
    font-family: 'Amiri', serif;
    font-size: clamp(14px, 2.5vh, 20px);
    color: #718096;
    line-height: 1.4;
    display: block;
}

.page-wrapper.dark .dhikr-arabic {
    color: #a0aec0;
}

.dhikr-change-hint {
    display: block;
    font-size: 10px;
    color: #a0aec0;
    margin-top: 4px;
}

.page-wrapper.dark .dhikr-change-hint {
    color: #718096;
}

/* Hide hint in focus mode */
.page-wrapper.focus-mode .dhikr-change-hint {
    display: none;
}

.page-wrapper.focus-mode button.dhikr-box,
.page-wrapper.focus-mode button.dhikr-box:hover {
    cursor: default;
    border-bottom-color: transparent !important;
}

/* ========================================
   Control Buttons
   ======================================== */
.controls {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ctrl-btn {
    border: none !important;
    border-radius: 50%;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .15s, background .15s;
    outline: none !important;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent !important;
}

.ctrl-btn:active {
    transform: scale(.92);
}

.btn-side {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    aspect-ratio: 1 !important;
    font-size: 20px;
    background: #f8fafc !important;
    color: var(--text) !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
    padding: 0 !important;
    line-height: 1 !important;
}

.btn-side:hover {
    background: #f0f4f8 !important;
}

.page-wrapper.dark .btn-side {
    background: #3d4555 !important;
    color: var(--text-dark) !important;
}

.page-wrapper.dark .btn-side:hover {
    background: #4a5568 !important;
}

.btn-main {
    width: clamp(60px, 11vh, 90px) !important;
    height: clamp(60px, 11vh, 90px) !important;
    min-width: clamp(60px, 11vh, 90px) !important;
    min-height: clamp(60px, 11vh, 90px) !important;
    font-size: clamp(28px, 5.5vh, 44px);
    background: linear-gradient(145deg, var(--accent), #c9a227) !important;
    color: #1a1a1a !important;
    box-shadow: 0 8px 28px rgba(212, 175, 55, .5);
    padding: 0 !important;
    line-height: 1 !important;
}

.btn-main:hover {
    box-shadow: 0 10px 32px rgba(212, 175, 55, .6);
    transform: scale(1.02);
}

.btn-main:active {
    transform: scale(0.98);
}

.page-wrapper.dark .btn-main {
    box-shadow: 0 4px 12px rgba(212, 175, 55, .2);
}

.page-wrapper.dark .btn-main:hover {
    box-shadow: 0 6px 16px rgba(212, 175, 55, .3);
}

/* ========================================
   Bottom Section
   ======================================== */
.bottom {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.goal-row {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: clamp(6px, 1.5vh, 20px);
}

.goal-btn {
    padding: 4px 10px;
    border: 2px solid #cbd5e0;
    border-radius: 6px;
    background: transparent;
    font-size: 10px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all .15s;
    outline: none;
}

#unlimitedBtn {
    font-size: 16px;
    line-height: 1;
    padding: 2px 10px;
}

.goal-btn:hover {
    background: rgba(212, 175, 55, .15) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}

.goal-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #1a1a1a;
}

.goal-btn.active:hover {
    background: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: #1a1a1a !important;
}

.page-wrapper.dark .goal-btn {
    border-color: #4a5568;
    color: #a0aec0;
}

.page-wrapper.dark .goal-btn:hover {
    background: rgba(212, 175, 55, .2) !important;
}

.page-wrapper.dark .goal-btn.active {
    background: var(--accent);
    color: #1a1a1a;
}

.goal-input {
    width: 42px !important;
    min-width: 42px !important;
    max-width: 42px !important;
    padding: 4px 2px !important;
    border: 2px solid #cbd5e0 !important;
    border-radius: 6px !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    text-align: center !important;
    background: transparent !important;
    color: var(--text) !important;
    outline: none !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: none !important;
}

.goal-input::-webkit-outer-spin-button,
.goal-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.goal-input:focus {
    border-color: var(--accent) !important;
}

.page-wrapper.dark .goal-input {
    border-color: #4a5568 !important;
    color: var(--text-dark) !important;
}

/* ========================================
   Dhikr Select (hidden fallback)
   ======================================== */
.dhikr-select {
    display: none;
}

/* ========================================
   Dhikr Selection Modal (Bottom Sheet)
   ======================================== */
.dhikr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s;
}

.dhikr-modal.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s;
}

.dhikr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    touch-action: none;
}

.dhikr-modal-sheet {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 70vh;
    background: #fff;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.dhikr-modal.show .dhikr-modal-sheet {
    transform: translateY(0);
}

.page-wrapper.dark .dhikr-modal-sheet {
    background: #1e2433;
}

.page-wrapper.dark .dhikr-modal-item:hover {
    background: rgba(212, 175, 55, 0.15);
}

.page-wrapper.dark .dhikr-modal-item.active {
    background: rgba(212, 175, 55, 0.2);
}

.page-wrapper.dark .dhikr-item-arabic {
    color: #e8c547;
}

.page-wrapper.dark .dhikr-modal-add-btn {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--accent);
}

.page-wrapper.dark .dhikr-modal-add-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent);
}

.dhikr-modal-handle {
    width: 40px;
    height: 4px;
    background: #ddd;
    border-radius: 2px;
    margin: 12px auto;
    flex-shrink: 0;
}

.page-wrapper.dark .dhikr-modal-handle {
    background: #4a5568;
}

.dhikr-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 16px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
    flex-shrink: 0;
}

.dhikr-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
    font-family: 'Amiri', serif;
}

.page-wrapper.dark .dhikr-modal-title {
    color: var(--text-dark);
}

.dhikr-modal-close {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    aspect-ratio: 1;
}

.dhikr-modal-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.page-wrapper.dark .dhikr-modal-close {
    background: rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

.dhikr-modal-list {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 8px 12px 24px;
}

.dhikr-modal-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    gap: 4px;
    position: relative;
}

.dhikr-modal-item:hover {
    background: rgba(212, 175, 55, 0.08);
}

.dhikr-modal-item.active {
    background: rgba(212, 175, 55, 0.15);
}

.dhikr-item-arabic {
    font-size: 20px;
    color: var(--accent);
    font-family: 'Amiri', serif;
    direction: rtl;
    text-align: center;
    line-height: 1.4;
}

.dhikr-item-name {
    flex: none;
    font-size: 13px;
    font-weight: 500;
    color: #718096;
}

.page-wrapper.dark .dhikr-item-name {
    color: #a0aec0;
}

.dhikr-item-check {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--accent);
    font-weight: 700;
}

/* ========================================
   Stats — compact, centered, balanced (Pro)
   ======================================== */
.stats {
    display: flex;
    justify-content: space-around;
    padding: clamp(3px, 0.7vh, 6px);
    background: rgba(255, 255, 255, .6);
    backdrop-filter: blur(8px);
    border-radius: 8px;
    margin-bottom: clamp(3px, 0.7vh, 6px);
    border: 1px solid rgba(212, 175, 55, .1);
    width: 100%;
    align-self: stretch;
}

/* Pro stats — compact centered pill */
.stats--pro {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    padding: clamp(4px, 0.8vh, 8px) clamp(12px, 2vw, 24px);
    border-radius: 10px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: clamp(3px, 0.7vh, 6px);
    width: auto;
    max-width: 320px;
}

.page-wrapper.dark .stats {
    background: rgba(255, 255, 255, .06);
    border-color: rgba(212, 175, 55, .15);
}

.stat {
    text-align: center;
}

/* Pro stats dividers */
.stats--pro .stat {
    padding: 2px clamp(10px, 1.5vw, 18px);
    position: relative;
}

.stats--pro .stat + .stat::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: rgba(212, 175, 55, .15);
}

body.rtl .stats--pro .stat + .stat::before {
    left: auto;
    right: 0;
}

.stat-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
}

.stats--pro .stat-val {
    font-size: 14px;
    line-height: 1.2;
}

.stat-lbl {
    font-size: 7px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.stat--link {
    text-decoration: none;
    cursor: pointer;
    transition: opacity .15s;
}

.stat--link:hover {
    opacity: .7;
}

/* ========================================
   Hint
   ======================================== */
.hint {
    text-align: center;
    font-size: 8px;
    color: #a0aec0;
    margin-bottom: 4px;
}

@media (hover: none) and (pointer: coarse) {
    .hint {
        display: none;
    }
}

@media (max-width: 768px) {
    .hint {
        display: none;
    }
}

/* ========================================
   Donate Link
   ======================================== */
.donate-link {
    display: block;
    text-align: center;
    font-size: 10px;
    color: #a0aec0;
    text-decoration: none;
    margin-top: 6px;
    margin-bottom: 4px;
    transition: color .2s;
}

.donate-link:hover {
    color: var(--accent);
}

.page-wrapper.dark .donate-link {
    color: #64748b;
}

.page-wrapper.dark .donate-link:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .donate-link {
        font-size: 11px;
        margin-top: 0;
        margin-bottom: 0;
    }
}

.kbd {
    display: inline-block;
    padding: 1px 4px;
    background: rgba(0, 0, 0, .08);
    border-radius: 3px;
    font-family: monospace;
    font-size: 7px;
    margin: 0 1px;
}

.page-wrapper.dark .kbd {
    background: rgba(255, 255, 255, .1);
}

/* ========================================
   Auto-saved Indicator
   ======================================== */
.auto-saved {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 6px;
    margin-bottom: 6px;
    height: 16px;
    opacity: 1;
    transition: opacity 0.3s ease, height 0.3s ease, margin 0.3s ease;
}

.auto-saved.hidden {
    opacity: 0;
    height: 0;
    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
}

.auto-saved-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    animation: blink-dot 3s ease-in-out infinite;
}

@keyframes blink-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.auto-saved-text {
    font-size: 10px;
    font-weight: 500;
    color: #10b981;
}

.page-wrapper.dark .auto-saved-text {
    color: #34d399;
}

.page-wrapper.dark .auto-saved-dot {
    background: #34d399;
}

/* Auto-saved Info Icon */
.auto-saved-info {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 4px;
    line-height: 1;
    opacity: 0.5;
    transition: opacity 0.2s;
    outline: none;
    color: #10b981;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    position: relative;
    top: 0;
}

.auto-saved-info svg {
    display: block;
}

@media (min-width: 769px) {
    .auto-saved-info {
        top: -1px;
    }
}

.auto-saved-info:hover {
    opacity: 1;
}

.page-wrapper.dark .auto-saved-info {
    color: #34d399;
}

body.rtl .auto-saved-info {
    margin-left: 0;
    margin-right: 4px;
}

/* Auto-saved Tooltip Overlay */
.auto-saved-tooltip-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(3px);
    z-index: 1199;
}

.auto-saved-tooltip-overlay.show {
    display: block;
}

/* Auto-saved Tooltip Card */
.auto-saved-tooltip {
    display: none;
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(145deg, #fff, #faf8f4);
    color: var(--text);
    padding: 28px 24px 24px;
    border-radius: 20px;
    width: 300px;
    max-width: 88vw;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    z-index: 1200;
    border: 1px solid rgba(212, 175, 55, 0.2);
    overflow: visible;
}

.auto-saved-tooltip.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: tooltipFadeIn 0.3s ease-out;
}

@keyframes tooltipFadeIn {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.page-wrapper.dark .auto-saved-tooltip {
    background: linear-gradient(145deg, #2d3748, #1e2433);
    color: var(--text-dark);
    border-color: rgba(212, 175, 55, 0.25);
}

.auto-saved-tooltip-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
}

.auto-saved-tooltip-text {
    font-size: 13px;
    line-height: 1.7;
    color: #4a5568;
    display: block;
}

.page-wrapper.dark .auto-saved-tooltip-text {
    color: #cbd5e0;
}

.auto-saved-tooltip-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    max-width: 28px;
    max-height: 28px;
    border: none;
    background: rgba(0, 0, 0, 0.06);
    border-radius: 50%;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    aspect-ratio: 1;
}

.auto-saved-tooltip-close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.page-wrapper.dark .auto-saved-tooltip-close {
    background: rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

.page-wrapper.dark .auto-saved-tooltip-close:hover {
    background: rgba(255, 255, 255, 0.18);
}

body.rtl .auto-saved-tooltip-close {
    right: auto;
    left: 10px;
}

/* Hide auto-saved in focus mode */
.page-wrapper.focus-mode .auto-saved {
    display: none;
}


/* ========================================
   SEO Content Section
   ======================================== */
.seo-title {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: block;
    font-family: 'Amiri', serif;
    letter-spacing: 0.3px;
    line-height: 1.1;
}

.page-wrapper.dark .brand-name {
    color: var(--text-dark);
}

.brand-tagline {
    font-size: 11px;
    color: #718096;
    line-height: 1.2;
    display: block;
    letter-spacing: 0.2px;
}

.page-wrapper.dark .brand-tagline {
    color: #a0aec0;
}

.seo-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.page-wrapper.dark .seo-content {
    background: rgba(26, 26, 46, 0.95);
}

.seo-content-inner {
    max-width: 800px;
    margin: 0 auto;
}

.seo-content h2 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 12px;
    font-family: 'Amiri', serif;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.page-wrapper.dark .seo-content h2 {
    color: var(--text-dark);
}

.seo-content p {
    font-size: 14px;
    line-height: 1.8;
    color: #4a5568;
    margin-bottom: 12px;
}

.page-wrapper.dark .seo-content p {
    color: #a0aec0;
}

.seo-content ul,
.seo-content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.seo-content li {
    font-size: 14px;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 6px;
}

.page-wrapper.dark .seo-content li {
    color: #a0aec0;
}

.seo-content strong {
    color: #8b7117;
    font-weight: 600;
}

.page-wrapper.dark .seo-content strong {
    color: var(--accent);
}

.seo-content a {
    color: #1a6b3c;
    text-decoration: underline;
    font-weight: 500;
}

.seo-content a:hover {
    color: #145530;
}

.page-wrapper.dark .seo-content a {
    color: #68d391;
}

.page-wrapper.dark .seo-content a:hover {
    color: #9ae6b4;
}

/* Allow scrolling when SEO content is present below the counter */
/* SEO sections are outside .page-wrapper, so body handles scroll naturally */


/* ========================================
   Desktop Height-Based Scaling
   Ensures all counter features visible without scrolling on smaller laptops
   Uses clamp() for fluid scaling; media queries for fine-tuning
   ======================================== */

/* Medium-height laptops (e.g. 800px-900px viewport height) */
@media (min-width: 769px) and (max-height: 900px) {
    .counter-page .brand-logo {
        width: 64px !important;
        height: 64px !important;
    }
    .app {
        padding: 2px 12px;
    }
    .counter-page .header {
        margin-bottom: 0;
    }
    .goal-row {
        margin-bottom: 12px;
    }
    .stats {
        padding: 5px;
        margin-bottom: 4px;
    }
    .beads-wrap {
        height: 44px;
    }
    .bead {
        width: 22px;
        height: 22px;
    }
    button.dhikr-box,
    button.dhikr-box:hover,
    button.dhikr-box:focus,
    button.dhikr-box:active {
        padding: 2px 16px 6px;
    }
    .auto-saved {
        margin-top: 4px;
        margin-bottom: 4px;
    }
}

/* Smaller laptops (e.g. 768px-800px viewport height) */
@media (min-width: 769px) and (max-height: 800px) {
    .counter-page .brand-logo {
        width: 56px !important;
        height: 56px !important;
    }
    .app {
        padding: 2px 12px;
    }
    .controls {
        gap: 12px;
    }
    .goal-row {
        margin-bottom: 8px;
    }
    .stats {
        padding: 4px;
        margin-bottom: 3px;
    }
    .beads-wrap {
        height: 38px;
    }
    .bead {
        width: 20px;
        height: 20px;
    }
    .dhikr-main {
        font-size: 20px;
        margin-bottom: 6px;
    }
    body.rtl .dhikr-main {
        font-size: 24px;
    }
    .dhikr-arabic {
        font-size: 18px;
    }
    .auto-saved {
        margin-top: 3px;
        margin-bottom: 3px;
    }
}

/* Very short desktop screens (e.g. 700px or less viewport height) */
@media (min-width: 769px) and (max-height: 700px) {
    .counter-page .brand-logo {
        width: 48px !important;
        height: 48px !important;
    }
    .brand-name {
        font-size: 14px;
    }
    .brand-tagline {
        font-size: 9px;
    }
    .controls {
        gap: 10px;
    }
    .goal-row {
        margin-bottom: 6px;
    }
    .goal-btn {
        padding: 3px 8px;
        font-size: 9px;
    }
    .stats {
        padding: 3px;
        margin-bottom: 3px;
    }
    .stat-val {
        font-size: 12px;
    }
    .stat-lbl {
        font-size: 6px;
    }
    .beads-wrap {
        height: 34px;
    }
    .bead {
        width: 18px;
        height: 18px;
    }
    .dhikr-main {
        font-size: 18px;
        margin-bottom: 4px;
    }
    body.rtl .dhikr-main {
        font-size: 22px;
    }
    .dhikr-arabic {
        font-size: 16px;
    }
    .auto-saved {
        margin-top: 2px;
        margin-bottom: 2px;
    }
}

/* ========================================
   Mobile Responsive - Fit Everything on Screen
   ======================================== */

/* Tablet */
@media (max-width: 768px) {
    .counter-page .brand-logo {
        width: 50px !important;
        height: 50px !important;
    }
    
    .brand-name {
        font-size: 14px;
    }
    
    .brand-tagline {
        font-size: 9px;
    }
    
    .main {
        justify-content: center;
        padding-top: 0;
        padding-bottom: 0;
        gap: clamp(4px, 1.2vh, 16px);
    }

    /* Pull counter ring slightly upward to reduce top empty space */
    .counter-wrap {
        margin-top: -2vh;
    }

    /* Dhikr text fills space between ring and controls */
    button.dhikr-box {
        flex: 0;
    }

    /* Scale counter ring based on viewport height for tablets */
    .counter-wrap {
        width: clamp(180px, 24vh, 260px) !important;
        height: clamp(180px, 24vh, 260px) !important;
    }

    .count-num {
        font-size: clamp(36px, 5vh, 56px);
    }

    .count-goal {
        font-size: clamp(13px, 1.8vh, 18px);
    }

    .dhikr-main {
        font-size: clamp(18px, 2.5vh, 26px);
    }

    .dhikr-arabic {
        font-size: clamp(14px, 2vh, 22px);
    }

    .btn-main {
        width: clamp(70px, 9vh, 100px) !important;
        height: clamp(70px, 9vh, 100px) !important;
        min-width: clamp(70px, 9vh, 100px) !important;
        min-height: clamp(70px, 9vh, 100px) !important;
        font-size: clamp(32px, 4.5vh, 48px);
    }

    .btn-side {
        width: clamp(36px, 4.5vh, 50px) !important;
        height: clamp(36px, 4.5vh, 50px) !important;
        min-width: clamp(36px, 4.5vh, 50px) !important;
        min-height: clamp(36px, 4.5vh, 50px) !important;
        max-width: clamp(36px, 4.5vh, 50px) !important;
        max-height: clamp(36px, 4.5vh, 50px) !important;
        font-size: clamp(18px, 2.2vh, 24px);
    }

    .controls {
        gap: clamp(12px, 2vh, 20px);
    }

    .goal-btn {
        padding: clamp(3px, 0.6vh, 8px) clamp(8px, 1.5vh, 16px);
        font-size: clamp(9px, 1.3vh, 13px);
    }

    .stats {
        padding: clamp(4px, 0.8vh, 10px);
        margin-bottom: clamp(3px, 0.6vh, 8px);
    }

    .stat-val {
        font-size: clamp(11px, 1.6vh, 16px);
    }

    .stat-lbl {
        font-size: clamp(6px, 0.9vh, 9px);
    }

    .auto-saved {
        margin-top: clamp(4px, 0.8vh, 10px);
        margin-bottom: clamp(4px, 0.8vh, 10px);
    }

    .auto-saved-text {
        font-size: clamp(10px, 1.3vh, 14px);
    }

    .donate-link {
        font-size: clamp(10px, 1.3vh, 14px);
    }

    .mode-toggle {
        max-width: clamp(190px, 26vh, 280px);
    }

    .mode-btn {
        font-size: clamp(11px, 1.4vh, 15px);
        padding: clamp(5px, 0.8vh, 10px) clamp(10px, 1.5vh, 18px);
    }

    .goal-row {
        margin-bottom: clamp(6px, 1vh, 16px);
    }
}

/* Landscape mobile - reduce vertical spacing, keep things compact */
@media (max-width: 768px) and (max-height: 500px) and (orientation: landscape) {
    .main {
        gap: 4px;
    }

    .counter-wrap {
        width: clamp(100px, 22vh, 160px) !important;
        height: clamp(100px, 22vh, 160px) !important;
    }

    .count-num {
        font-size: clamp(22px, 5vh, 36px);
    }

    .btn-main {
        width: clamp(44px, 10vh, 64px) !important;
        height: clamp(44px, 10vh, 64px) !important;
        min-width: clamp(44px, 10vh, 64px) !important;
        min-height: clamp(44px, 10vh, 64px) !important;
        font-size: clamp(22px, 5vh, 32px);
    }

    .btn-side {
        width: clamp(28px, 7vh, 36px) !important;
        height: clamp(28px, 7vh, 36px) !important;
        min-width: clamp(28px, 7vh, 36px) !important;
        min-height: clamp(28px, 7vh, 36px) !important;
        max-width: clamp(28px, 7vh, 36px) !important;
        max-height: clamp(28px, 7vh, 36px) !important;
        font-size: 14px;
    }

    .dhikr-main {
        font-size: clamp(13px, 3vh, 18px);
        margin-bottom: 2px;
    }

    .dhikr-arabic {
        font-size: clamp(11px, 2.5vh, 16px);
    }

    .counter-page .brand-logo {
        width: 32px !important;
        height: 32px !important;
    }

    .stats {
        padding: 3px;
    }

    .mode-toggle {
        max-width: 170px;
        margin-bottom: 3px;
    }

    .mode-btn {
        font-size: 10px;
        padding: 3px 8px;
    }

    .goal-row {
        margin-bottom: 3px;
    }

    .auto-saved {
        margin-top: 2px;
        margin-bottom: 2px;
    }
}

/* Mobile */
@media (max-width: 480px) {
    .counter-page .header {
        flex-direction: row !important;
        padding: 0 4px;
    }
    
    .counter-page .brand {
        flex-direction: row !important;
    }
    
    .counter-page .brand-logo {
        width: 38px !important;
        height: 38px !important;
    }
    
    .brand-name {
        font-size: 12px;
    }
    
    .brand-tagline {
        font-size: 7px;
        white-space: nowrap;
    }
    
    .header-btns {
        flex-direction: row !important;
        gap: 2px;
    }
    
    .icon-btn {
        width: 24px !important;
        height: 24px !important;
        min-width: 24px !important;
        min-height: 24px !important;
        font-size: 10px !important;
    }
    
    .lang-select {
        height: 24px !important;
        font-size: 9px !important;
        padding: 0 14px 0 4px !important;
    }
    
    .top-nav {
        padding: 3px 8px;
        gap: 8px;
    }
    
    .nav-link {
        font-size: 10px;
        padding: 4px 6px;
    }
    
    /* Bigger counter ring for mobile - with bead ring */
    .counter-wrap {
        width: clamp(170px, 24vh, 220px);
        height: clamp(170px, 24vh, 220px);
    }
    
    .count-num {
        font-size: clamp(34px, 5vh, 48px);
    }
    
    .count-goal {
        font-size: clamp(12px, 1.6vh, 16px);
    }
    
    .dhikr-main {
        font-size: clamp(16px, 2.2vh, 22px);
    }
    body.rtl .dhikr-main {
        font-size: clamp(20px, 3vh, 28px);
    }
    
    .dhikr-arabic {
        font-size: clamp(13px, 1.8vh, 18px);
    }
    
    .dhikr-change-hint {
        font-size: 9px;
    }
    
    /* Bigger plus button for easy tapping */
    .btn-main {
        width: clamp(64px, 9vh, 90px) !important;
        height: clamp(64px, 9vh, 90px) !important;
        min-width: clamp(64px, 9vh, 90px) !important;
        min-height: clamp(64px, 9vh, 90px) !important;
        font-size: clamp(30px, 4.5vh, 44px);
    }
    
    .btn-side {
        width: clamp(32px, 4.5vh, 44px) !important;
        height: clamp(32px, 4.5vh, 44px) !important;
        min-width: clamp(32px, 4.5vh, 44px) !important;
        min-height: clamp(32px, 4.5vh, 44px) !important;
        max-width: clamp(32px, 4.5vh, 44px) !important;
        max-height: clamp(32px, 4.5vh, 44px) !important;
        font-size: clamp(16px, 2.2vh, 22px);
    }
    
    .controls {
        gap: 12px;
    }
    
    .goal-row {
        margin-bottom: 6px;
        gap: 3px;
    }
    
    .goal-btn {
        padding: 3px 8px;
        font-size: 9px;
    }
    
    .goal-input {
        width: 36px !important;
        min-width: 36px !important;
        max-width: 36px !important;
    }
    
    .dhikr-select {
        display: none;
    }
    
    .stats {
        padding: 4px;
        margin-bottom: 3px;
    }
    
    .stat-val {
        font-size: 11px;
    }
    
    .stat-lbl {
        font-size: 6px;
    }
    
    /* Smaller beads to fit on screen */
    .beads-wrap {
        height: 35px;
        margin-top: 2px;
    }
    
    .bead {
        width: 16px;
        height: 16px;
    }
    
    .app {
        padding: 2px 8px;
    }
    
    .main {
        gap: clamp(6px, 1.5vh, 16px);
        justify-content: center;
        padding-top: 0;
        padding-bottom: 0;
    }
    
    .dhikr-box {
        margin: 4px 0;
    }
    
    .bottom {
        margin-top: 2px;
    }
}

/* Very small phones */
@media (max-width: 380px) {
    .counter-page .brand-logo {
        width: 32px !important;
        height: 32px !important;
    }
    
    .brand-name {
        font-size: 11px;
    }
    
    .brand-tagline {
        display: none;
    }
    
    .counter-wrap {
        width: 170px !important;
        height: 170px !important;
    }
    
    .count-num {
        font-size: 34px;
    }
    
    .btn-main {
        width: 72px !important;
        height: 72px !important;
        min-width: 72px !important;
        min-height: 72px !important;
        font-size: 36px;
    }
    
    .btn-side {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
    }
    
    .dhikr-main {
        font-size: 16px;
    }
    body.rtl .dhikr-main {
        font-size: 22px;
    }
    
    .dhikr-arabic {
        font-size: 12px;
    }
    
    .dhikr-change-hint {
        font-size: 8px;
    }
    
    .beads-wrap {
        height: 30px;
    }
    
    .bead {
        width: 14px;
        height: 14px;
    }
}

/* ========================================
   Dhikr Guide Section
   ======================================== */
.dhikr-guide-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    padding: 50px 20px;
    position: relative;
}

.page-wrapper.dark .dhikr-guide-section {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(26, 26, 46, 0.95));
}

.dhikr-guide-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.dhikr-guide-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 12px;
    font-family: 'Amiri', serif;
}

.page-wrapper.dark .dhikr-guide-title {
    color: var(--text-dark);
}

.dhikr-guide-intro {
    text-align: center;
    color: #718096;
    font-size: 15px;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.7;
}

.page-wrapper.dark .dhikr-guide-intro {
    color: #a0aec0;
}

.dhikr-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    align-items: stretch;
}

.dhikr-cards-grid > .dhikr-card {
    min-height: 100%;
}

@media (max-width: 1200px) {
    .dhikr-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .dhikr-cards-grid {
        grid-template-columns: 1fr;
    }
}

/* Dhikr cards show/hide toggle */
.dhikr-card.dhikr-card-extra {
    display: none;
}

.dhikr-cards-grid.dhikr-expanded .dhikr-card.dhikr-card-extra {
    display: flex;
}

.dhikr-show-more-btn,
.dhikr-show-more-btn:link,
.dhikr-show-more-btn:visited,
.dhikr-show-more-btn:hover,
.dhikr-show-more-btn:active,
.dhikr-show-more-btn:focus,
.dhikr-show-more-btn:focus-visible,
.dhikr-show-more-btn:hover:active,
.dhikr-show-more-btn:focus:active {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 28px auto 0;
    padding: 12px 28px;
    background: rgba(212, 175, 55, 0.1) !important;
    border: 1.5px solid rgba(212, 175, 55, 0.3) !important;
    border-radius: 50px;
    color: var(--accent) !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease;
    font-family: inherit;
    outline: none !important;
    box-shadow: none !important;
}

.dhikr-show-more-btn:hover {
    transform: translateY(-1px);
}

.dhikr-show-more-count {
    font-size: 12px;
    font-weight: 500;
    background: var(--accent);
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
}

.dhikr-show-more-icon {
    transition: transform 0.3s ease;
}

.dhikr-show-more-btn[aria-expanded="true"] .dhikr-show-more-icon {
    transform: rotate(180deg);
}

.page-wrapper.dark .dhikr-show-more-btn {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.25);
}

.page-wrapper.dark .dhikr-show-more-btn:hover {
    transform: translateY(-1px);
}

.dhikr-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.15);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dhikr-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    min-height: 0;
}

.dhikr-card-body .dhikr-benefit {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    font-size: 13px !important;
    line-height: 1.6;
}

.dhikr-card-body .hadith-source {
    flex-shrink: 0;
}

.dhikr-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.3);
}

.page-wrapper.dark .dhikr-card {
    background: rgba(255, 255, 255, 0.05);
}

.dhikr-card-header {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    padding: 20px;
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.dhikr-card-arabic {
    display: block;
    font-size: 24px;
    color: #fff;
    font-family: 'Amiri', serif;
    margin-bottom: 8px;
    direction: rtl;
    line-height: 1.5;
    word-break: keep-all;
}

.dhikr-card-name {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 4px;
    line-height: 1.4;
}

.dhikr-card-meaning {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-style: italic;
    line-height: 1.4;
}

.dhikr-card-body p {
    font-size: 14px;
    line-height: 1.7;
    color: #4a5568;
    margin-bottom: 10px;
}

.dhikr-card-body p:first-child {
    flex-shrink: 0;
}

.page-wrapper.dark .dhikr-card-body p {
    color: #cbd5e0;
}

.dhikr-card-body em {
    color: var(--text);
}

.page-wrapper.dark .dhikr-card-body em {
    color: var(--text-dark);
}

.hadith-source {
    font-size: 12px !important;
    color: #8b7117 !important;
    font-weight: 500;
}

.page-wrapper.dark .hadith-source {
    color: var(--accent) !important;
}

.dhikr-benefit {
    font-size: 13px !important;
    color: #718096 !important;
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding-top: 12px;
    margin-top: auto !important;
}

.page-wrapper.dark .dhikr-benefit {
    color: #a0aec0 !important;
}

/* ========================================
   Prayer Dhikr Box
   ======================================== */
.prayer-dhikr-box {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    border-left: 4px solid var(--accent);
}

.prayer-dhikr-box blockquote {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
    margin: 16px 0;
    padding: 0;
    border: none;
}

.page-wrapper.dark .prayer-dhikr-box blockquote {
    color: var(--text-dark);
}

.prayer-dhikr-box .hadith-source {
    display: block;
    margin-top: 12px;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq-section {
    background: rgba(255, 255, 255, 0.95);
    padding: 50px 20px;
}

.page-wrapper.dark .faq-section {
    background: rgba(26, 26, 46, 0.95);
}

.faq-inner {
    max-width: 800px;
    margin: 0 auto;
}

.faq-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 32px;
    font-family: 'Amiri', serif;
}

.page-wrapper.dark .faq-title {
    color: var(--text-dark);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(212, 175, 55, 0.25);
}

.page-wrapper.dark .faq-item {
    background: rgba(255, 255, 255, 0.05);
}

.faq-question {
    padding: 18px 24px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.faq-question:hover {
    color: #8b7117;
}

.page-wrapper.dark .faq-question:hover {
    color: var(--accent);
}

.page-wrapper.dark .faq-question {
    color: var(--text-dark);
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: '+';
    font-size: 24px;
    color: var(--accent);
    font-weight: 400;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    margin-left: 16px;
}

.faq-item[open] .faq-question::after {
    transform: rotate(45deg);
}

.faq-item[open] .faq-question {
    color: #8b7117;
}

.page-wrapper.dark .faq-item[open] .faq-question {
    color: var(--accent);
}

.faq-answer {
    padding: 0 24px 20px;
}

.faq-answer p {
    font-size: 14px;
    line-height: 1.8;
    color: #4a5568;
    margin: 0;
}

.page-wrapper.dark .faq-answer p {
    color: #a0aec0;
}

/* ========================================
   Responsive for New Sections
   ======================================== */
@media (max-width: 768px) {
    .dhikr-guide-section,
    .faq-section {
        padding: 40px 16px;
    }
    
    .dhikr-guide-title,
    .faq-title {
        font-size: 24px;
    }
    
    .dhikr-cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .dhikr-card-arabic {
        font-size: 22px;
    }
    
    .dhikr-card-name {
        font-size: 15px;
    }
    
    .faq-question {
        font-size: 15px;
        padding: 16px 20px;
    }
    
    .faq-answer {
        padding: 0 20px 16px;
    }
}

@media (max-width: 480px) {
    .dhikr-guide-title,
    .faq-title {
        font-size: 22px;
    }
    
    .dhikr-guide-intro {
        font-size: 14px;
    }
    
    .dhikr-card-header {
        padding: 16px;
    }
    
    .dhikr-card-body {
        padding: 16px;
    }
    
    .faq-question {
        font-size: 14px;
        padding: 14px 16px;
    }
    
    .faq-question::after {
        font-size: 20px;
    }
    
    .faq-answer p {
        font-size: 13px;
    }
}


/* ========================================
   Dhikr Modal Responsive
   ======================================== */
@media (max-width: 480px) {
    .dhikr-modal-sheet {
        max-height: 75vh;
        border-radius: 20px 20px 0 0;
    }
    
    .dhikr-modal-header {
        padding: 6px 16px 12px;
    }
    
    .dhikr-modal-title {
        font-size: 16px;
    }
    
    .dhikr-modal-list {
        padding: 4px 8px 20px;
    }
    
    .dhikr-modal-item {
        padding: 12px;
        gap: 3px;
    }
    
    .dhikr-item-arabic {
        font-size: 18px;
    }
    
    .dhikr-item-name {
        font-size: 12px;
    }
}

/* RTL Support for Dhikr Modal */
body.rtl .dhikr-modal-item {
    flex-direction: column;
    text-align: center;
}

body.rtl .dhikr-item-check {
    right: auto;
    left: 12px;
}


/* ========================================
   Custom Dhikr Feature Styles
   ======================================== */

/* Add Custom Dhikr Button in Modal */
.dhikr-modal-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    border: 2px dashed rgba(212, 175, 55, 0.5);
    border-radius: 12px;
    background: transparent;
    color: #996515;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dhikr-modal-add-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--accent);
    color: #7a5010;
}

.dhikr-modal-add-btn .add-icon {
    font-size: 20px;
    font-weight: 400;
}

.page-wrapper.dark .dhikr-modal-add-btn {
    color: var(--accent);
    border-color: rgba(212, 175, 55, 0.4);
}

.page-wrapper.dark .dhikr-modal-add-btn:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent);
    color: #e8c547;
}

/* Custom Dhikr Item with Delete Button */
.custom-dhikr-item .dhikr-item-actions {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
}

.custom-dhikr-item .dhikr-item-actions .dhikr-item-check {
    position: static;
    font-size: 16px;
    color: var(--accent);
    font-weight: 700;
    line-height: 1;
    min-width: 16px;
    text-align: center;
}

body.rtl .custom-dhikr-item .dhikr-item-actions {
    right: auto;
    left: 12px;
}

.dhikr-delete-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: rgba(220, 53, 69, 0.15);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #dc3545;
    flex-shrink: 0;
}

.dhikr-delete-btn:hover {
    background: rgba(220, 53, 69, 0.25);
}

.page-wrapper.dark .dhikr-delete-btn {
    background: rgba(220, 53, 69, 0.2);
    color: #ff6b6b;
}

.page-wrapper.dark .dhikr-delete-btn:hover {
    background: rgba(220, 53, 69, 0.35);
}

/* Custom Dhikr Input Modal */
.custom-dhikr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0s 0.3s, opacity 0.3s;
}

.custom-dhikr-modal.show {
    visibility: visible;
    opacity: 1;
    transition: visibility 0s, opacity 0.3s;
}

.custom-dhikr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.custom-dhikr-box {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: #fff;
    border-radius: 20px;
    padding: 24px;
    transform: scale(0.9);
    transition: transform 0.3s ease-out;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.custom-dhikr-modal.show .custom-dhikr-box {
    transform: scale(1);
}

.page-wrapper.dark .custom-dhikr-box {
    background: #1e2433;
}

.custom-dhikr-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #718096;
    transition: all 0.2s;
    padding: 0;
    line-height: 1;
    aspect-ratio: 1;
}

.custom-dhikr-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.page-wrapper.dark .custom-dhikr-close {
    background: rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

.custom-dhikr-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 24px;
    text-align: center;
    font-family: 'Amiri', serif;
}

.page-wrapper.dark .custom-dhikr-title {
    color: var(--text-dark);
}

.custom-dhikr-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.custom-dhikr-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.custom-dhikr-label {
    font-size: 13px;
    font-weight: 600;
    color: #718096;
}

.page-wrapper.dark .custom-dhikr-label {
    color: #a0aec0;
}

.custom-dhikr-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
    color: var(--text);
    background: #f8fafc;
    transition: all 0.2s;
    outline: none;
}

.custom-dhikr-input:focus {
    border-color: var(--accent);
    background: #fff;
}

.custom-dhikr-input.arabic-input {
    font-family: 'Amiri', serif;
    font-size: 18px;
    text-align: right;
}

.page-wrapper.dark .custom-dhikr-input {
    background: rgba(255, 255, 255, 0.05);
    border-color: #4a5568;
    color: var(--text-dark);
}

.page-wrapper.dark .custom-dhikr-input:focus {
    background: rgba(255, 255, 255, 0.08);
}

.custom-dhikr-buttons {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.custom-dhikr-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-dhikr-btn.cancel {
    background: #e2e8f0;
    color: #4a5568;
}

.custom-dhikr-btn.cancel:hover {
    background: #cbd5e0;
}

.page-wrapper.dark .custom-dhikr-btn.cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #a0aec0;
}

.custom-dhikr-btn.save {
    background: linear-gradient(145deg, var(--accent), #c9a227);
    color: #1a1a1a;
}

.custom-dhikr-btn.save:hover {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

/* RTL Support for Custom Dhikr Modal */
body.rtl .custom-dhikr-close {
    right: auto;
    left: 16px;
}

body.rtl .custom-dhikr-input:not(.arabic-input) {
    text-align: right;
}

body.rtl .custom-dhikr-input.arabic-input {
    text-align: right;
}

/* Mobile Responsive for Custom Dhikr */
@media (max-width: 480px) {
    .custom-dhikr-box {
        width: 95%;
        padding: 20px;
    }
    
    .custom-dhikr-title {
        font-size: 18px;
    }
    
    .custom-dhikr-input {
        padding: 10px 14px;
        font-size: 14px;
    }
    
    .custom-dhikr-input.arabic-input {
        font-size: 16px;
    }
    
    .custom-dhikr-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .dhikr-modal-add-btn {
        padding: 14px;
        font-size: 13px;
    }
}

/* ========================================
   Feedback Section
   ======================================== */
.feedback-section {
    background: linear-gradient(135deg, #fdf8e8 0%, #f5eed4 100%);
    padding: 40px 20px;
    text-align: center;
}

.page-wrapper.dark .feedback-section {
    background: linear-gradient(135deg, #1e2433 0%, #252d3f 100%);
}

.feedback-inner {
    max-width: 600px;
    margin: 0 auto;
}

.feedback-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

.feedback-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 12px;
    font-family: 'Amiri', serif;
}

.page-wrapper.dark .feedback-title {
    color: var(--text-dark);
}

.feedback-text {
    font-size: 14px;
    line-height: 1.8;
    color: #4a5568;
    margin: 0 0 20px;
}

.page-wrapper.dark .feedback-text {
    color: #a0aec0;
}

.feedback-btn {
    display: inline-block;
    padding: 10px 28px;
    background: linear-gradient(145deg, var(--accent), #c9a227);
    color: #1a1a1a;
    font-size: 14px;
    font-weight: 600;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.feedback-btn:hover {
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

@media (max-width: 480px) {
    .feedback-section {
        padding: 32px 16px;
    }

    .feedback-title {
        font-size: 18px;
    }

    .feedback-text {
        font-size: 13px;
    }
}

/* ========================================
   Voice / Listen Button (Dhikr Guide Cards)
   ======================================== */
.voice-btn {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.08);
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    outline: none;
    padding: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.voice-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--accent);
    transform: scale(1.1);
}

.voice-btn:active {
    transform: scale(0.95);
}

.voice-btn.playing {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--accent);
    animation: voicePulse 1s ease-in-out infinite;
}

@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.3); }
    50% { box-shadow: 0 0 0 6px rgba(212, 175, 55, 0); }
}

/* Voice button in dhikr guide cards */
.voice-btn-card {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    font-size: 16px;
    margin-top: 8px;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
}

.voice-btn-card:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.voice-btn-card.playing {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Expand Mode - Hides header/nav, centers counter
   ======================================== */
.page-wrapper.expand-mode .top-nav,
.page-wrapper.expand-mode .header .brand {
    display: none !important;
}

.page-wrapper.expand-mode .header {
    justify-content: flex-end;
    margin-top: 16px;
    padding-right: 12px;
}

.page-wrapper.expand-mode .main {
    justify-content: center;
    gap: 12px;
}

.page-wrapper.expand-mode .controls {
    margin-top: 6px;
}

.page-wrapper.expand-mode .bottom {
    margin-top: 8px;
}

.page-wrapper.expand-mode .mode-toggle {
    margin-bottom: 10px;
}

.page-wrapper.expand-mode .goal-row {
    margin-bottom: 14px;
}

.page-wrapper.expand-mode .stats {
    margin-bottom: 10px;
}

/* Expand mode mobile: reduce gap, push counter up */
@media (max-width: 480px) {
    .page-wrapper.expand-mode .header {
        margin-top: 4px;
        margin-bottom: 0;
    }
    .page-wrapper.expand-mode .main {
        gap: 6px;
        justify-content: center;
        padding-top: 0;
    }
}

/* When both expand + focus mode are active, focus mode wins — keep centered */
.page-wrapper.expand-mode.focus-mode .main {
    justify-content: center !important;
    padding-top: 5vh !important;
    padding-bottom: 0 !important;
    gap: 20px !important;
}

@media (max-width: 480px) {
    .page-wrapper.expand-mode.focus-mode .main {
        padding-top: 2vh !important;
        padding-bottom: 8vh !important;
        gap: 16px !important;
    }
}

/* Disable page scroll in expand mode but keep dhikr modal scrollable */
html.expand-mode-open,
html.expand-mode-open body {
    overflow: hidden !important;
    height: 100% !important;
}

/* Expand button active state */
.page-wrapper.expand-mode #expandBtn,
.page-wrapper.expand-mode #expandBtn:hover {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: #1a1a1a !important;
}

#expandBtn {
    color: #334155 !important;
}

#expandBtn:hover {
    color: #334155 !important;
}

.page-wrapper.dark #expandBtn {
    color: #e2e8f0 !important;
}

.page-wrapper.dark #expandBtn:hover {
    color: #e2e8f0 !important;
}

/* ========================================
   Interactive Sections (ix-*)
   Features, How-To, Why, Install
   ======================================== */

/* Shared Section Titles */
.ix-section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 8px;
    font-family: 'Amiri', serif;
}

.page-wrapper.dark .ix-section-title {
    color: var(--text-dark);
}

.ix-section-subtitle {
    text-align: center;
    color: #718096;
    font-size: 15px;
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto 32px;
}

.page-wrapper.dark .ix-section-subtitle {
    color: #a0aec0;
}

/* ---- Features Grid ---- */
.ix-features {
    padding: 50px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.page-wrapper.dark .ix-features {
    background: rgba(26, 26, 46, 0.95);
}

.ix-features-inner {
    max-width: 960px;
    margin: 0 auto;
}

.ix-features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ix-feature-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.12);
    border-radius: 16px;
    padding: 24px 20px;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ix-feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.3);
}

.page-wrapper.dark .ix-feature-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.15);
}

.page-wrapper.dark .ix-feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Top row: 2 highlight cards share 3 columns */
.ix-feature-highlight:first-child {
    grid-column: 1 / 2;
}
.ix-feature-highlight:nth-child(2) {
    grid-column: 2 / 4;
}

.ix-feature-highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(212, 175, 55, 0.02));
    border-color: rgba(212, 175, 55, 0.2);
}

.page-wrapper.dark .ix-feature-highlight {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(212, 175, 55, 0.04));
}

.ix-feature-icon {
    font-size: 32px;
    line-height: 1;
    margin-bottom: 4px;
}

.ix-feature-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.page-wrapper.dark .ix-feature-name {
    color: var(--text-dark);
}

.ix-feature-desc {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    margin: 0;
}

.page-wrapper.dark .ix-feature-desc {
    color: #a0aec0;
}

.ix-feature-try {
    margin-top: auto;
    padding: 8px 20px;
    background: var(--accent);
    color: #1a1a1a;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}

.ix-feature-try:hover {
    transform: scale(1.04);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.35);
}

.ix-feature-try:active {
    transform: scale(0.97);
}

.ix-feature-try:focus,
.ix-feature-try:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.ix-lang-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
}

.ix-lang-links a {
    padding: 3px 10px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    transition: all 0.2s;
}

.ix-lang-links a:hover {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--accent);
}

/* ---- How-To Steps ---- */
.ix-howto {
    padding: 50px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(212, 175, 55, 0.02));
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.page-wrapper.dark .ix-howto {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(26, 26, 46, 0.95));
}

.ix-howto-inner {
    max-width: 720px;
    margin: 0 auto;
}

.ix-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 40px;
    position: relative;
}

/* Vertical connecting line */
.ix-steps::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent), rgba(212, 175, 55, 0.2));
    border-radius: 1px;
}

.ix-step {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 0;
    position: relative;
}

.ix-step-num {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--accent);
    color: #1a1a1a;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.ix-step-content {
    flex: 1;
}

.ix-step-content h3 {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}

.page-wrapper.dark .ix-step-content h3 {
    color: var(--text-dark);
}

.ix-step-content p {
    font-size: 14px;
    color: #718096;
    line-height: 1.6;
    margin: 0;
}

.page-wrapper.dark .ix-step-content p {
    color: #a0aec0;
}

.ix-step-visual {
    font-size: 28px;
    opacity: 0.6;
    flex-shrink: 0;
    padding-top: 4px;
}

.ix-key {
    display: inline-block;
    padding: 2px 8px;
    background: rgba(0, 0, 0, 0.07);
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.page-wrapper.dark .ix-key {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ---- Sunnah Box ---- */
.ix-sunnah-box {
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(250, 248, 240, 0.9));
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 20px;
    padding: 32px 24px;
    text-align: center;
    margin-bottom: 40px;
}

.page-wrapper.dark .ix-sunnah-box {
    background: linear-gradient(145deg, rgba(45, 55, 72, 0.9), rgba(30, 36, 51, 0.9));
    border-color: rgba(212, 175, 55, 0.25);
}

.ix-sunnah-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
}

.ix-sunnah-phases {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.ix-sunnah-phase {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 16px;
    background: rgba(212, 175, 55, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.15);
    min-width: 110px;
}

.page-wrapper.dark .ix-sunnah-phase {
    background: rgba(212, 175, 55, 0.1);
}

.ix-sunnah-count {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
}

.ix-sunnah-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
}

.page-wrapper.dark .ix-sunnah-name {
    color: var(--text-dark);
}

.ix-sunnah-arabic {
    font-family: 'Amiri', serif;
    font-size: 14px;
    color: #718096;
    direction: rtl;
}

.page-wrapper.dark .ix-sunnah-arabic {
    color: #a0aec0;
}

.ix-sunnah-arrow {
    font-size: 20px;
    color: var(--accent);
    font-weight: 700;
    opacity: 0.6;
}

.ix-sunnah-hadith {
    margin-bottom: 20px;
}

.ix-sunnah-hadith blockquote {
    font-size: 14px;
    font-style: italic;
    color: #4a5568;
    line-height: 1.7;
    margin: 0 0 8px;
    padding: 0;
    border: none;
}

.page-wrapper.dark .ix-sunnah-hadith blockquote {
    color: #cbd5e0;
}

.ix-sunnah-hadith cite {
    font-size: 12px;
    color: var(--accent);
    font-style: normal;
    font-weight: 600;
}

.ix-sunnah-start {
    padding: 12px 32px;
    background: var(--accent);
    color: #1a1a1a;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    outline: none;
    -webkit-tap-highlight-color: transparent;
    -webkit-appearance: none;
}

.ix-sunnah-start:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.ix-sunnah-start:active {
    transform: scale(0.97);
}

.ix-sunnah-start:focus,
.ix-sunnah-start:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---- Why Cards ---- */
.ix-why-grid {
    margin-bottom: 40px;
}

.ix-why-grid .ix-section-title {
    margin-bottom: 20px;
}

.ix-why-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.ix-why-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    transition: transform 0.2s, border-color 0.2s;
}

.ix-why-card:hover {
    transform: translateY(-2px);
    border-color: rgba(212, 175, 55, 0.25);
}

.page-wrapper.dark .ix-why-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.12);
}

.ix-why-icon {
    font-size: 22px;
    flex-shrink: 0;
    line-height: 1;
}

.ix-why-text {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.5;
}

.page-wrapper.dark .ix-why-text {
    color: #a0aec0;
}

.ix-why-note {
    text-align: center;
    font-size: 13px;
    color: #a0aec0;
    font-style: italic;
    margin: 0;
}

/* ---- Install Box ---- */
.ix-install-box {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 16px;
    padding: 28px 24px;
    text-align: center;
}

.page-wrapper.dark .ix-install-box {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.2);
}

.ix-install-icon {
    font-size: 36px;
    margin-bottom: 8px;
}

.ix-install-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 4px;
}

.page-wrapper.dark .ix-install-title {
    color: var(--text-dark);
}

.ix-install-desc {
    font-size: 14px;
    color: #718096;
    margin: 0 0 16px;
}

.page-wrapper.dark .ix-install-desc {
    color: #a0aec0;
}

.ix-install-steps {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.ix-install-platform {
    font-size: 13px;
    color: #4a5568;
    padding: 12px 20px;
    background: rgba(212, 175, 55, 0.06);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-wrapper.dark .ix-install-platform {
    color: #cbd5e0;
    background: rgba(212, 175, 55, 0.08);
}

.ix-install-badge {
    padding: 3px 10px;
    background: var(--accent);
    color: #1a1a1a;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .ix-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .ix-feature-highlight:first-child,
    .ix-feature-highlight:nth-child(2) {
        grid-column: span 1;
    }
    .ix-why-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .ix-section-title {
        font-size: 24px;
    }
    .ix-sunnah-phases {
        gap: 8px;
    }
    .ix-sunnah-phase {
        min-width: 90px;
        padding: 10px 12px;
    }
    .ix-steps::before {
        left: 18px;
    }
    .ix-step-num {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .ix-features,
    .ix-howto {
        padding: 36px 16px;
    }
    .ix-features-grid {
        grid-template-columns: 1fr;
    }
    .ix-feature-highlight {
        grid-column: span 1;
    }
    .ix-why-cards {
        grid-template-columns: 1fr;
    }
    .ix-section-title {
        font-size: 22px;
    }
    .ix-section-subtitle {
        font-size: 14px;
    }
    .ix-sunnah-arrow {
        display: none;
    }
    .ix-sunnah-phases {
        flex-direction: column;
        gap: 8px;
    }
    .ix-sunnah-phase {
        width: 100%;
        flex-direction: row;
        justify-content: center;
        gap: 12px;
    }
    .ix-step-visual {
        display: none;
    }
    .ix-install-steps {
        flex-direction: column;
        align-items: center;
    }
    .ix-install-platform {
        width: 100%;
        justify-content: center;
    }
}

/* RTL support for interactive sections */
body.rtl .ix-steps::before {
    left: auto;
    right: 22px;
}

body.rtl .ix-sunnah-arrow {
    transform: scaleX(-1);
}

/* ========================================
   Use Cases Section (ix-usecases)
   ======================================== */
.ix-usecases {
    padding: 50px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.04), rgba(212, 175, 55, 0.01));
    border-top: 1px solid rgba(212, 175, 55, 0.12);
}

.page-wrapper.dark .ix-usecases {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.06), rgba(26, 26, 46, 0.95));
}

.ix-usecases-inner {
    max-width: 960px;
    margin: 0 auto;
}

.ix-usecases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.ix-usecase-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 14px;
    padding: 22px 18px;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.ix-usecase-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.25);
}

.page-wrapper.dark .ix-usecase-card {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(212, 175, 55, 0.12);
}

.page-wrapper.dark .ix-usecase-card:hover {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.ix-usecase-icon {
    font-size: 28px;
    line-height: 1;
    margin-bottom: 2px;
}

.ix-usecase-name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin: 0;
}

.page-wrapper.dark .ix-usecase-name {
    color: var(--text-dark);
}

.ix-usecase-desc {
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    margin: 0;
}

.page-wrapper.dark .ix-usecase-desc {
    color: #a0aec0;
}

/* Responsive */
@media (max-width: 768px) {
    .ix-usecases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .ix-usecases {
        padding: 36px 16px;
    }
    .ix-usecases-grid {
        grid-template-columns: 1fr;
    }
}

.ix-usecases-note {
    text-align: center;
    font-size: 13px;
    color: #718096;
    line-height: 1.6;
    margin-top: 24px;
    font-style: italic;
}

.page-wrapper.dark .ix-usecases-note {
    color: #a0aec0;
}
