/* ============================================
   De Tuin van Dzikr — Stylesheet v2
   Premium dzikr-ervaring met 4 views
   ============================================ */

/* --- Al Qalam Quran Majeed font --- */
@font-face {
    font-family: 'AlQalamQuranMajeed';
    src: url('fonts/AlQalamQuranMajeed.ttf') format('truetype');
    font-display: swap;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Noto Sans', sans-serif;
    font-weight: 400;
    color: #f0ece4;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    background: linear-gradient(170deg, #081a33 0%, #0f2d50 45%, #0c2642 100%);
    background-attachment: fixed;
}

/* --- Starfield --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(1px 1px at 12% 8%,  #d4af37 60%, transparent 100%),
        radial-gradient(1px 1px at 27% 14%, #d4af37 50%, transparent 100%),
        radial-gradient(1.2px 1.2px at 45% 6%, #fff8dc 70%, transparent 100%),
        radial-gradient(1px 1px at 68% 11%, #d4af37 55%, transparent 100%),
        radial-gradient(1px 1px at 82% 4%,  #d4af37 50%, transparent 100%),
        radial-gradient(1.3px 1.3px at 5% 25%, #fff8dc 60%, transparent 100%),
        radial-gradient(1px 1px at 35% 30%, #d4af37 50%, transparent 100%),
        radial-gradient(1px 1px at 55% 22%, #d4af37 45%, transparent 100%),
        radial-gradient(1.1px 1.1px at 90% 28%, #fff8dc 55%, transparent 100%),
        radial-gradient(1px 1px at 18% 42%, #d4af37 50%, transparent 100%),
        radial-gradient(1px 1px at 72% 38%, #d4af37 55%, transparent 100%),
        radial-gradient(1.2px 1.2px at 50% 50%, #fff8dc 65%, transparent 100%),
        radial-gradient(1px 1px at 8% 58%,  #d4af37 50%, transparent 100%),
        radial-gradient(1px 1px at 62% 55%, #d4af37 45%, transparent 100%),
        radial-gradient(1.1px 1.1px at 88% 52%, #fff8dc 60%, transparent 100%),
        radial-gradient(1px 1px at 30% 65%, #d4af37 50%, transparent 100%),
        radial-gradient(1px 1px at 78% 70%, #d4af37 55%, transparent 100%),
        radial-gradient(1.3px 1.3px at 15% 78%, #fff8dc 70%, transparent 100%),
        radial-gradient(1px 1px at 42% 82%, #d4af37 50%, transparent 100%),
        radial-gradient(1px 1px at 95% 75%, #d4af37 45%, transparent 100%);
    opacity: .55;
}

/* =============================================
   APP SHELL
   ============================================= */
.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    min-height: 100dvh;
}

/* --- Header --- */
.app-header {
    text-align: center;
    padding: 1.25rem 1rem .75rem;
    max-width: 640px;
    margin: 0 auto;
}

.header-logo {
    height: 4rem;
    width: auto;
    margin-bottom: .5rem;
    filter: drop-shadow(0 2px 8px rgba(212, 175, 55, .35));
}

.header-title {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(1.5rem, 5vw, 2rem);
    color: #d4af37;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(212, 175, 55, .3);
}

.header-arabic {
    font-family: 'AlQalamQuranMajeed', 'Amiri', serif;
    font-size: clamp(1.4rem, 5vw, 2rem);
    line-height: 2.4;
    word-spacing: 0.15em;
    color: #e8d48b;
    margin-top: .1rem;
}

.header-subtitle {
    font-style: italic;
    font-size: .88rem;
    color: rgba(240, 236, 228, .55);
    margin-top: .25rem;
}

/* =============================================
   VIEWS SYSTEM
   ============================================= */
.app-views {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 1rem;
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
    min-height: calc(100vh - 120px);
    min-height: calc(100dvh - 120px);
}

.view {
    display: none;
    animation: viewFadeIn .3s ease;
}

.view.active {
    display: block;
}

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

.view-intro {
    text-align: center;
    font-size: .9rem;
    color: rgba(240, 236, 228, .7);
    margin-bottom: 1rem;
    font-style: italic;
}

.intro-section {
    background: rgba(212, 175, 55, .06);
    border: 1px solid rgba(212, 175, 55, .18);
    border-radius: 14px;
    padding: 1.25rem 1.15rem;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: .93rem;
    color: rgba(240, 236, 228, .85);
}

.intro-section strong {
    color: #e8d48b;
}

.hadith-ref {
    font-style: italic;
    color: #e8d48b;
    font-size: .88rem;
    margin: .75rem 0;
}

/* =============================================
   TAB BAR
   ============================================= */
.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    background: rgba(8, 26, 51, .92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(212, 175, 55, .2);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 0 4px;
    background: none;
    border: none;
    color: rgba(240, 236, 228, .45);
    font-family: 'Noto Sans', sans-serif;
    font-size: .65rem;
    font-weight: 600;
    cursor: pointer;
    transition: color .25s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.tab:hover { color: rgba(240, 236, 228, .7); }

.tab.active {
    color: #d4af37;
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
}

.tab-icon svg {
    transition: transform .2s;
}

.tab.active .tab-icon svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 4px rgba(212, 175, 55, .4));
}

/* =============================================
   VIEW: TUIN (Garden)
   ============================================= */

/* --- Garden --- */
.garden-wrap {
    position: relative;
    width: 100%;
    height: 320px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(212, 175, 55, .15);
    background: linear-gradient(180deg,
        #081a33 0%,
        #0c2240 50%,
        #0e2a1e 75%,
        #132b14 88%,
        #1a3518 100%);
}

.garden-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30%;
    background: linear-gradient(180deg,
        rgba(26, 53, 24, 0) 0%,
        rgba(26, 53, 24, .6) 30%,
        rgba(34, 60, 28, .85) 60%,
        rgba(28, 48, 22, .95) 100%);
    pointer-events: none;
    z-index: 3;
}

.garden-canvas {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.garden-particles {
    position: absolute;
    inset: 0;
    z-index: 4;
    pointer-events: none;
    overflow: hidden;
}

/* Zone labels */
.garden-zone-labels {
    position: absolute;
    bottom: 6px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-around;
    z-index: 5;
    pointer-events: none;
}

.zone-label {
    font-family: 'AlQalamQuranMajeed', 'Amiri', serif;
    font-size: clamp(.85rem, 3.5vw, 1.2rem);
    line-height: 2.4;
    word-spacing: 0.15em;
    color: rgba(232, 212, 139, .45);
    text-align: center;
}

/* --- Particles --- */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.particle-pollen {
    width: 3px;
    height: 3px;
    background: rgba(245, 215, 110, .5);
    animation: particleFloat 8s ease-in-out infinite;
}

.particle-firefly {
    width: 4px;
    height: 4px;
    background: rgba(255, 248, 220, .7);
    box-shadow: 0 0 6px rgba(255, 248, 220, .5);
    animation: fireflyFloat 6s ease-in-out infinite, fireflyGlow 3s ease-in-out infinite;
}

@keyframes particleFloat {
    0%   { transform: translate(0, 0); opacity: 0; }
    10%  { opacity: .6; }
    90%  { opacity: .6; }
    100% { transform: translate(20px, -80px); opacity: 0; }
}

@keyframes fireflyFloat {
    0%, 100% { transform: translate(0, 0); }
    25%  { transform: translate(15px, -20px); }
    50%  { transform: translate(-10px, -35px); }
    75%  { transform: translate(5px, -15px); }
}

@keyframes fireflyGlow {
    0%, 100% { opacity: .2; }
    50%      { opacity: .9; }
}

/* --- Garden items --- */
.garden-flower {
    position: absolute;
    animation: plantGrow .8s cubic-bezier(.34, 1.56, .64, 1) forwards, flowerSway 4s ease-in-out infinite;
    animation-delay: 0s, .8s;
    transform-origin: bottom center;
}

.flower-stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 2px;
    background: linear-gradient(180deg, #4a7c3f, #3a6330);
    transform: translateX(-50%);
    border-radius: 1px;
}

.flower-head {
    position: absolute;
    left: 50%;
    transform: translate(-50%, -50%);
}

.flower-petal {
    position: absolute;
    border-radius: 50%;
}

.flower-petal:nth-child(1) { transform: translate(-50%, -100%); }
.flower-petal:nth-child(2) { transform: translate(30%, -50%) rotate(72deg); }
.flower-petal:nth-child(3) { transform: translate(10%, 20%) rotate(144deg); }
.flower-petal:nth-child(4) { transform: translate(-110%, 20%) rotate(216deg); }
.flower-petal:nth-child(5) { transform: translate(-130%, -50%) rotate(288deg); }

.flower-center {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #f5d76e;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Tulip variant */
.flower-tulip .flower-petal {
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
}

.flower-tulip .flower-petal:nth-child(1) { transform: translate(-60%, -90%) rotate(-15deg); }
.flower-tulip .flower-petal:nth-child(2) { transform: translate(-40%, -90%); }
.flower-tulip .flower-petal:nth-child(3) { transform: translate(-20%, -90%) rotate(15deg); }
.flower-tulip .flower-petal:nth-child(4) { display: none; }
.flower-tulip .flower-petal:nth-child(5) { display: none; }

/* Daisy variant */
.flower-daisy .flower-petal {
    border-radius: 45%;
}

.flower-daisy .flower-petal:nth-child(1) { transform: translate(-50%, -110%) rotate(0deg); }
.flower-daisy .flower-petal:nth-child(2) { transform: translate(15%, -70%) rotate(60deg); }
.flower-daisy .flower-petal:nth-child(3) { transform: translate(15%, 0%) rotate(120deg); }
.flower-daisy .flower-petal:nth-child(4) { transform: translate(-115%, 0%) rotate(240deg); }
.flower-daisy .flower-petal:nth-child(5) { transform: translate(-115%, -70%) rotate(300deg); }

.garden-tree {
    position: absolute;
    animation: treeGrow 1s cubic-bezier(.34, 1.56, .64, 1) forwards, treeSway 6s ease-in-out infinite;
    animation-delay: 0s, 1s;
    transform-origin: bottom center;
}

.tree-trunk {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, #5a3e1a, #7a5428, #5a3e1a);
    border-radius: 2px;
}

.tree-canopy {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 35%, #3d7a2e 0%, #2d5e20 50%, #1f4a16 100%);
    box-shadow: inset -4px -4px 8px rgba(0,0,0,.2), 0 2px 8px rgba(0,0,0,.3);
}

/* Pine tree variant */
.tree-pine .tree-canopy {
    border-radius: 0;
    clip-path: polygon(50% 0%, 85% 100%, 15% 100%);
    background: linear-gradient(180deg, #2d6b22 0%, #1f4a16 100%);
}

.tree-fruit {
    position: absolute;
    width: 5px;
    height: 5px;
    background: radial-gradient(circle at 35% 35%, #f5d76e, #d4af37);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(212, 175, 55, .4);
}

.garden-star {
    position: absolute;
    animation: starAppear 1s cubic-bezier(.34, 1.56, .64, 1) forwards, starPulse 3s ease-in-out infinite;
    animation-delay: 0s, 1s;
    transform-origin: center center;
}

.star-shape {
    position: relative;
    display: inline-block;
    color: #fff8dc;
    filter: drop-shadow(0 0 6px rgba(255, 248, 220, .6));
}

.star-inner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle at 50% 50%, #fffef0, #f5d76e, #d4af37);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

.star-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 248, 220, .3) 0%, transparent 70%);
    pointer-events: none;
}

/* Garden animations */
@keyframes plantGrow {
    0%   { transform: scaleY(0) scaleX(0); opacity: 0; }
    60%  { transform: scaleY(1.1) scaleX(1.05); opacity: 1; }
    100% { transform: scaleY(1) scaleX(1); opacity: 1; }
}

@keyframes treeGrow {
    0%   { transform: scaleY(0) scaleX(0); opacity: 0; }
    50%  { transform: scaleY(1.05) scaleX(.95); opacity: 1; }
    100% { transform: scaleY(1) scaleX(1); opacity: 1; }
}

@keyframes starAppear {
    0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
    70%  { transform: scale(1.2) rotate(5deg); opacity: 1; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes flowerSway {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(2deg); }
    75%      { transform: rotate(-2deg); }
}

@keyframes treeSway {
    0%, 100% { transform: rotate(0deg); }
    33%      { transform: rotate(.8deg); }
    66%      { transform: rotate(-.8deg); }
}

@keyframes starPulse {
    0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 248, 220, .4)); }
    50%      { filter: drop-shadow(0 0 10px rgba(255, 248, 220, .8)); }
}

/* --- Gems (Lā ilāha illā Allāh) --- */
.garden-gem {
    position: absolute;
    animation: gemAppear .8s cubic-bezier(.34, 1.56, .64, 1) forwards, gemPulse 3.5s ease-in-out infinite;
    opacity: 0;
    z-index: 4;
}

.gem-shape {
    position: relative;
    transform: rotate(45deg);
}

.gem-facet {
    position: absolute;
    width: 0;
    height: 0;
    left: 0;
    right: 0;
}

.gem-facet-top {
    top: 0;
    border-left: var(--gem-half, 7px) solid transparent;
    border-right: var(--gem-half, 7px) solid transparent;
    border-bottom: var(--gem-half, 7px) solid #c39bd3;
}

.gem-facet-bottom {
    bottom: 0;
    border-left: var(--gem-half, 7px) solid transparent;
    border-right: var(--gem-half, 7px) solid transparent;
    border-top: var(--gem-half, 7px) solid #9b59b6;
}

.gem-sparkle {
    position: absolute;
    top: 25%;
    left: 25%;
    width: 50%;
    height: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .7) 0%, transparent 70%);
    border-radius: 50%;
    animation: gemSparkle 2s ease-in-out infinite;
}

@keyframes gemAppear {
    0%   { opacity: 0; transform: scale(0) rotate(0deg); }
    60%  { opacity: 1; transform: scale(1.2) rotate(10deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes gemPulse {
    0%, 100% { filter: drop-shadow(0 0 3px rgba(155, 89, 182, .3)); }
    50%      { filter: drop-shadow(0 0 10px rgba(155, 89, 182, .7)); }
}

@keyframes gemSparkle {
    0%, 100% { opacity: .3; transform: scale(.8); }
    50%      { opacity: .9; transform: scale(1.2); }
}

/* --- Dzikr cards --- */
.dzikr-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dzikr-card {
    background: rgba(212, 175, 55, .04);
    border: 1px solid rgba(212, 175, 55, .15);
    border-radius: 16px;
    padding: 1.25rem 1.1rem;
    transition: border-color .3s, box-shadow .3s;
}

.dzikr-card:hover {
    border-color: rgba(212, 175, 55, .3);
    box-shadow: 0 0 20px rgba(212, 175, 55, .06);
}

.dzikr-card.card-subhanallah { border-left: 3px solid #e88ca5; }
.dzikr-card.card-alhamdulillah { border-left: 3px solid #5cb85c; }
.dzikr-card.card-allahuakbar { border-left: 3px solid #f5d76e; }
.dzikr-card.card-lailahaillallah { border-left: 3px solid #9b59b6; }

.dzikr-arabic {
    font-family: 'AlQalamQuranMajeed', 'Amiri', serif;
    font-size: clamp(1.6rem, 6vw, 2.4rem);
    color: #d4af37;
    text-align: center;
    line-height: 2.4;
    word-spacing: 0.15em;
    margin-bottom: .2rem;
}

.dzikr-translit {
    text-align: center;
    font-size: .88rem;
    color: #e8d48b;
    font-style: italic;
    margin-bottom: .15rem;
}

.dzikr-meaning {
    text-align: center;
    font-size: .84rem;
    color: rgba(240, 236, 228, .7);
    margin-bottom: .75rem;
    font-weight: 600;
}

.dzikr-explain {
    font-size: .86rem;
    line-height: 1.6;
    color: rgba(240, 236, 228, .8);
    margin-bottom: .6rem;
}

.dzikr-hadith {
    font-size: .82rem;
    line-height: 1.55;
    color: #e8d48b;
    font-style: italic;
    border-left: 2px solid rgba(212, 175, 55, .25);
    padding-left: .75rem;
    margin-bottom: .75rem;
}

.dzikr-hadith span {
    display: block;
    font-size: .75rem;
    margin-top: .25rem;
    opacity: .7;
}

.dzikr-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: .5rem;
}

.dzikr-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .75rem 1.4rem;
    border: none;
    border-radius: 50px;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 700;
    font-size: .9rem;
    color: #081a33;
    cursor: pointer;
    transition: transform .1s, box-shadow .15s;
    overflow: hidden;
    min-height: 48px;
    min-width: 48px;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
    border-bottom: 4px solid rgba(0,0,0,.25);
    letter-spacing: .02em;
}

.dzikr-btn:hover { transform: translateY(-2px); }
.dzikr-btn:active { transform: translateY(2px); border-bottom-width: 1px; }

.dzikr-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,.3);
    border-radius: inherit;
    transform: scale(0);
    opacity: 0;
    transition: transform .5s, opacity .5s;
}

.dzikr-btn.ripple::after {
    transform: scale(2.5);
    opacity: 0;
}

.btn-subhanallah {
    background: linear-gradient(180deg, #f9b8c8 0%, #e88ca5 100%);
    box-shadow: 0 6px 16px rgba(232, 140, 165, .4);
}
.btn-subhanallah:hover { box-shadow: 0 8px 22px rgba(232, 140, 165, .5); }
.btn-subhanallah:active { background: linear-gradient(180deg, #e88ca5, #d4749a); }

.btn-alhamdulillah {
    background: linear-gradient(180deg, #8ed88e 0%, #5cb85c 100%);
    box-shadow: 0 6px 16px rgba(92, 184, 92, .4);
}
.btn-alhamdulillah:hover { box-shadow: 0 8px 22px rgba(92, 184, 92, .5); }
.btn-alhamdulillah:active { background: linear-gradient(180deg, #5cb85c, #47a347); }

.btn-allahuakbar {
    background: linear-gradient(180deg, #faee9a 0%, #f5d76e 100%);
    box-shadow: 0 6px 16px rgba(245, 215, 110, .4);
}
.btn-allahuakbar:hover { box-shadow: 0 8px 22px rgba(245, 215, 110, .5); }
.btn-allahuakbar:active { background: linear-gradient(180deg, #f5d76e, #e8c44a); }

.btn-lailahaillallah {
    background: linear-gradient(180deg, #c39bd3 0%, #9b59b6 100%);
    box-shadow: 0 6px 16px rgba(155, 89, 182, .4);
    color: #fff;
}
.btn-lailahaillallah:hover { box-shadow: 0 8px 22px rgba(155, 89, 182, .5); }
.btn-lailahaillallah:active { background: linear-gradient(180deg, #9b59b6, #7d3c98); }

.dzikr-count {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #d4af37;
    min-width: 2.5rem;
    text-align: center;
}

/* --- Educational section --- */
.edu-section { margin-bottom: 1.5rem; }

.edu-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #d4af37;
    margin-bottom: .75rem;
    text-align: center;
}

.edu-facts { display: flex; flex-direction: column; gap: .6rem; }

.edu-fact {
    background: rgba(212, 175, 55, .04);
    border: 1px solid rgba(212, 175, 55, .1);
    border-radius: 12px;
    padding: .85rem 1rem;
    font-size: .84rem;
    line-height: 1.6;
    color: rgba(240, 236, 228, .8);
}

.edu-fact .fact-icon {
    margin-right: .35rem;
    color: #d4af37;
}

/* =============================================
   VIEW: TASBIH
   ============================================= */
.tasbih-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem 0 1rem;
    gap: 1.25rem;
}

/* Dzikr type selector */
.tasbih-selector {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.tasbih-type-btn {
    padding: .5rem 1rem;
    border: 1px solid rgba(212, 175, 55, .25);
    border-radius: 50px;
    background: transparent;
    color: rgba(240, 236, 228, .6);
    font-family: 'Noto Sans', sans-serif;
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all .25s;
    -webkit-tap-highlight-color: transparent;
}

.tasbih-type-btn:hover {
    border-color: rgba(212, 175, 55, .45);
    color: rgba(240, 236, 228, .85);
}

.tasbih-type-btn.active {
    background: rgba(212, 175, 55, .15);
    border-color: #d4af37;
    color: #d4af37;
}

/* Bead circle */
.tasbih-circle-wrap {
    position: relative;
    width: min(320px, 80vw);
    height: min(320px, 80vw);
}

.tasbih-circle {
    position: absolute;
    inset: 0;
}

.tasbih-bead {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(212, 175, 55, .12);
    border: 1.5px solid rgba(212, 175, 55, .25);
    transition: all .3s ease;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.tasbih-bead.completed {
    background: radial-gradient(circle at 40% 35%, #e8c84a, #d4af37);
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(212, 175, 55, .5);
}

.tasbih-bead.current {
    background: rgba(212, 175, 55, .3);
    border-color: #e8d48b;
    box-shadow: 0 0 14px rgba(212, 175, 55, .6);
    animation: beadPulse 1.5s ease-in-out infinite;
}

.tasbih-bead.milestone {
    width: 24px;
    height: 24px;
    margin: -2px;
}

@keyframes beadPulse {
    0%, 100% { box-shadow: 0 0 8px rgba(212, 175, 55, .4); }
    50%      { box-shadow: 0 0 18px rgba(212, 175, 55, .8); }
}

/* Center display */
.tasbih-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    pointer-events: none;
}

.tasbih-center-arabic {
    font-family: 'AlQalamQuranMajeed', 'Amiri', serif;
    font-size: clamp(1.2rem, 5vw, 1.8rem);
    line-height: 2.4;
    word-spacing: 0.15em;
    color: #d4af37;
}

.tasbih-center-count {
    font-family: 'Cinzel', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #e8d48b;
    margin-top: .25rem;
}

.tasbih-center-rounds {
    font-size: .75rem;
    color: rgba(240, 236, 228, .5);
    margin-top: .15rem;
}

/* Tap button */
.tasbih-tap-btn {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid #d4af37;
    background: rgba(212, 175, 55, .1);
    color: #d4af37;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .15s;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
}

.tasbih-tap-btn:hover {
    background: rgba(212, 175, 55, .2);
    box-shadow: 0 0 20px rgba(212, 175, 55, .3);
}

.tasbih-tap-btn:active {
    transform: scale(.92);
    background: rgba(212, 175, 55, .25);
}

/* Controls */
.tasbih-controls {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.tasbih-control-btn {
    display: flex;
    align-items: center;
    gap: .35rem;
    background: none;
    border: 1px solid rgba(212, 175, 55, .2);
    color: rgba(240, 236, 228, .5);
    font-family: 'Noto Sans', sans-serif;
    font-size: .75rem;
    padding: .4rem .8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: color .25s, border-color .25s;
}

.tasbih-control-btn:hover {
    color: rgba(240, 236, 228, .75);
    border-color: rgba(212, 175, 55, .35);
}

.tasbih-control-toggle {
    display: flex;
    align-items: center;
    gap: .35rem;
    color: rgba(240, 236, 228, .5);
    font-size: .75rem;
    cursor: pointer;
    transition: color .25s;
}

.tasbih-control-toggle:hover { color: rgba(240, 236, 228, .75); }
.tasbih-control-toggle input { display: none; }

.tasbih-control-toggle:has(input:checked) {
    color: #d4af37;
}

/* Celebration overlay */
.tasbih-celebration {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(8, 26, 51, .85);
    backdrop-filter: blur(8px);
    animation: celebrationIn .5s ease;
    pointer-events: auto;
}

.tasbih-celebration-content {
    text-align: center;
    animation: celebrationBounce .6s cubic-bezier(.34, 1.56, .64, 1);
}

.tasbih-celebration h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: #d4af37;
    margin-bottom: .5rem;
}

.tasbih-celebration p {
    color: rgba(240, 236, 228, .8);
    font-size: .9rem;
    margin-bottom: 1.25rem;
}

.tasbih-celebration button {
    padding: .6rem 1.5rem;
    border: 1px solid #d4af37;
    border-radius: 50px;
    background: rgba(212, 175, 55, .15);
    color: #d4af37;
    font-family: 'Noto Sans', sans-serif;
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
    transition: background .2s;
}

.tasbih-celebration button:hover {
    background: rgba(212, 175, 55, .25);
}

@keyframes celebrationIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes celebrationBounce {
    from { transform: scale(.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* =============================================
   VIEW: PATROON (Geometric Pattern)
   ============================================= */
.patroon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: .5rem 0 1rem;
    gap: 1rem;
}

.patroon-canvas-wrap {
    width: min(400px, 90vw);
    height: min(400px, 90vw);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, .15);
    background: rgba(8, 26, 51, .5);
    position: relative;
}

.patroon-canvas-wrap canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.patroon-info {
    text-align: center;
}

.patroon-level {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 600;
    color: #d4af37;
}

.patroon-desc {
    font-size: .82rem;
    color: rgba(240, 236, 228, .6);
    margin-top: .25rem;
}

/* =============================================
   VIEW: STATS
   ============================================= */
.stats-container {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: .5rem 0 1.5rem;
}

.stats-section-title {
    font-family: 'Cinzel', serif;
    font-weight: 600;
    font-size: .95rem;
    color: #d4af37;
    margin-bottom: .6rem;
}

/* Streak card */
.stats-streak-card {
    text-align: center;
    background: rgba(212, 175, 55, .06);
    border: 1px solid rgba(212, 175, 55, .18);
    border-radius: 16px;
    padding: 1.25rem 1rem;
    position: relative;
    overflow: hidden;
}

.stats-streak-number {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
    text-shadow: 0 2px 12px rgba(212, 175, 55, .3);
}

.stats-streak-label {
    font-size: .85rem;
    color: rgba(240, 236, 228, .7);
    margin-top: .3rem;
}

.stats-streak-fire {
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 1.5rem;
}

/* Today */
.stats-today-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

.stats-today-item {
    background: rgba(212, 175, 55, .04);
    border: 1px solid rgba(212, 175, 55, .12);
    border-radius: 12px;
    padding: .75rem .5rem;
    text-align: center;
}

.stats-today-count {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.4rem;
    color: #e8d48b;
}

.stats-today-label {
    display: block;
    font-size: .68rem;
    color: rgba(240, 236, 228, .55);
    margin-top: .2rem;
}

/* Heatmap */
.stats-heatmap-section {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stats-heatmap-months {
    display: flex;
    gap: 0;
    padding-left: 2px;
    margin-bottom: 4px;
    font-size: .6rem;
    color: rgba(240, 236, 228, .4);
}

.stats-heatmap-months span {
    text-align: left;
}

.stats-heatmap {
    display: grid;
    grid-template-rows: repeat(7, 12px);
    grid-auto-flow: column;
    grid-auto-columns: 12px;
    gap: 2px;
}

.stats-heatmap-cell {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: rgba(212, 175, 55, .06);
}

.stats-heatmap-cell[data-level="1"] { background: rgba(212, 175, 55, .2); }
.stats-heatmap-cell[data-level="2"] { background: rgba(212, 175, 55, .4); }
.stats-heatmap-cell[data-level="3"] { background: rgba(212, 175, 55, .65); }
.stats-heatmap-cell[data-level="4"] { background: rgba(212, 175, 55, .9); }

.stats-heatmap-legend {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: .5rem;
    justify-content: flex-end;
}

.stats-heatmap-legend-label {
    font-size: .6rem;
    color: rgba(240, 236, 228, .4);
    margin: 0 3px;
}

/* Totals */
.stats-totals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .75rem;
}

.stats-total-item {
    background: rgba(212, 175, 55, .04);
    border: 1px solid rgba(212, 175, 55, .12);
    border-radius: 12px;
    padding: .75rem .5rem;
    text-align: center;
}

.stats-total-count {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #d4af37;
}

.stats-total-label {
    display: block;
    font-size: .68rem;
    color: rgba(240, 236, 228, .55);
    margin-top: .2rem;
}

/* Records */
.stats-records-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
}

.stats-record-item {
    background: rgba(212, 175, 55, .04);
    border: 1px solid rgba(212, 175, 55, .12);
    border-radius: 12px;
    padding: .75rem .5rem;
    text-align: center;
}

.stats-record-value {
    display: block;
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: #e8d48b;
}

.stats-record-label {
    display: block;
    font-size: .68rem;
    color: rgba(240, 236, 228, .55);
    margin-top: .2rem;
}

/* Reset */
.stats-reset-wrap {
    text-align: center;
    margin-top: .5rem;
}

.reset-btn {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, .15);
    color: rgba(240, 236, 228, .35);
    font-family: 'Noto Sans', sans-serif;
    font-size: .75rem;
    padding: .4rem .9rem;
    border-radius: 8px;
    cursor: pointer;
    transition: color .3s, border-color .3s;
}

.reset-btn:hover {
    color: rgba(240, 236, 228, .6);
    border-color: rgba(212, 175, 55, .3);
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (min-width: 520px) {
    .garden-wrap { height: 370px; }
    .dzikr-arabic { font-size: 2rem; }
}

@media (min-width: 768px) {
    .app-views { max-width: 720px; }
    .garden-wrap { height: 420px; }

    .dzikr-cards {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: .85rem;
    }

    .dzikr-card { padding: 1rem .9rem; }
    .dzikr-arabic { font-size: 1.4rem; }
    .dzikr-explain { font-size: .8rem; }
    .dzikr-hadith { font-size: .76rem; }
    .dzikr-btn { padding: .6rem 1rem; font-size: .82rem; }
    .dzikr-action { flex-direction: column; gap: .5rem; }
}

/* =============================================
   ACCESSIBILITY: Reduced motion
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .view { animation: none; }

    .garden-flower,
    .garden-tree,
    .garden-star {
        animation: none !important;
        opacity: 1;
        transform: none;
    }

    .particle-pollen,
    .particle-firefly {
        animation: none !important;
        display: none;
    }

    .tasbih-bead.current { animation: none; }

    .tasbih-celebration,
    .tasbih-celebration-content { animation: none; }

    .tab-icon svg { transition: none; }
}
