    /* ============================================================
       RESET & BASE
       ============================================================ */
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

    body {
      font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif;
      background: #020812;
      color: #ffffff;
      height: 100vh;
      overflow: hidden;
      user-select: none;
      -webkit-font-smoothing: antialiased;
    }

    /* ============================================================
       BACKGROUND & DECORATIONS
       ============================================================ */
    .bg-layer {
      position: fixed; inset: 0; z-index: 0;
      background:
        radial-gradient(ellipse at 50% -10%, rgba(16,40,80,0.9) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 80%, rgba(6,20,50,0.7) 0%, transparent 50%),
        radial-gradient(ellipse at 20% 70%, rgba(2,8,28,0.8) 0%, transparent 50%),
        linear-gradient(180deg, #020c20 0%, #030a18 60%, #020810 100%);
    }

    canvas#stars-canvas {
      position: fixed; inset: 0; z-index: 1;
      pointer-events: none;
    }


    .bottom-bar {
      position: fixed; bottom: 0; left: 0; right: 0; height: 2px; z-index: 100;
      background: linear-gradient(90deg, transparent 0%, rgba(240,184,48,0.15) 20%, rgba(240,184,48,0.4) 50%, rgba(240,184,48,0.15) 80%, transparent 100%);
    }

    /* Mosque silhouette SVG */
    .mosque-bg {
      position: fixed; bottom: -5px; left: 0; right: 0; z-index: 2;
      text-align: center; opacity: 0.035; pointer-events: none;
      line-height: 0;
    }
    .mosque-bg svg { width: 100%; max-width: 900px; height: auto; }

    /* ============================================================
       SLIDES
       ============================================================ */
    .slide {
      position: fixed; inset: 0; z-index: 10;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      text-align: center;
      opacity: 0; transition: opacity 0.9s ease-in-out, transform 0.9s ease-in-out;
      transform: scale(1.008);
      pointer-events: none;
      padding: 5vh 6vw;   /* viewport-relative padding for overscan safety */
    }
    .slide.active { opacity: 1; transform: scale(1); pointer-events: auto; }

    /* Prayer times slide — centred header, grid is now a global overlay */

    /* ============================================================
       SLIDE 1 — CLOCK + COUNTDOWN
       ============================================================ */
    .s1-location {
      font-family: 'Cinzel', serif;
      font-size: clamp(1rem, 1.8vw, 1.6rem);
      color: #7ecfe0;
      letter-spacing: 0.4em;
      text-transform: uppercase;
      font-weight: 400;
      margin-bottom: 0.4rem;
      text-shadow: 0 0 30px rgba(126,207,224,0.3);
    }

    .s1-hijri {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.95rem, 1.6vw, 1.4rem);
      color: #f0b830;
      letter-spacing: 0.15em;
      text-shadow: 0 0 20px rgba(240,165,0,0.3);
    }

    .s1-gregorian {
      font-size: clamp(0.8rem, 1.2vw, 1rem);
      color: #6a7a94;
      letter-spacing: 0.08em;
      margin-top: 0.15rem;
    }

    .s1-clock {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(3.2rem, min(8vw, 14vh), 6.5rem);
      font-weight: 200;
      letter-spacing: 0.06em;
      color: #ffffff;
      text-shadow:
        0 0 40px rgba(240,184,48,0.2),
        0 0 80px rgba(240,184,48,0.08),
        0 2px 4px rgba(0,0,0,0.4);
      margin: 0.4rem 0 0.3rem;
      font-variant-numeric: tabular-nums;
      line-height: 1;
    }

    .s1-next-section { text-align: center; margin-top: clamp(0.5rem, 1.5vh, 1.2rem); margin-bottom: clamp(3rem, 8vh, 6rem); }

    .s1-next-label {
      font-size: clamp(0.65rem, 1vw, 0.85rem);
      color: #6a7a94;
      letter-spacing: 0.4em;
      text-transform: uppercase;
    }

    .s1-next-name {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.4rem, min(2.8vw, 5vh), 2.4rem);
      font-weight: 700;
      color: #f0b830;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      margin: 0.1rem 0;
      text-shadow:
        0 0 30px rgba(240,184,48,0.4),
        0 0 60px rgba(240,184,48,0.15);
    }

    .s1-countdown {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(1.2rem, min(2.4vw, 4.2vh), 2rem);
      font-weight: 300;
      color: rgba(255,255,255,0.9);
      letter-spacing: 0.1em;
      font-variant-numeric: tabular-nums;
    }

    .s1-countdown-label {
      font-size: clamp(0.6rem, 0.9vw, 0.75rem);
      color: #6a7a94;
      letter-spacing: 0.3em;
      text-transform: uppercase;
      margin-top: 0.2rem;
    }

    /* Progress bar removed */

    /* ============================================================
       SLIDE 2 — PRAYER TIMES TABLE
       ============================================================ */
    .s2-title {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.1rem, 2vw, 1.7rem);
      letter-spacing: 0.5em;
      text-transform: uppercase;
      color: #7ecfe0;
      font-weight: 600;
      margin-bottom: 0.2rem;
      text-shadow: 0 0 30px rgba(126,207,224,0.3);
    }

    .s2-subtitle {
      font-size: clamp(0.75rem, 1.1vw, 0.95rem);
      color: #6a7a94;
      letter-spacing: 0.12em;
      margin-bottom: 0;
    }

    /* ── Fixed prayer bar visible on all slides ── */
    #prayer-bar {
      position: fixed;
      bottom: 0; left: 0; right: 0;
      z-index: 200;
      padding: 0.6rem 1rem 0.7rem;
      background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.0) 100%);
      pointer-events: none;
    }

    .s2-grid {
      display: flex;
      flex-direction: row;
      gap: clamp(0.4rem, 0.8vw, 0.8rem);
      width: 100%;
      box-sizing: border-box;
    }

    .prayer-card {
      background: linear-gradient(160deg, rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.01) 100%);
      border: 1px solid rgba(255,255,255,0.07);
      border-top: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      padding: 0.55rem 0.4rem;
      text-align: center;
      transition: all 0.4s ease;
      position: relative; overflow: hidden;
      /* /* backdrop-filter removed for TV perf */ */ /* removed: heavy on TV GPU */
      box-shadow: 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
      flex: 1;
      min-width: 0;
    }

    .prayer-card::before {
      content: ''; position: absolute; inset: 0;
      border-radius: 16px; opacity: 0; transition: opacity 0.4s;
    }

    .prayer-card.is-next {
      background: linear-gradient(160deg, rgba(255,140,0,0.1) 0%, rgba(255,100,30,0.05) 100%);
      border-color: rgba(255,140,0,0.3);
      border-top-color: rgba(255,140,0,0.5);
      box-shadow: 0 0 20px rgba(255,140,0,0.06), 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,140,0,0.15);
    }

    .prayer-card.is-next::before {
      background: radial-gradient(ellipse at center, rgba(255,107,53,0.08) 0%, transparent 70%);
      opacity: 1;
    }

    .prayer-card.is-current {
      background: linear-gradient(160deg, rgba(240,184,48,0.12) 0%, rgba(240,130,0,0.06) 100%);
      border-color: rgba(240,184,48,0.4);
      border-top-color: rgba(240,184,48,0.6);
      animation: pulseGlow 2.5s ease-in-out infinite;
      box-shadow: 0 0 30px rgba(240,184,48,0.08), 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(240,184,48,0.2);
    }

    .prayer-card.is-current::before {
      background: radial-gradient(ellipse at center, rgba(240,165,0,0.1) 0%, transparent 70%);
      opacity: 1;
    }

    .prayer-card.is-past { opacity: 0.4; }

    @keyframes pulseGlow {
      0%, 100% {
        box-shadow: 0 0 20px rgba(240,184,48,0.08), 0 4px 20px rgba(0,0,0,0.2), inset 0 1px 0 rgba(240,184,48,0.2);
      }
      50% {
        box-shadow: 0 0 40px rgba(240,184,48,0.18), 0 6px 30px rgba(0,0,0,0.25), inset 0 1px 0 rgba(240,184,48,0.3);
      }
    }

    .pc-icon { font-size: clamp(1rem, 1.6vw, 1.4rem); margin-bottom: 0.15rem; }

    .pc-name {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.6rem, 0.85vw, 0.78rem);
      font-weight: 600; letter-spacing: 0.15em;
      text-transform: uppercase; color: #7ecfe0;
      margin-bottom: 0.15rem;
    }
    .prayer-card.is-next .pc-name { color: #ff8c00; }
    .prayer-card.is-current .pc-name { color: #f0a500; }

    .pc-time {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(0.95rem, 1.6vw, 1.5rem);
      font-weight: 300; letter-spacing: 0.05em;
      font-variant-numeric: tabular-nums;
      color: rgba(255,255,255,0.92);
    }
    .prayer-card.is-current .pc-time { color: #f0a500; }

    .pc-status {
      font-size: clamp(0.45rem, 0.6vw, 0.55rem);
      letter-spacing: 0.2em; text-transform: uppercase;
      margin-top: 0.15rem; color: #6a7a94;
    }
    .prayer-card.is-next .pc-status { color: #ff8c00; }
    .prayer-card.is-current .pc-status { color: #f0a500; }

    /* ============================================================
       SLIDE 3 — FULL COUNTDOWN
       ============================================================ */
    .s3-label {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.8rem, 1.2vw, 1rem);
      letter-spacing: 0.6em; text-transform: uppercase;
      color: #7ecfe0; margin-bottom: clamp(0.3rem, 0.8vh, 0.7rem);
      opacity: 0.8;
    }

    .s3-prayer {
      font-family: 'Cinzel', serif;
      font-size: clamp(2.5rem, min(5vw, 9vh), 4.2rem);
      font-weight: 700; color: #f0b830;
      letter-spacing: 0.2em; text-transform: uppercase;
      text-shadow: 0 0 50px rgba(240,184,48,0.4), 0 0 100px rgba(240,184,48,0.15);
      margin-bottom: clamp(0.4rem, 1vh, 0.9rem);
    }

    .s3-time-at {
      font-size: clamp(1rem, 1.5vw, 1.3rem);
      color: #7eb8da; letter-spacing: 0.08em;
      font-variant-numeric: tabular-nums;
      margin-bottom: clamp(0.5rem, 1.8vh, 1.6rem);
    }

    .s3-countdown {
      font-size: clamp(4rem, min(9vw, 16vh), 7.5rem);
      font-weight: 200; letter-spacing: 0.08em;
      color: #ffffff; font-variant-numeric: tabular-nums;
      text-shadow: 0 0 60px rgba(240,165,0,0.12);
      line-height: 1;
    }

    .s3-countdown-units {
      display: flex; gap: 2rem; margin-top: 0.5rem;
      justify-content: center;
    }

    .s3-unit {
      font-size: clamp(0.6rem, 0.9vw, 0.75rem);
      letter-spacing: 0.3em; text-transform: uppercase;
      color: #6a7a94;
    }

    /* Ring animation */
    .s3-ring-container {
      position: relative;
      width: clamp(150px, min(26vw, 46vh), 240px);
      height: clamp(150px, min(26vw, 46vh), 240px);
      display: flex; align-items: center; justify-content: center;
      margin-bottom: clamp(0.3rem, 1vh, 1rem);
    }

    .s3-ring {
      position: absolute; inset: 0;
    }

    .s3-ring circle {
      fill: none; stroke-width: 2;
      stroke-linecap: round;
      transform-origin: center;
      transform: rotate(-90deg);
    }

    .s3-ring .track { stroke: rgba(255,255,255,0.04); stroke-width: 1.5; }
    .s3-ring .fill-ring {
      stroke: url(#ringGradient);
      transition: stroke-dashoffset 1s linear;
      filter: drop-shadow(0 0 6px rgba(240,184,48,0.5));
    }

    .s3-inner-time {
      position: relative; text-align: center;
    }

    .s3-inner-h { font-family: 'Poppins', sans-serif; font-size: clamp(3rem, min(6vw, 10.5vh), 5rem); font-weight: 200; font-variant-numeric: tabular-nums; line-height: 1; letter-spacing: 0.04em; }
    .s3-inner-label { font-size: 0.65rem; letter-spacing: 0.3em; color: #6a7a94; text-transform: uppercase; margin-top: 0.3rem; }

    /* ============================================================
       SLIDE 4 — IMAGE GALLERY SLIDESHOW
       ============================================================ */
    .s4-container {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
    }

    .s4-image-wrapper {
      position: absolute;
      inset: 0;
      display: block;
      overflow: hidden;
      opacity: 0;
      transition: opacity 1.5s ease-in-out;
    }

    .s4-image-wrapper.active {
      opacity: 1;
    }

    .s4-image-wrapper img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      border-radius: 0;
      box-shadow: none;
    }

    /* Ken Burns effect */
    @keyframes kenBurns1 {
      0% { transform: scale(1) translate(0, 0); }
      100% { transform: scale(1.08) translate(-1%, -1%); }
    }
    @keyframes kenBurns2 {
      0% { transform: scale(1.05) translate(1%, 0); }
      100% { transform: scale(1) translate(-1%, 1%); }
    }
    @keyframes kenBurns3 {
      0% { transform: scale(1) translate(0, 1%); }
      100% { transform: scale(1.06) translate(1%, -1%); }
    }

    .s4-image-wrapper.kb-1 img { animation: kenBurns1 12s ease-in-out forwards; }
    .s4-image-wrapper.kb-2 img { animation: kenBurns2 12s ease-in-out forwards; }
    .s4-image-wrapper.kb-3 img { animation: kenBurns3 12s ease-in-out forwards; }

    .s4-overlay-info {
      position: absolute;
      bottom: 2rem;
      left: 50%;
      transform: translateX(-50%);
      text-align: center;
      z-index: 5;
    }

    .s4-caption {
      font-size: clamp(0.8rem, 1.2vw, 1.1rem);
      color: rgba(255,255,255,0.7);
      letter-spacing: 0.1em;
      text-shadow: 0 2px 8px rgba(0,0,0,0.8);
      margin-bottom: 0.3rem;
    }

    .s4-counter {
      font-size: clamp(0.6rem, 0.9vw, 0.75rem);
      color: rgba(255,255,255,0.4);
      letter-spacing: 0.2em;
    }

    /* ── Global top-left info panel (visible on all slides) ── */
    #top-left-info {
      position: fixed;
      top: 3.6rem;
      left: 18px;
      z-index: 800;
      text-align: left;
      pointer-events: none;
      background: rgba(30, 30, 30, 0.62);
      /* /* backdrop-filter removed for TV perf */ */ /* removed: heavy on TV GPU */
      border: 1px solid rgba(255,255,255,0.13);
      border-radius: 18px;
      padding: 14px 20px 12px 18px;
    }
    /* Hide global top-left panel on theme slides (they have their own info box) */
    .slide-theme-active #top-left-info { display: none !important; }

    #tl-loc {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.65rem, 1.1vw, 0.9rem);
      color: #7ecfe0;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      text-shadow: 0 0 20px rgba(126,207,224,0.35);
      margin-bottom: 0.1rem;
    }
    #tl-clock {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(1.3rem, 2.4vw, 2rem);
      font-weight: 200;
      color: #ffffff;
      letter-spacing: 0.04em;
      font-variant-numeric: tabular-nums;
      text-shadow: 0 0 30px rgba(240,184,48,0.2), 0 2px 4px rgba(0,0,0,0.5);
      line-height: 1.1;
    }
    #tl-hijri {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.65rem, 1.1vw, 0.9rem);
      color: #f0b830;
      letter-spacing: 0.12em;
      text-shadow: 0 0 16px rgba(240,165,0,0.3);
      margin-top: 0.15rem;
    }
    #tl-greg {
      font-size: clamp(0.6rem, 0.95vw, 0.78rem);
      color: #6a7a94;
      letter-spacing: 0.07em;
      margin-top: 0.05rem;
    }
    #tl-next {
      font-size: clamp(0.6rem, 0.95vw, 0.78rem);
      color: rgba(240,184,48,0.75);
      letter-spacing: 0.08em;
      margin-top: 0.2rem;
    }

    .s4-clock-overlay {
      position: fixed;
      top: 3.6rem;
      left: 18px;
      right: auto;
      z-index: 5;
      text-align: left;
    }

    .s4-clock-time {
      font-size: clamp(1.4rem, 2.5vw, 2rem);
      font-weight: 200;
      color: rgba(255,255,255,0.8);
      font-variant-numeric: tabular-nums;
      text-shadow: 0 2px 12px rgba(0,0,0,0.8);
      letter-spacing: 0.05em;
    }

    .s4-clock-next {
      font-size: clamp(0.6rem, 0.9vw, 0.75rem);
      color: #f0a500;
      letter-spacing: 0.15em;
      text-shadow: 0 2px 8px rgba(0,0,0,0.8);
      margin-top: 0.15rem;
    }

    /* No images placeholder */
    .s4-empty {
      text-align: center;
    }

    .s4-empty-icon {
      font-size: 4rem;
      margin-bottom: 1rem;
      opacity: 0.3;
    }

    .s4-empty-text {
      font-size: 1.1rem;
      color: #6a7a94;
      letter-spacing: 0.1em;
    }

    .s4-empty-hint {
      font-size: 0.8rem;
      color: #4a5a6a;
      margin-top: 0.5rem;
      letter-spacing: 0.05em;
    }

    /* ============================================================
       SLIDE INDICATORS
       ============================================================ */
    .indicators {
      position: fixed; bottom: 16px; left: 50%;
      transform: translateX(-50%);
      display: flex; gap: 8px; z-index: 100;
    }

    .dot {
      width: 5px; height: 5px; border-radius: 50%;
      background: rgba(255,255,255,0.18);
      cursor: pointer; transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
      border: none; outline: none;
    }
    .dot.active { background: #f0b830; width: 24px; border-radius: 3px; box-shadow: 0 0 8px rgba(240,184,48,0.5); }

    /* ============================================================
       SETTINGS BUTTON & PANEL
       ============================================================ */
    .mosque-name-banner {
      position: fixed; top: 14px; left: 18px; z-index: 800;
      color: rgba(255,255,255,0.9);
      font-family: 'Cinzel', serif;
      font-size: clamp(0.8rem, 1.4vw, 1.1rem);
      font-weight: 600;
      letter-spacing: 0.1em;
      text-shadow: 0 2px 12px rgba(0,0,0,0.6), 0 0 20px rgba(240,184,48,0.15);
      text-align: left;
      max-width: 50vw;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      display: none;
      background: rgba(0,0,0,0.2); /* backdrop-filter removed for TV perf */
      padding: 6px 14px;
      border-radius: 20px;
      border: 1px solid rgba(255,255,255,0.08);
    }
    .mosque-name-banner.visible { display: block; }

    .copyright-banner {
      position: fixed; bottom: 10px; left: 16px; z-index: 190;
      color: rgba(255,255,255,0.45);
      font-size: clamp(0.6rem, 1vw, 0.8rem);
      letter-spacing: 0.05em;
      text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    }

    .settings-btn {
      position: fixed; top: 12px; right: 12px; z-index: 99997;
      background: rgba(0,0,0,0.3); /* backdrop-filter removed for TV perf */
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 10px; color: rgba(255,255,255,0.5);
      padding: 7px 14px; cursor: pointer;
      font-size: 0.82rem; transition: all 0.25s;
      font-family: 'Poppins', inherit;
      letter-spacing: 0.05em;
    }
    .settings-btn:hover {
      background: rgba(255,255,255,0.1);
      color: #fff;
      border-color: rgba(255,255,255,0.25);
    }

    .overlay {
      position: fixed; inset: 0; z-index: 99998;
      background: rgba(2,6,18,0.75); /* backdrop-filter removed for TV perf */
      display: flex; align-items: center; justify-content: center;
      opacity: 0; pointer-events: none; transition: opacity 0.35s cubic-bezier(0.4,0,0.2,1);
    }
    .overlay.open { opacity: 1; pointer-events: auto; }

    .settings-box {
      background: linear-gradient(160deg, #0d1e38 0%, #071428 100%);
      border: 1px solid rgba(255,255,255,0.1);
      border-top: 1px solid rgba(255,255,255,0.16);
      border-radius: 22px;
      padding: 2rem;
      width: min(560px, 92vw);
      max-height: 90vh; overflow-y: auto;
      box-shadow: 0 24px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.03);
      position: relative;
    }

    .sb-title {
      font-family: 'Cinzel', serif;
      font-size: 1.1rem; font-weight: 600;
      letter-spacing: 0.2em; margin-bottom: 1.6rem;
      color: #f0b830;
      text-shadow: 0 0 20px rgba(240,184,48,0.2);
    }
    .sb-close-btn {
      position: absolute; top: 1rem; right: 1rem;
      width: 36px; height: 36px;
      background: rgba(255,255,255,0.06);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 50%;
      color: #6a7a94;
      font-size: 1.1rem; line-height: 1;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      transition: background 0.2s, color 0.2s, border-color 0.2s;
    }
    .sb-close-btn:hover {
      background: rgba(220,60,60,0.25);
      border-color: rgba(220,60,60,0.5);
      color: #ff8080;
    }

    .fg { margin-bottom: 1.2rem; }

    .fg label {
      display: block; font-size: 0.7rem;
      letter-spacing: 0.2em; text-transform: uppercase;
      color: #6a7a94; margin-bottom: 0.4rem;
    }

    .fg input, .fg select {
      width: 100%; background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.09);
      border-radius: 10px; color: #fff;
      padding: 11px 15px; font-size: 0.88rem;
      font-family: 'Poppins', inherit; outline: none;
      transition: border-color 0.2s, background 0.2s;
    }
    /* Theme Card Grid */
    .theme-card-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 10px;
      margin-bottom: 4px;
    }
    .theme-card {
      border: 2px solid rgba(255,255,255,0.10);
      border-radius: 12px;
      overflow: hidden;
      cursor: pointer;
      transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
      background: rgba(255,255,255,0.03);
    }
    .theme-card:hover { border-color: rgba(240,184,48,0.45); transform: translateY(-2px); }
    .theme-card.selected {
      border-color: #f0b830;
      box-shadow: 0 0 0 1px #f0b830, 0 4px 16px rgba(240,184,48,0.25);
    }
    .tc-preview {
      height: 54px;
      position: relative;
      overflow: hidden;
    }
    .tc-vbar {
      position: absolute; right: 0; top: 0; bottom: 0; width: 35%;
    }
    .tc-icon {
      position: absolute; inset: 0;
      display: flex; align-items: center; justify-content: center;
      font-size: 1.5rem; opacity: 0.65;
    }
    .tc-check {
      position: absolute; top: 4px; right: 5px;
      font-size: 0.75rem; color: #f0b830;
      display: none;
    }
    .theme-card.selected .tc-check { display: block; }
    .tc-name {
      font-size: 0.67rem; font-weight: 600;
      color: #e0e0e0; padding: 5px 8px 1px;
      letter-spacing: 0.04em;
    }
    .tc-sub {
      font-size: 0.58rem; color: #6a7a94;
      padding: 0 8px 7px; line-height: 1.3;
    }

    .fg input:focus, .fg select:focus {
      border-color: rgba(240,184,48,0.45);
      background: rgba(240,184,48,0.03);
    }
    .fg select option { background: #0c1a32; }

    .fg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

    .sb-actions {
      display: flex; gap: 1rem; justify-content: flex-end;
      margin-top: 1.5rem;
    }

    .btn-cancel {
      background: transparent;
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 8px; color: #6a7a94;
      padding: 10px 22px; cursor: pointer;
      font-size: 0.85rem; font-family: inherit;
    }
    .btn-cancel:hover { border-color: rgba(255,255,255,0.3); color: #aaa; }

    .btn-save {
      background: linear-gradient(135deg, #f0b830 0%, #e09000 100%);
      border: none;
      border-radius: 8px; color: #000;
      padding: 10px 24px; cursor: pointer;
      font-size: 0.85rem; font-weight: 700;
      font-family: inherit;
      box-shadow: 0 4px 15px rgba(240,184,48,0.25);
      transition: all 0.2s;
    }
    .btn-save:hover {
      background: linear-gradient(135deg, #ffcc50 0%, #f0a500 100%);
      box-shadow: 0 6px 20px rgba(240,184,48,0.35);
      transform: translateY(-1px);
    }

    /* Slide duration control */
    .fg-range-row { display: flex; align-items: center; gap: 10px; }
    .fg-range-row input[type=range] {
      flex: 1; accent-color: #f0a500;
      background: transparent; border: none; padding: 0;
    }
    .fg-range-val {
      font-size: 0.85rem; color: #f0a500;
      min-width: 32px; text-align: right;
    }



    .img-preview-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
      gap: 8px;
      margin-top: 1rem;
      max-height: 200px;
      overflow-y: auto;
    }

    .img-thumb {
      position: relative;
      border-radius: 8px;
      overflow: hidden;
      aspect-ratio: 1;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.06);
    }

    .img-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
    }

    .img-thumb-del {
      position: absolute;
      top: 2px; right: 2px;
      width: 20px; height: 20px;
      background: rgba(220,50,50,0.85);
      border: none; border-radius: 50%;
      color: #fff; font-size: 0.7rem;
      cursor: pointer;
      display: flex; align-items: center; justify-content: center;
      opacity: 0; transition: opacity 0.2s;
    }
    .img-thumb:hover .img-thumb-del { opacity: 1; }

    .img-count {
      font-size: 0.75rem;
      color: #6a7a94;
      margin-top: 0.5rem;
      letter-spacing: 0.1em;
    }

    .btn-clear-imgs {
      background: rgba(220,50,50,0.15);
      border: 1px solid rgba(220,50,50,0.3);
      border-radius: 6px;
      color: #e85050;
      padding: 5px 12px;
      cursor: pointer;
      font-size: 0.75rem;
      font-family: inherit;
      margin-top: 0.5rem;
    }
    .btn-clear-imgs:hover { background: rgba(220,50,50,0.25); }

    .fg-separator {
      border: none;
      border-top: 1px solid rgba(255,255,255,0.06);
      margin: 1.5rem 0;
    }

    .fg-section-title {
      font-family: 'Cinzel', serif;
      font-size: 0.72rem;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      color: #f0b830;
      margin-bottom: 1rem;
      font-weight: 600;
      opacity: 0.9;
    }

    /* Image slide duration */
    .fg-checkbox-row {
      display: flex; align-items: center; gap: 10px;
    }
    .fg-checkbox-row input[type=checkbox] {
      accent-color: #f0a500;
      width: 16px; height: 16px;
    }
    .fg-checkbox-row label {
      margin-bottom: 0; font-size: 0.85rem; color: #ccc;
    }

    /* ============================================================
       AZAN ALERT OVERLAY
       ============================================================ */
    .azan-alert {
      position: fixed; inset: 0; z-index: 400;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      background:
        radial-gradient(ellipse at 50% 40%, rgba(60,30,0,0.95) 0%, rgba(5,5,15,0.98) 70%),
        linear-gradient(180deg, #0a0500 0%, #050010 100%);
      opacity: 0; pointer-events: none;
      transition: opacity 0.8s;
    }
    .azan-alert::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at center, rgba(240,140,0,0.06) 0%, transparent 60%);
      animation: azanBgPulse 2s ease-in-out infinite;
    }
    @keyframes azanBgPulse {
      0%, 100% { opacity: 0.5; }
      50% { opacity: 1; }
    }
    .azan-alert.show { opacity: 1; pointer-events: auto; }

    .azan-mosque { font-size: clamp(4rem, 8vw, 6rem); margin-bottom: 1rem; }

    .azan-text {
      font-family: 'Cinzel', serif;
      font-size: clamp(2rem, 4vw, 3.5rem);
      font-weight: 700; color: #f0b830;
      letter-spacing: 0.15em; text-transform: uppercase;
      animation: azanPulse 1.5s ease-in-out infinite;
      position: relative; z-index: 1;
    }

    .azan-prayer-name {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.8rem, 3.5vw, 3rem);
      color: #fff; letter-spacing: 0.25em;
      margin-top: 0.5rem;
      position: relative; z-index: 1;
      text-shadow: 0 0 30px rgba(255,255,255,0.2);
    }

    .azan-time {
      font-size: clamp(1rem, 1.5vw, 1.2rem);
      color: #7eb8da; margin-top: 0.3rem;
      font-variant-numeric: tabular-nums;
    }

    @keyframes azanPulse {
      0%, 100% { opacity: 1; text-shadow: 0 0 30px rgba(240,165,0,0.3); }
      50% { opacity: 0.7; text-shadow: 0 0 60px rgba(240,165,0,0.6); }
    }

    /* ============================================================
       RESPONSIVE
       ============================================================ */
    @media (max-width: 640px) {
      .s2-grid { grid-template-columns: repeat(2, 1fr); }
      .img-preview-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
    }

    @media (max-height: 500px) {
      .s1-clock { font-size: 3rem; margin: 0.2rem 0; }
      .s1-next-name { font-size: 1.4rem; }
    }
    /* Scrollbar styling for settings */
    .settings-box::-webkit-scrollbar { width: 6px; }
    .settings-box::-webkit-scrollbar-track { background: transparent; }
    .settings-box::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
    .img-preview-grid::-webkit-scrollbar { width: 4px; }
    .img-preview-grid::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

    /* ============================================================
       IQAMAH COUNTDOWN OVERLAY
       ============================================================ */
    .iqamah-overlay {
      position: fixed; inset: 0; z-index: 750;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding-bottom: 9.5rem;
      background:
        radial-gradient(ellipse at 50% 40%, rgba(0,25,60,0.97) 0%, rgba(2,6,20,0.99) 70%),
        linear-gradient(180deg, #000a1f 0%, #020810 100%);
      opacity: 0; pointer-events: none;
      transition: opacity 0.8s;
    }
    .iqamah-overlay::before {
      content: ''; position: absolute; inset: 0;
      background: radial-gradient(ellipse at center, rgba(126,207,224,0.06) 0%, transparent 60%);
      animation: iqamahBgPulse 2.5s ease-in-out infinite;
    }
    @keyframes iqamahBgPulse {
      0%, 100% { opacity: 0.4; }
      50% { opacity: 1; }
    }
    .iqamah-overlay.show { opacity: 1; pointer-events: auto; }

    .iqamah-mosque-icon {
      font-size: clamp(1.8rem, 3.5vw, 3rem);
      margin-bottom: 0.25rem;
      position: relative; z-index: 1;
    }

    .iqamah-header-label {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.3rem, 2.6vw, 2.2rem);
      font-weight: 700; color: #f0b830;
      letter-spacing: 0.25em; text-transform: uppercase;
      text-shadow: 0 0 50px rgba(240,184,48,0.45), 0 0 100px rgba(240,184,48,0.15);
      margin-bottom: 0.2rem;
      position: relative; z-index: 1;
    }

    .iqamah-prayer-title {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.3rem, 2.6vw, 2.2rem);
      font-weight: 700; color: #f0b830;
      letter-spacing: 0.25em; text-transform: uppercase;
      text-shadow: 0 0 50px rgba(240,184,48,0.45), 0 0 100px rgba(240,184,48,0.15);
      margin-bottom: 0.8rem;
      position: relative; z-index: 1;
    }

    .iqamah-cd-label {
      font-size: clamp(0.65rem, 0.95vw, 0.82rem);
      color: #6a7a94; letter-spacing: 0.5em;
      text-transform: uppercase; margin-bottom: 0.4rem;
      position: relative; z-index: 1;
    }

    .iqamah-cd {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(5rem, 13vw, 11rem);
      font-weight: 200; color: #ffffff;
      letter-spacing: 0.05em;
      font-variant-numeric: tabular-nums;
      line-height: 1;
      text-shadow: 0 0 80px rgba(126,207,224,0.18);
      position: relative; z-index: 1;
      transition: color 0.5s;
    }

    .iqamah-cd.final {
      color: #f0b830;
      text-shadow: 0 0 80px rgba(240,184,48,0.5);
      animation: iqamahFinalPulse 0.6s ease-in-out infinite;
      font-size: clamp(3rem, 8vw, 7rem);
    }

    @keyframes iqamahFinalPulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.75; transform: scale(1.04); }
    }

    .iqamah-progress-track {
      width: min(420px, 70vw); height: 5px;
      background: rgba(255,255,255,0.06);
      border-radius: 4px; margin-top: 2rem;
      overflow: hidden; position: relative; z-index: 1;
    }
    .iqamah-progress-fill {
      height: 100%; border-radius: 4px;
      background: linear-gradient(90deg, #7ecfe0, #f0b830);
      transition: width 1s linear;
      box-shadow: 0 0 10px rgba(126,207,224,0.4);
      width: 0%;
    }

    .iqamah-note {
      font-size: clamp(0.6rem, 0.85vw, 0.75rem);
      color: #3a4a5a; letter-spacing: 0.3em;
      text-transform: uppercase; margin-top: 1.2rem;
      position: relative; z-index: 1;
    }

    /* === Mini prayer times grid inside iqamah/pre-azan overlays === */
    .overlay-pt-grid {
      display: flex; flex-direction: row;
      gap: clamp(0.4rem, 0.8vw, 0.8rem);
      position: absolute; bottom: 0; left: 0; right: 0;
      z-index: 10;
      padding: 0.6rem 1rem 0.7rem;
      background: linear-gradient(to top, rgba(0,0,0,0.72) 0%, rgba(0,0,0,0.0) 100%);
    }
    body.ticker-on .overlay-pt-grid { bottom: 42px; }
    .overlay-pt-grid .prayer-card {
      flex: 1; min-width: 0;
      padding: 0.55rem 0.4rem;
      border-radius: 12px;
    }
    .overlay-pt-grid .pc-icon  { font-size: clamp(1rem, 1.6vw, 1.4rem); margin-bottom: 0.15rem; }
    .overlay-pt-grid .pc-name  { font-size: clamp(0.6rem, 0.85vw, 0.78rem); }
    .overlay-pt-grid .pc-time  { font-size: clamp(0.95rem, 1.6vw, 1.5rem); letter-spacing: 0.05em; }
    .overlay-pt-grid .pc-status { display: none; }

    /* Beep visual pulse ring around azan mosque icon */
    .azan-beep-ring {
      position: absolute;
      width: 120px; height: 120px;
      border-radius: 50%;
      border: 3px solid rgba(240,184,48,0.6);
      animation: beepRingPulse 1s ease-out forwards;
      pointer-events: none;
    }
    @keyframes beepRingPulse {
      0%   { transform: scale(0.8); opacity: 1; }
      100% { transform: scale(2.5); opacity: 0; }
    }
    .azan-alert { position: relative; }
    #mobile-upload-screen {
      display: none;
      position: fixed; inset: 0; z-index: 99999;
      background: linear-gradient(135deg, #0a1628 0%, #0d2145 50%, #071020 100%);
      overflow-y: auto;
      justify-content: center;
      align-items: flex-start;
      padding: 24px 16px 40px;
    }
    #mobile-upload-screen.active { display: flex; }
    .mu-page {
      width: 100%; max-width: 480px;
      display: flex; flex-direction: column; align-items: center;
      padding-top: 20px;
    }
    .mu-logo { font-size: 3rem; margin-bottom: 8px; }
    .mu-page-title {
      font-family: 'Cinzel', serif;
      font-size: 1.3rem; font-weight: 700;
      color: #f0b830; letter-spacing: 0.05em;
      margin-bottom: 4px; text-align: center;
    }
    .mu-page-sub { font-size: 0.82rem; color: #8899bb; margin-bottom: 24px; text-align: center; }
    .mu-section-label {
      width: 100%; font-size: 0.72rem; color: #6a7a94;
      text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 8px;
    }
    .mu-type-row { width: 100%; display: flex; gap: 8px; margin-bottom: 20px; }
    .mu-type-btn {
      flex: 1; padding: 10px 6px;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(255,255,255,0.1);
      border-radius: 10px; color: #8899bb;
      font-size: 0.78rem; cursor: pointer; transition: all 0.2s;
    }
    .mu-type-btn.active {
      background: rgba(240,184,48,0.15);
      border-color: rgba(240,184,48,0.5); color: #f0b830;
    }
    .mu-pick-area {
      width: 100%; border: 2px dashed rgba(255,255,255,0.15);
      border-radius: 14px; padding: 32px 20px; text-align: center;
      background: rgba(255,255,255,0.03); transition: all 0.2s; margin-bottom: 16px;
    }
    .mu-pick-area label {
      display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
    }
    .mu-pick-icon { font-size: 2.4rem; }
    .mu-pick-text { font-size: 0.9rem; color: #c0cce0; }
    .mu-pick-hint { font-size: 0.72rem; color: #6a7a94; }
    #mu-preview-wrap {
      width: 100%; display: none; border-radius: 12px; overflow: hidden;
      margin-bottom: 16px; background: #000; max-height: 240px;
    }
    #mu-preview-wrap img { width: 100%; max-height: 240px; object-fit: contain; display: block; }
    .mu-send-btn {
      width: 100%; padding: 16px;
      background: linear-gradient(135deg, #f0b830, #e07020);
      border: none; border-radius: 12px;
      color: #fff; font-size: 1rem; font-weight: 600;
      cursor: pointer; margin-bottom: 16px; transition: all 0.2s;
    }
    .mu-send-btn:disabled { opacity: 0.6; cursor: not-allowed; }
    .mu-msg {
      width: 100%; text-align: center; font-size: 0.85rem;
      min-height: 24px; padding: 8px; border-radius: 8px; margin-bottom: 12px;
    }
    .mu-msg.success { background: rgba(0,200,100,0.15); color: #00cc66; }
    .mu-msg.error   { background: rgba(220,50,50,0.15); color: #ff5555; }
    .mu-session-info { font-size: 0.65rem; color: #445566; margin-top: 8px; text-align: center; }
    .mu-conn-dot {
      display: inline-block; width: 8px; height: 8px;
      border-radius: 50%; background: #888; margin-right: 4px; vertical-align: middle;
    }
    .mu-conn-dot.connected { background: #00cc66; }
    .mu-conn-dot.error { background: #ff4444; }
    .mu-settings-url { font-size: 0.68rem; color: #6a7a94; word-break: break-all; text-align: center; }
    .mu-settings-status {
      font-size: 0.72rem; padding: 4px 12px;
      border-radius: 20px; display: inline-block;
    }
    .mu-settings-status.connected { background: rgba(0,200,100,0.15); color: #00cc66; }
    .mu-settings-status.disconnected { background: rgba(200,50,50,0.15); color: #ff6666; }
    .mu-settings-status.waiting { background: rgba(200,200,200,0.1); color: #8899bb; }
    .mu-settings-last {
      font-size: 0.72rem; color: #f0b830;
      padding: 6px 12px; background: rgba(240,184,48,0.1);
      border-radius: 8px; text-align: center; margin-top: 8px;
    }

    /* ══════════════════════════════════════════════════════════
       THEMED PRAYER SLIDES  (slide-2 … slide-6)
       ══════════════════════════════════════════════════════════ */

    /* ── Shared layout helpers ── */
    .th-center-main {
      flex: 1; display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding: 2vh 3vw; position: relative; z-index: 2;
      text-align: center;
    }
    .th-slide-label {
      font-size: clamp(0.5rem,1vmin,.8rem); letter-spacing:.38em;
      text-transform:uppercase; opacity:.6; margin-bottom:1vh;
    }
    .th-big-clock {
      font-family:'Poppins',sans-serif;
      font-size: clamp(2rem, min(5vw, 8vh), 3.8rem); font-weight:200;
      letter-spacing:.06em; line-height:1; margin-bottom:1.5vh;
      font-variant-numeric:tabular-nums;
    }
    .th-next-label-sm {
      font-size: clamp(0.48rem,.72vw,.65rem); letter-spacing:.35em; opacity:.55;
      text-transform:uppercase;
    }
    .th-next-prayer-name {
      font-family:'Cinzel',serif;
      font-size: clamp(.95rem, min(1.9vw, 3.4vh), 1.7rem); font-weight:700;
      letter-spacing:.2em; margin:.4vh 0;
    }
    .th-next-cd {
      font-family:'Poppins',sans-serif;
      font-size: clamp(.85rem, min(1.7vw, 3vh), 1.5rem); font-weight:300;
      letter-spacing:.1em; opacity:.85;
      font-variant-numeric:tabular-nums;
    }
    .th-hijri {
      font-size:clamp(.65rem,1.15vmin,.98rem); letter-spacing:.15em;
      opacity:.80; margin-top:.3rem; margin-bottom:.1rem;
    }
    .th-greg {
      font-size:clamp(.9rem,1.55vmin,1.35rem); letter-spacing:.06em;
      opacity:.90; margin-top:.4rem; margin-bottom:.0rem; color:#c8d8f0;
      font-family:'Poppins',sans-serif; font-weight:500;
    }
    .th-divider {
      width: clamp(60px,10vw,140px); height:1px;
      background: currentColor; opacity:.25; margin:1.5vh auto;
    }

    /* ── Bottom horizontal prayer bar ── */
    .th-hbar {
      position:absolute; bottom:0; left:0; right:0;
      display:flex; flex-direction:row; z-index:10;
    }
    .th-hbar-item {
      flex:1; display:flex; flex-direction:column;
      align-items:center; justify-content:center;
      padding:1.8vh .6vw; gap:.3vh; transition:all .3s ease;
    }
    .th-hbar-icon { font-size:clamp(.9rem,1.6vw,1.4rem); line-height:1; margin-bottom:.1em; }
    .th-vbar-icon { font-size:clamp(.8rem,1.2vw,1.1rem); line-height:1; margin-right:.3em; }
    .th-hbar-status, .th-vbar-status {
      font-size: clamp(.45rem,.75vw,.68rem);
      font-weight: 600;
      letter-spacing: .06em;
      text-transform: uppercase;
      opacity: .75;
      margin-top: .15em;
    }
    .th-status-past   { opacity:.45; color:#aaa; }
    .th-status-next   { color:#fff; opacity:1; font-weight:800; }
    .th-status-upcoming { opacity:.65; }
    .th-hbar-item .th-hbar-status { display:block; margin-top:.1em; }
    .th-vbar-item { flex-direction:column; align-items:flex-start; gap:.1em; }
    .th-vbar-item .th-vbar-status { font-size:clamp(.42rem,.72vw,.65rem); opacity:.7; letter-spacing:.05em; text-transform:uppercase; }
    .th-vbar-item.th-is-next .th-vbar-status { opacity:1; color:#fff; font-weight:700; }
    .th-vbar-item.th-is-past .th-vbar-status { opacity:.4; }
    .th-hbar-name {
      font-size:clamp(.55rem,.9vw,.8rem); letter-spacing:.18em;
      text-transform:uppercase; opacity:.65;
    }
    .th-hbar-time {
      font-size:clamp(.85rem,1.7vw,1.5rem); font-weight:600; letter-spacing:.04em;
      font-variant-numeric:tabular-nums;
    }
    .th-hbar-pip {
      width:5px; height:5px; border-radius:50%; margin-top:.2vh;
      background:currentColor; opacity:0; transition:opacity .3s;
    }
    .th-hbar-item.th-is-next .th-hbar-pip { opacity:1; }

    /* ── Right vertical prayer panel ── */
    .th-vbar {
      position:absolute; top:0; right:0; bottom:0;
      width:clamp(200px,26vw,340px);
      display:flex; flex-direction:column;
      justify-content:center;
      padding:2vh 2vw; gap:.8vh; z-index:10;
    }
    .th-vbar-item {
      display:flex; align-items:center; justify-content:space-between;
      padding:1.2vh 1.6vw; border-radius:10px; transition:all .3s ease;
    }
    .th-vbar-name {
      font-size:clamp(.55rem,1vw,.88rem); letter-spacing:.18em;
      text-transform:uppercase; opacity:.7;
    }
    .th-vbar-time {
      font-size:clamp(.75rem,1.5vw,1.3rem); font-weight:600;
      letter-spacing:.03em; font-variant-numeric:tabular-nums;
    }

    /* ══════════════════════════════════════════
       THEME 1 — ZAMRUD MASJID (Emerald / Bottom)
       ══════════════════════════════════════════ */
    #slide-2 {
      background: radial-gradient(ellipse 120% 120% at 50% 30%,
        #1b5c2e 0%, #0d3318 40%, #061209 100%);
      color: #f0e8c8; overflow:hidden;
    }
    #slide-2::before {
      content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
      background-image:
        repeating-linear-gradient(60deg, transparent, transparent 28px,
          rgba(212,175,55,.04) 28px, rgba(212,175,55,.04) 29px),
        repeating-linear-gradient(-60deg, transparent, transparent 28px,
          rgba(212,175,55,.04) 28px, rgba(212,175,55,.04) 29px),
        repeating-linear-gradient(0deg, transparent, transparent 28px,
          rgba(212,175,55,.025) 28px, rgba(212,175,55,.025) 29px);
    }
    #slide-2::after {
      content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
      background: radial-gradient(ellipse 60% 50% at 50% 50%,
        rgba(212,175,55,.06) 0%, transparent 70%);
    }
    .th2-accent { color: #d4af37; }
    .th2-hbar {
      background: linear-gradient(to top,
        rgba(6,18,9,.95) 0%, rgba(6,18,9,.75) 55%, transparent 100%);
      padding: 0 0 .4vh;
    }
    .th2-hbar .th-hbar-item { border-top: 1px solid rgba(212,175,55,.08); }
    .th2-hbar .th-hbar-item.th-is-next {
      background: rgba(212,175,55,.12);
      border-top: 2px solid rgba(212,175,55,.55);
    }
    .th2-hbar .th-hbar-item.th-is-next .th-hbar-time { color:#d4af37; }
    .th2-hbar .th-hbar-item.th-is-past { opacity:.5; }
    .th2-ornament {
      font-size: clamp(1.2rem,2.8vmin,2.4rem); opacity:.35;
      letter-spacing:.6em; margin-bottom:.8vh; color:#d4af37;
    }

    /* ══════════════════════════════════════════
       THEME 2 — LANGIT MALAM (Night Sky / Right)
       ══════════════════════════════════════════ */
    #slide-3 {
      background: linear-gradient(135deg,
        #020b18 0%, #061428 40%, #0d1f3c 70%, #0a1225 100%);
      color: #e8dfc0; overflow:hidden;
    }
    #slide-3::before {
      content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
      background-image: radial-gradient(1.5px 1.5px at 10% 20%, rgba(255,255,255,.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 60%, rgba(255,255,255,.45) 0%, transparent 100%),
        radial-gradient(2px 2px at 40% 15%, rgba(255,255,255,.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 40%, rgba(255,255,255,.35) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 70% 10%, rgba(255,255,255,.55) 0%, transparent 100%),
        radial-gradient(1px 1px at 15% 80%, rgba(255,255,255,.3) 0%, transparent 100%),
        radial-gradient(2px 2px at 85% 65%, rgba(255,255,255,.45) 0%, transparent 100%),
        radial-gradient(1px 1px at 60% 75%, rgba(255,255,255,.4) 0%, transparent 100%),
        radial-gradient(1.5px 1.5px at 35% 85%, rgba(255,255,255,.35) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 30%, rgba(255,255,255,.5) 0%, transparent 100%);
    }
    .th3-left {
      flex:1; display:flex; flex-direction:column;
      align-items:center; justify-content:center;
      position:relative; z-index:2; padding:2vh 3vw 2vh 4vw;
    }
    .th3-crescent {
      font-size:clamp(2.5rem,6vmin,5.5rem); margin-bottom:1.5vh;
      filter: drop-shadow(0 0 12px rgba(245,216,122,.4));
    }
    .th3-vbar {
      background: linear-gradient(to right,
        rgba(255,255,255,.02) 0%, rgba(255,255,255,.05) 100%);
      border-left: 1px solid rgba(245,216,122,.15);
    }
    .th3-vbar .th-vbar-item {
      background: rgba(255,255,255,.03);
      border: 1px solid rgba(245,216,122,.06);
      border-radius: 6px;
    }
    .th3-vbar .th-vbar-item.th-is-next {
      background: rgba(245,216,122,.1);
      border-color: rgba(245,216,122,.4);
    }
    .th3-vbar .th-vbar-item.th-is-next .th-vbar-time { color:#f5d87a; }
    .th3-vbar .th-vbar-item.th-is-past { opacity:.4; }
    .th3-accent { color:#f5d87a; }

    /* ══════════════════════════════════════════
       THEME 3 — SENJA GURUN (Desert Dusk / Bottom)
       ══════════════════════════════════════════ */
    #slide-4 {
      background: radial-gradient(ellipse 130% 110% at 50% 20%,
        #6b2f00 0%, #3d1400 40%, #1a0700 100%);
      color: #fde8c8; overflow:hidden;
    }
    #slide-4::before {
      content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
      background:
        radial-gradient(ellipse 80% 40% at 50% -5%,
          rgba(255,120,30,.2) 0%, transparent 60%),
        radial-gradient(ellipse 50% 20% at 50% 102%,
          rgba(0,0,0,.8) 0%, transparent 100%);
    }
    /* desert dune silhouette at bottom */
    #slide-4::after {
      content:''; position:absolute; bottom:0; left:0; right:0; height:30%;
      z-index:1; pointer-events:none;
      background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 100%);
      clip-path: polygon(0% 100%, 0% 60%, 15% 40%, 30% 55%, 45% 30%, 60% 50%, 75% 35%, 90% 52%, 100% 40%, 100% 100%);
    }
    .th4-accent { color:#ffb347; }
    .th4-hbar {
      background: linear-gradient(to top,
        rgba(10,4,0,.95) 0%, rgba(10,4,0,.7) 50%, transparent 100%);
      padding: 0 0 .3vh;
    }
    .th4-hbar .th-hbar-item { border-top: 1px solid rgba(255,150,50,.1); }
    .th4-hbar .th-hbar-item.th-is-next {
      background: rgba(255,150,50,.14);
      border-top: 2px solid rgba(255,150,50,.55);
    }
    .th4-hbar .th-hbar-item.th-is-next .th-hbar-time { color:#ffb347; }
    .th4-hbar .th-hbar-item.th-is-past { opacity:.45; }

    /* ══════════════════════════════════════════
       THEME 4 — MAHKOTA MERAH (Royal Crimson / Right)
       ══════════════════════════════════════════ */
    #slide-5 {
      background: radial-gradient(ellipse 130% 130% at 30% 50%,
        #4a0028 0%, #1e0010 50%, #0d0007 100%);
      color: #f5dde8; overflow:hidden;
    }
    #slide-5::before {
      content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
      background:
        radial-gradient(ellipse 50% 80% at 0% 50%,
          rgba(180,30,90,.12) 0%, transparent 60%),
        repeating-linear-gradient(90deg, transparent, transparent 40px,
          rgba(232,180,200,.02) 40px, rgba(232,180,200,.02) 41px),
        repeating-linear-gradient(0deg, transparent, transparent 40px,
          rgba(232,180,200,.02) 40px, rgba(232,180,200,.02) 41px);
    }
    .th5-left {
      flex:1; display:flex; flex-direction:column;
      align-items:center; justify-content:center;
      position:relative; z-index:2; padding:2vh 2vw 2vh 5vw;
    }
    .th5-vbar {
      border-left: 1px solid rgba(232,180,200,.15);
      background: linear-gradient(to right,
        rgba(232,180,200,.03) 0%, rgba(100,0,50,.1) 100%);
    }
    .th5-vbar .th-vbar-item {
      background: rgba(232,180,200,.04);
      border: 1px solid rgba(232,180,200,.07);
    }
    .th5-vbar .th-vbar-item.th-is-next {
      background: rgba(232,100,150,.12);
      border-color: rgba(232,150,180,.4);
    }
    .th5-vbar .th-vbar-item.th-is-next .th-vbar-time { color:#e8b4c8; }
    .th5-vbar .th-vbar-item.th-is-past { opacity:.38; }
    .th5-accent { color:#e8b4c8; }
    .th5-gem { font-size:clamp(2.2rem,5vmin,4.5rem); margin-bottom:1vh; }

    /* ══════════════════════════════════════════
       THEME 5 — LAUTAN TENANG (Ocean / Bottom)
       ══════════════════════════════════════════ */
    #slide-6 {
      background: radial-gradient(ellipse 120% 120% at 50% 40%,
        #004466 0%, #001e36 45%, #000d1a 100%);
      color: #d0f0f8; overflow:hidden;
    }
    #slide-6::before {
      content:''; position:absolute; inset:0; z-index:1; pointer-events:none;
      background:
        radial-gradient(ellipse 100% 30% at 50% 105%,
          rgba(0,180,200,.18) 0%, transparent 60%),
        repeating-linear-gradient(0deg, transparent, transparent 60px,
          rgba(0,212,200,.025) 60px, rgba(0,212,200,.025) 61px);
    }
    /* wave at bottom */
    #slide-6::after {
      content:''; position:absolute; bottom:0; left:-10%; right:-10%; height:28%;
      z-index:1; pointer-events:none;
      background: rgba(0,60,90,.5);
      border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    }
    .th6-accent { color:#00d4c8; }
    .th6-hbar {
      background: rgba(0,20,35,.8);
      border-top: 1px solid rgba(0,212,200,.2); /* backdrop-filter removed for TV perf */
      -webkit- /* backdrop-filter removed for TV perf */
    }
    .th6-hbar .th-hbar-item { border-right:1px solid rgba(0,212,200,.08); }
    .th6-hbar .th-hbar-item:last-child { border-right:none; }
    .th6-hbar .th-hbar-item.th-is-next {
      background: rgba(0,212,200,.12);
      border-top: 2px solid rgba(0,212,200,.6);
    }
    .th6-hbar .th-hbar-item.th-is-next .th-hbar-time { color:#00d4c8; }
    .th6-hbar .th-hbar-item.th-is-past { opacity:.45; }
  
    /* ══════════════════════════════════════════
       TICKER BAR
       ══════════════════════════════════════════ */
    #ticker-bar {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 760;
      height: 42px; display: none; align-items: center; overflow: hidden;
      background: rgba(0,0,0,0.86); /* backdrop-filter removed for TV perf */
      border-top: 1px solid rgba(255,215,0,0.28);
    }
    #ticker-wrap { flex: 1; overflow: hidden; position: relative; height: 100%; display: flex; align-items: center; }
    #ticker-inner {
      display: inline-block; white-space: nowrap;
      color: #ffe066;
      font-family: 'Poppins', sans-serif;
      font-size: clamp(1rem, 2vw, 1.3rem);
      font-weight: 700;
      letter-spacing: 0.05em;
      will-change: transform;
      animation: ticker-move 30s linear infinite;
    }
    @keyframes ticker-move {
      from { transform: translateX(100vw); }
      to   { transform: translateX(-100%); }
    }
    /* When ticker is on — push content up across all slides */
    body.ticker-on .slide          { padding-bottom: 42px; }
    body.ticker-on #prayer-bar       { bottom: 42px; }
    body.ticker-on .th-hbar        { bottom: 42px !important; }
    body.ticker-on .th-vbar        { bottom: 42px !important; }
    /* Ticker adjustments for in-flow bars on themed slides */
    body.ticker-on #slide-2 .th-hbar,
    body.ticker-on #slide-4 .th-hbar,
    body.ticker-on #slide-6 .th-hbar { margin-bottom: 42px !important; bottom: auto !important; }
    body.ticker-on #slide-3 .th-vbar,
    body.ticker-on #slide-5 .th-vbar { padding-bottom: 42px !important; bottom: auto !important; }
    body.ticker-on #settings-panel { padding-bottom: 60px; }

  
    /* ============================================================
       5-MIN PRE-PRAYER COUNTDOWN OVERLAY
       ============================================================ */
    .cd5m-overlay {
      position: fixed; inset: 0; z-index: 700;
      background: radial-gradient(ellipse at 50% 40%, #0a1a30 0%, #020810 70%);
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      padding-bottom: 9.5rem;
      opacity: 0; pointer-events: none;
      transition: opacity 1s ease;
    }
    .cd5m-overlay.show { opacity: 1; pointer-events: auto; }
    .cd5m-top-label {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.7rem, 1.2vw, 1rem);
      letter-spacing: 0.4em; text-transform: uppercase;
      color: rgba(255,200,80,0.75); margin-bottom: 0.5rem;
      animation: cd5mPulse 2s ease-in-out infinite;
    }
    @keyframes cd5mPulse { 0%,100%{opacity:.6;} 50%{opacity:1;} }
    .cd5m-prayer-name {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.3rem, 2.8vw, 2.5rem); font-weight: 700;
      color: #fff; letter-spacing: 0.2em;
      text-shadow: 0 0 40px rgba(255,200,80,0.4);
      margin-bottom: 0.8rem;
    }
    .cd5m-time {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(4.5rem, 14vmin, 11rem); font-weight: 700;
      color: #ffd700; letter-spacing: 0.06em;
      font-variant-numeric: tabular-nums;
      text-shadow: 0 0 60px rgba(255,200,80,0.5), 0 0 120px rgba(255,200,80,0.2);
      line-height: 1;
      margin-bottom: 0.2rem;
    }
    .cd5m-lagi { font-size: clamp(0.8rem, 2vmin, 1.4rem); letter-spacing: 0.4em; opacity: 0.6; margin-top: 0.3rem; color: #fff; }
    .cd5m-at-time {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(0.8rem, 1.5vw, 1.2rem); font-weight: 300;
      color: rgba(255,200,80,0.85); letter-spacing: 0.1em;
    }

    /* ============================================================
       BLACK SCREEN DURING PRAYER
       ============================================================ */
    .black-screen {
      position: fixed; inset: 0; z-index: 800;
      background: #000;
      display: none; align-items: flex-end; justify-content: flex-end;
    }
    .black-screen.show { display: flex; }
    .bs-clock-wrap {
      position: fixed; bottom: 24px; right: 32px;
      display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
    }
    .bs-clock {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(1.2rem, 2.5vw, 2rem); font-weight: 200;
      color: rgba(255,255,255,0.35);
      font-variant-numeric: tabular-nums; letter-spacing: 0.05em;
    }
    .bs-prayer-label {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.55rem, 1vw, 0.75rem); letter-spacing: 0.3em;
      color: rgba(255,255,255,0.18); text-transform: uppercase;
    }

    /* ============================================================
       IQAMAH RING (replaces progress bar)
       ============================================================ */
    .iq-cd-time {
      font-family: 'Poppins', sans-serif;
      font-size: clamp(4.5rem, 14vmin, 11rem); font-weight: 700;
      color: #ffd700; letter-spacing: 0.04em;
      font-variant-numeric: tabular-nums;
      line-height: 1;
      text-shadow: 0 0 40px rgba(255,215,0,0.5), 0 4px 20px rgba(0,0,0,0.5);
      margin: 0.5rem 0 0.2rem;
    }
    .iq-cd-time.final {
      color: #ff6b35;
      animation: iqFinalPulse 0.6s ease-in-out infinite;
    }
    @keyframes iqFinalPulse { 0%,100%{transform:scale(1);} 50%{transform:scale(1.05);} }
    .iq-lagi { font-size: clamp(0.9rem, 2.5vmin, 1.6rem); letter-spacing: 0.5em; opacity: 0.6; margin-top: 0; }

    /* ============================================================
       HIGHLIGHT CURRENT PRAYER
       ============================================================ */
    .th-hbar-item.th-is-current {
      background: rgba(255,200,80,0.15) !important;
      border-top: 2px solid rgba(255,200,80,0.6) !important;
    }
    .th-hbar-item.th-is-current .th-hbar-time {
      color: #ffd700 !important; font-weight: 600;
    }
    .th-hbar-item.th-is-current .th-hbar-name { color: #ffe88a !important; font-weight: 600; }
    .th-vbar-item.th-is-current {
      background: rgba(255,200,80,0.12) !important;
      border-left: 3px solid rgba(255,200,80,0.7) !important;
    }
    .th-vbar-item.th-is-current .th-vbar-time { color: #ffd700 !important; font-weight: 600; }
    .th-vbar-item.th-is-current .th-vbar-name { color: #ffe88a !important; font-weight: 600; }

    /* ══════════════════════════════════════════════════════════
       Mosque label — atas kiri untuk semua 5 tema baru
       ══════════════════════════════════════════════════════════ */
    .th-mosque-lbl {
      position: absolute;
      top: 18px; left: 24px;
      font-size: clamp(0.7rem, 1.4vw, 1.1rem);
      font-weight: 700;
      letter-spacing: 0.12em;
      opacity: 0.85;
      z-index: 10;
      text-shadow: 0 1px 4px rgba(0,0,0,0.6);
      pointer-events: none;
      max-width: 55%;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    #slide-2 .th-mosque-lbl { color: #a8ffcc; }
    #slide-3 .th-mosque-lbl { color: #c8e8ff; }
    #slide-4 .th-mosque-lbl { color: #ffe0a0; }
    #slide-5 .th-mosque-lbl { color: #ffb8b8; }
    #slide-6 .th-mosque-lbl { color: #a0e8ff; }

    /* ══════════════════════════════════════════════════════════
       TEMA 2, 4, 6 — Kandungan di tengah atas bar bawah
       th-hbar dijadikan in-flow (bukan absolute) supaya
       th-center-main mendapat ruang sebenar di atasnya
       ══════════════════════════════════════════════════════════ */
    #slide-2 .th-hbar, #slide-4 .th-hbar, #slide-6 .th-hbar {
      position: relative !important;
      left: auto !important; right: auto !important; bottom: auto !important;
      width: 100%; align-self: stretch; flex-shrink: 0;
    }
    /* Slide 2,4,6 — buang padding bawah supaya bar cium tepi bawah */
    #slide-2, #slide-4, #slide-6 { padding-bottom: 0 !important; }

    /* ══════════════════════════════════════════════════════════
       TEMA 3, 5 — Row layout: kandungan kiri, bar solat kanan
       ══════════════════════════════════════════════════════════ */
    #slide-3, #slide-5 {
      flex-direction: row !important;
      align-items: stretch !important;
      justify-content: flex-start !important;
      padding: 0 !important;
    }
    #slide-3 .th3-left, #slide-5 .th5-left {
      flex: 1 !important;
      padding: 5vh 4vw !important;
      display: flex !important; flex-direction: column !important;
      align-items: center !important; justify-content: center !important;
    }
    #slide-3 .th-vbar, #slide-5 .th-vbar {
      position: relative !important;
      top: auto !important; right: auto !important; bottom: auto !important;
      height: auto !important; flex-shrink: 0;
    }
    .prayer-card.is-current {
      border: 1px solid rgba(255,200,80,0.5) !important;
      background: rgba(255,200,80,0.12) !important;
    }
    .prayer-card.is-current .pc-time { color: #ffd700 !important; }
    .th-status-current { color: #ffd700 !important; font-weight: 700; font-size: 0.65em; letter-spacing: 0.1em; }

    /* ============================================================
       AUTO NIGHT MODE (selepas Isyak hingga Subuh)
       ============================================================ */
    body.night-mode::after {
      content: '';
      position: fixed; inset: 0; z-index: 5;
      background: rgba(10,5,0,0.22);
      pointer-events: none;
    }
    body.night-mode .slide { filter: brightness(0.85) sepia(0.08); }
    body.night-mode #prayer-bar { filter: brightness(0.85); }
    body.night-mode #top-left-info { filter: brightness(0.85); }

  
    /* ============================================================
       JUMAAT MODE OVERLAY
       ============================================================ */
    #jumaat-overlay {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 850;
      background:
        radial-gradient(ellipse at 50% 0%, rgba(10,60,10,0.95) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 90%, rgba(5,30,10,0.85) 0%, transparent 50%),
        linear-gradient(180deg, #020e04 0%, #051808 50%, #020c04 100%);
      align-items: center;
      justify-content: center;
      flex-direction: column;
      overflow: hidden;
    }
    #jumaat-overlay.show { display: flex; }
    #jumaat-overlay::before {
      content: '';
      position: absolute;
      inset: 0;
      background: radial-gradient(ellipse at 50% 40%, rgba(50,160,50,0.10) 0%, transparent 65%);
      pointer-events: none;
      animation: jmPulse 4s ease-in-out infinite;
    }
    @keyframes jmPulse { 0%,100%{opacity:0.5;} 50%{opacity:1;} }
    @keyframes jmFloat { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-8px);} }
    @keyframes jmGlow  { 0%,100%{text-shadow:0 0 40px rgba(80,200,80,0.35);} 50%{text-shadow:0 0 80px rgba(80,220,80,0.7), 0 0 20px rgba(50,180,50,0.4);} }
    .jm-arabik {
      font-size: clamp(1.8rem, 4vw, 3.5rem);
      color: #a0d8a0;
      letter-spacing: 0.12em;
      margin-bottom: 0.25em;
      direction: rtl;
      animation: jmGlow 3s ease-in-out infinite;
    }
    .jm-title {
      font-size: clamp(3rem, 8vw, 7rem);
      font-weight: 900;
      color: #c8f0c8;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      text-shadow: 0 0 60px rgba(80,200,80,0.5), 0 0 20px rgba(40,160,40,0.3);
      margin-bottom: 0.15em;
      animation: jmFloat 4s ease-in-out infinite;
    }
    .jm-subheading {
      font-size: clamp(0.8rem, 1.8vw, 1.2rem);
      color: rgba(160,220,160,0.75);
      letter-spacing: 0.2em;
      margin-bottom: 0.4em;
    }
    .jm-mosque {
      font-size: clamp(1rem, 2.2vw, 1.6rem);
      color: #d0ecd0;
      font-weight: 600;
      letter-spacing: 0.12em;
      margin-bottom: 1.8em;
    }
    .jm-card {
      display: flex;
      flex-direction: column;
      align-items: center;
      background: rgba(255,255,255,0.05);
      border: 1px solid rgba(100,200,100,0.2);
      border-radius: 20px;
      padding: 1.2em 3em;
      margin-bottom: 1.8em; /* backdrop-filter removed for TV perf */
    }
    .jm-prayer-label {
      font-size: clamp(0.7rem, 1.3vw, 0.9rem);
      color: rgba(140,210,140,0.7);
      letter-spacing: 0.25em;
      text-transform: uppercase;
      margin-bottom: 0.2em;
    }
    .jm-prayer-time {
      font-size: clamp(2.5rem, 6vw, 5rem);
      font-weight: 700;
      color: #7ee87e;
      letter-spacing: 0.08em;
      line-height: 1;
    }
    .jm-cd-row {
      display: flex;
      align-items: center;
      gap: 0.8em;
      margin-top: 0.6em;
    }
    .jm-cd-label { font-size:0.85rem; color:rgba(140,210,140,0.65); letter-spacing:0.1em; }
    .jm-cd-time {
      font-size: clamp(1.6rem, 3.5vw, 2.8rem);
      font-weight: 600;
      color: #a8f0a8;
      letter-spacing: 0.05em;
    }
    .jm-dua {
      font-size: clamp(1rem, 2vw, 1.7rem);
      color: rgba(160,220,160,0.55);
      direction: rtl;
      letter-spacing: 0.06em;
    }
    .jm-particles {
      position: absolute;
      inset: 0;
      pointer-events: none;
      overflow: hidden;
    }
    .jm-particle {
      position: absolute;
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: rgba(80,200,80,0.6);
      animation: jmParticleFloat linear infinite;
    }
    @keyframes jmParticleFloat {
      0%   { transform: translateY(100vh) scale(0);   opacity: 0; }
      10%  { opacity: 0.8; transform: translateY(90vh) scale(1); }
      90%  { opacity: 0.6; }
      100% { transform: translateY(-10vh) scale(0.5); opacity: 0; }
    }



    /* ============================================================
       DISPLAY SCHEDULE SETTINGS UI
       ============================================================ */
    .sched-row {
      display: grid;
      grid-template-columns: 1fr 1fr auto;
      gap: 8px;
      align-items: end;
      background: rgba(255,255,255,0.03);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 10px;
      padding: 8px 10px;
      margin-bottom: 8px;
    }
    .sched-time-input {
      padding: 6px 8px;
      background: rgba(255,255,255,0.07);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 6px;
      color: #e0e8ff;
      font-size: 0.85rem;
      width: 100%;
      box-sizing: border-box;
    }
    .sched-del-btn {
      background: rgba(220,50,50,0.3);
      color: #ff8080;
      border: 1px solid rgba(220,50,50,0.4);
      border-radius: 6px;
      padding: 6px 10px;
      cursor: pointer;
      font-size: 0.85rem;
      align-self: end;
    }
    .sched-del-btn:hover { background: rgba(220,60,60,0.9); }
    .sched-cb-wrap {
      display: flex;
      align-items: center;
      gap: 4px;
      font-size: 0.78rem;
      color: #aab;
      cursor: pointer;
    }
    .sched-cb-wrap input { accent-color: #ffd700; cursor: pointer; }
    #btn-add-sched {
      background: rgba(40,100,200,0.5);
      color: #a8c8ff;
      border: 1px solid rgba(60,130,220,0.3);
      border-radius: 8px;
      padding: 7px 16px;
      cursor: pointer;
      font-size: 0.85rem;
      margin-top: 6px;
      width: 100%;
    }
    #btn-add-sched:hover { background: rgba(60,120,220,0.7); }
    #btn-add-event {
      background: rgba(0,100,50,0.35);
      color: #5dcc9a;
      border: 1px solid rgba(0,180,80,0.3);
      border-radius: 8px;
      padding: 7px 16px;
      cursor: pointer;
      font-size: 0.85rem;
      margin-top: 6px;
      width: 100%;
    }
    #btn-add-event:hover { background: rgba(0,120,60,0.55); }


    /* ============================================================
       ISLAMIC EVENTS COUNTDOWN SLIDE
       ============================================================ */
    #slide-ev {
      background: transparent;
      overflow: hidden;
    }
    #slide-ev::before {
      content: '';
      position: absolute; inset: 0;
      background: radial-gradient(ellipse at 50% 30%, rgba(0,120,60,0.18) 0%, transparent 60%),
                  radial-gradient(ellipse at 80% 80%, rgba(0,80,160,0.15) 0%, transparent 50%);
      pointer-events: none; z-index: 0;
    }
    .ev-header {
      font-family: 'Cinzel', serif;
      font-size: clamp(0.7rem, 1vw, 0.9rem);
      letter-spacing: 0.5em; text-transform: uppercase;
      color: #5dcc9a; margin-bottom: 0.5rem;
      position: relative; z-index: 1;
    }
    .ev-crescent {
      font-size: clamp(2.5rem, 4vw, 3.5rem);
      margin-bottom: 0.3rem;
      position: relative; z-index: 1;
      filter: drop-shadow(0 0 20px rgba(93,204,154,0.5));
      animation: evCrescentPulse 3s ease-in-out infinite;
    }
    @keyframes evCrescentPulse {
      0%,100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(93,204,154,0.4)); }
      50% { transform: scale(1.05); filter: drop-shadow(0 0 35px rgba(93,204,154,0.8)); }
    }
    .ev-nearest-name {
      font-family: 'Cinzel', serif;
      font-size: clamp(1.6rem, 3vw, 2.8rem);
      font-weight: 700; color: #ffd700;
      letter-spacing: 0.1em; text-align: center;
      text-shadow: 0 0 40px rgba(255,215,0,0.4);
      margin-bottom: 0.2rem;
      position: relative; z-index: 1;
    }
    .ev-nearest-date {
      font-size: clamp(0.75rem, 1.1vw, 0.95rem);
      color: rgba(255,255,255,0.55);
      letter-spacing: 0.2em;
      margin-bottom: 1.2rem;
      position: relative; z-index: 1;
    }
    .ev-countdown-wrap {
      display: flex; align-items: baseline; gap: 0.4rem;
      margin-bottom: 1.8rem;
      position: relative; z-index: 1;
    }
    .ev-count-num {
      font-family: 'Cinzel', serif;
      font-size: clamp(5rem, 10vw, 9rem);
      font-weight: 900; line-height: 1;
      color: #5dcc9a;
      text-shadow: 0 0 60px rgba(93,204,154,0.5), 0 0 120px rgba(93,204,154,0.2);
    }
    .ev-count-label {
      font-size: clamp(1rem, 1.8vw, 1.6rem);
      color: rgba(255,255,255,0.6);
      font-weight: 300; letter-spacing: 0.1em;
    }
    .ev-divider {
      width: min(420px, 70%);
      height: 1px;
      background: linear-gradient(to right, transparent, rgba(93,204,154,0.4), transparent);
      margin-bottom: 1.2rem;
      position: relative; z-index: 1;
    }
    .ev-list {
      display: flex; flex-direction: column; gap: 0.45rem;
      width: min(520px, 80%);
      position: relative; z-index: 1;
    }
    .ev-list-row {
      display: flex; align-items: center; justify-content: space-between;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.07);
      border-radius: 10px;
      padding: 0.5rem 1rem;
    }
    .ev-list-name {
      font-size: clamp(0.72rem, 1.1vw, 0.92rem);
      color: rgba(255,255,255,0.75);
      font-weight: 500;
    }
    .ev-list-days {
      font-size: clamp(0.72rem, 1.05vw, 0.88rem);
      color: #5dcc9a; font-weight: 700;
      white-space: nowrap;
    }
    .ev-list-date {
      font-size: clamp(0.6rem, 0.85vw, 0.75rem);
      color: rgba(255,255,255,0.35);
      margin-left: 0.5rem;
    }
    .ev-empty {
      font-size: clamp(0.9rem, 1.4vw, 1.2rem);
      color: rgba(255,255,255,0.4);
      text-align: center; margin-top: 2rem;
    }


    /* ══════════════════════════════════════════════════════════════
       TH-ANIM-LAYER — lapisan animasi zarah 5 tema
       Mesti position:absolute supaya TIDAK ganggu flex layout
       ══════════════════════════════════════════════════════════════ */
    .th-anim-layer {
      position: absolute;
      inset: 0;
      overflow: hidden;
      pointer-events: none;
      z-index: 1;
    }

    /* ── Tema 1 (slide-2): Taman Zamrud — zarah emas berkelip & naik ── */
    .th2-spark {
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle, #ffd700 0%, #d4af37 60%, transparent 100%);
      opacity: 0;
      animation: th2-sparkAnim var(--dur, 8s) var(--delay, 0s) infinite ease-in-out;
    }
    @keyframes th2-sparkAnim {
      0%   { opacity: 0; transform: translateY(0) scale(0.6); }
      20%  { opacity: 0.85; transform: translateY(-12px) scale(1); }
      60%  { opacity: 0.5; transform: translateY(-32px) scale(0.8); }
      100% { opacity: 0; transform: translateY(-60px) scale(0.4); }
    }

    /* ── Tema 2 (slide-3): Langit Malam — bintang berkelip ── */
    .th3-star {
      position: absolute;
      border-radius: 50%;
      background: #ffffff;
      box-shadow: 0 0 3px 1px rgba(255,255,255,0.6);
      opacity: 0;
      animation: th3-starAnim var(--dur, 3s) var(--delay, 0s) infinite ease-in-out;
    }
    @keyframes th3-starAnim {
      0%,100% { opacity: 0.1; transform: scale(0.7); }
      50%     { opacity: 1;   transform: scale(1.2); }
    }
    .th3-shoot {
      position: absolute;
      height: 2px;
      background: linear-gradient(to right, transparent, #ffffff, rgba(255,255,255,0.3));
      border-radius: 2px;
      opacity: 0;
      animation: th3-shootAnim var(--dur, 7s) var(--delay, 0s) infinite linear;
    }
    @keyframes th3-shootAnim {
      0%   { opacity: 0; transform: translateX(-60px) translateY(0) rotate(-30deg); }
      5%   { opacity: 0.9; }
      20%  { opacity: 0; transform: translateX(120px) translateY(60px) rotate(-30deg); }
      100% { opacity: 0; transform: translateX(120px) translateY(60px) rotate(-30deg); }
    }

    /* ── Tema 3 (slide-4): Senja Gurun — habuk emas melayang ── */
    .th4-dust {
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(255,183,77,0.9) 0%, rgba(255,140,0,0.4) 100%);
      opacity: 0;
      animation: th4-dustAnim var(--dur, 10s) var(--delay, 0s) infinite ease-in-out;
    }
    @keyframes th4-dustAnim {
      0%   { opacity: 0; transform: translateY(0) translateX(0); }
      25%  { opacity: 0.7; transform: translateY(-18px) translateX(8px); }
      75%  { opacity: 0.3; transform: translateY(-45px) translateX(-6px); }
      100% { opacity: 0; transform: translateY(-70px) translateX(4px); }
    }

    /* ── Tema 4 (slide-5): Mahkota Merah — bara api melayang ── */
    .th5-ember {
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle, #ff6b6b 0%, #cc2200 70%, transparent 100%);
      box-shadow: 0 0 4px 1px rgba(255,80,0,0.5);
      opacity: 0;
      animation: th5-emberAnim var(--dur, 7s) var(--delay, 0s) infinite ease-in-out;
    }
    @keyframes th5-emberAnim {
      0%   { opacity: 0; transform: translateY(0) translateX(0) scale(0.8); }
      20%  { opacity: 0.9; transform: translateY(-20px) translateX(calc(var(--dx,0px) * 0.4)) scale(1); }
      70%  { opacity: 0.4; transform: translateY(-55px) translateX(var(--dx, 0px)) scale(0.7); }
      100% { opacity: 0; transform: translateY(-85px) translateX(calc(var(--dx,0px) * 1.2)) scale(0.3); }
    }

    /* ── Tema 5 (slide-6): Lautan Tenang — buih naik ── */
    .th6-bubble {
      position: absolute;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, rgba(255,255,255,0.6), rgba(0,212,200,0.15));
      border: 1px solid rgba(0,212,200,0.4);
      opacity: 0;
      animation: th6-bubbleAnim var(--dur, 7s) var(--delay, 0s) infinite ease-in;
    }
    @keyframes th6-bubbleAnim {
      0%   { opacity: 0; transform: translateY(0) scale(0.6); }
      10%  { opacity: 0.7; transform: translateY(-10px) scale(1); }
      80%  { opacity: 0.4; transform: translateY(-80px) scale(1.1); }
      100% { opacity: 0; transform: translateY(-110px) scale(0.8); }
    }

  
    /* ══════════════════════════════════════════════════════════════════
       PRAYER BAR — 5 CARD THEMES  (pbt-1 to pbt-5)
       pbt-1 = Dark Glass (default, no class needed but kept for explicitness)
       pbt-2 = Emerald Forest
       pbt-3 = Ocean Blue
       pbt-4 = Rose Gold
       pbt-5 = Royal Purple
    ══════════════════════════════════════════════════════════════════ */

    /* ── Theme 2: Emerald Forest ─────────────────────────────── */
    #prayer-bar.pbt-2 {
      background: linear-gradient(to top, rgba(0,40,20,0.82) 0%, rgba(0,60,30,0.0) 100%);
    }
    #prayer-bar.pbt-2 .prayer-card {
      background: linear-gradient(160deg, rgba(0,180,100,0.10) 0%, rgba(0,100,50,0.06) 100%);
      border-color: rgba(0,200,100,0.18);
      border-top-color: rgba(80,255,160,0.28);
      box-shadow: 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(80,255,160,0.10);
    }
    #prayer-bar.pbt-2 .pc-name { color: #5cffa0; }
    #prayer-bar.pbt-2 .pc-time { color: rgba(200,255,220,0.92); }
    #prayer-bar.pbt-2 .pc-status { color: #3a7a5a; }
    #prayer-bar.pbt-2 .prayer-card.is-next {
      background: linear-gradient(160deg, rgba(255,200,0,0.12) 0%, rgba(200,150,0,0.07) 100%);
      border-color: rgba(255,200,0,0.35); border-top-color: rgba(255,220,50,0.55);
      box-shadow: 0 0 22px rgba(255,200,0,0.08), 0 4px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,220,50,0.18);
    }
    #prayer-bar.pbt-2 .prayer-card.is-next .pc-name { color: #ffd740; }
    #prayer-bar.pbt-2 .prayer-card.is-next .pc-status { color: #ffd740; }
    #prayer-bar.pbt-2 .prayer-card.is-current {
      background: linear-gradient(160deg, rgba(80,255,160,0.15) 0%, rgba(0,200,80,0.08) 100%);
      border-color: rgba(80,255,160,0.45); border-top-color: rgba(120,255,180,0.65);
      animation: pulseGlowGreen 2.5s ease-in-out infinite;
      box-shadow: 0 0 32px rgba(80,255,160,0.10), 0 4px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(80,255,160,0.25);
    }
    #prayer-bar.pbt-2 .prayer-card.is-current .pc-name,
    #prayer-bar.pbt-2 .prayer-card.is-current .pc-time,
    #prayer-bar.pbt-2 .prayer-card.is-current .pc-status { color: #5cffa0; }
    @keyframes pulseGlowGreen {
      0%,100% { box-shadow: 0 0 20px rgba(80,255,160,0.10), 0 4px 20px rgba(0,0,0,0.22), inset 0 1px 0 rgba(80,255,160,0.22); }
      50%      { box-shadow: 0 0 42px rgba(80,255,160,0.22), 0 6px 30px rgba(0,0,0,0.28), inset 0 1px 0 rgba(80,255,160,0.35); }
    }

    /* ── Theme 3: Ocean Blue ─────────────────────────────────── */
    #prayer-bar.pbt-3 {
      background: linear-gradient(to top, rgba(0,20,50,0.85) 0%, rgba(0,30,70,0.0) 100%);
    }
    #prayer-bar.pbt-3 .prayer-card {
      background: linear-gradient(160deg, rgba(30,120,255,0.10) 0%, rgba(0,60,150,0.06) 100%);
      border-color: rgba(60,150,255,0.18);
      border-top-color: rgba(100,190,255,0.30);
      box-shadow: 0 4px 20px rgba(0,0,0,0.28), inset 0 1px 0 rgba(100,190,255,0.10);
    }
    #prayer-bar.pbt-3 .pc-name { color: #7ecffe; }
    #prayer-bar.pbt-3 .pc-time { color: rgba(200,230,255,0.92); }
    #prayer-bar.pbt-3 .pc-status { color: #3a5a8a; }
    #prayer-bar.pbt-3 .prayer-card.is-next {
      background: linear-gradient(160deg, rgba(0,200,255,0.12) 0%, rgba(0,150,200,0.07) 100%);
      border-color: rgba(0,200,255,0.35); border-top-color: rgba(80,220,255,0.55);
      box-shadow: 0 0 22px rgba(0,200,255,0.08), 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(80,220,255,0.18);
    }
    #prayer-bar.pbt-3 .prayer-card.is-next .pc-name { color: #00d4ff; }
    #prayer-bar.pbt-3 .prayer-card.is-next .pc-status { color: #00d4ff; }
    #prayer-bar.pbt-3 .prayer-card.is-current {
      background: linear-gradient(160deg, rgba(100,190,255,0.16) 0%, rgba(30,120,255,0.09) 100%);
      border-color: rgba(100,190,255,0.48); border-top-color: rgba(150,210,255,0.68);
      animation: pulseGlowBlue 2.5s ease-in-out infinite;
      box-shadow: 0 0 32px rgba(100,190,255,0.12), 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(100,190,255,0.28);
    }
    #prayer-bar.pbt-3 .prayer-card.is-current .pc-name,
    #prayer-bar.pbt-3 .prayer-card.is-current .pc-time,
    #prayer-bar.pbt-3 .prayer-card.is-current .pc-status { color: #7ecffe; }
    @keyframes pulseGlowBlue {
      0%,100% { box-shadow: 0 0 20px rgba(100,190,255,0.10), 0 4px 20px rgba(0,0,0,0.24), inset 0 1px 0 rgba(100,190,255,0.24); }
      50%      { box-shadow: 0 0 44px rgba(100,190,255,0.24), 0 6px 30px rgba(0,0,0,0.30), inset 0 1px 0 rgba(100,190,255,0.38); }
    }

    /* ── Theme 4: Rose Gold ──────────────────────────────────── */
    #prayer-bar.pbt-4 {
      background: linear-gradient(to top, rgba(60,10,20,0.85) 0%, rgba(80,20,30,0.0) 100%);
    }
    #prayer-bar.pbt-4 .prayer-card {
      background: linear-gradient(160deg, rgba(220,100,120,0.10) 0%, rgba(180,60,80,0.06) 100%);
      border-color: rgba(220,130,140,0.18);
      border-top-color: rgba(255,170,180,0.30);
      box-shadow: 0 4px 20px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,170,180,0.10);
    }
    #prayer-bar.pbt-4 .pc-name { color: #ffb3c0; }
    #prayer-bar.pbt-4 .pc-time { color: rgba(255,230,235,0.92); }
    #prayer-bar.pbt-4 .pc-status { color: #8a4050; }
    #prayer-bar.pbt-4 .prayer-card.is-next {
      background: linear-gradient(160deg, rgba(255,210,80,0.12) 0%, rgba(220,160,40,0.07) 100%);
      border-color: rgba(255,210,80,0.35); border-top-color: rgba(255,225,100,0.55);
      box-shadow: 0 0 22px rgba(255,210,80,0.08), 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,225,100,0.18);
    }
    #prayer-bar.pbt-4 .prayer-card.is-next .pc-name { color: #ffd860; }
    #prayer-bar.pbt-4 .prayer-card.is-next .pc-status { color: #ffd860; }
    #prayer-bar.pbt-4 .prayer-card.is-current {
      background: linear-gradient(160deg, rgba(255,170,185,0.16) 0%, rgba(220,100,120,0.09) 100%);
      border-color: rgba(255,170,185,0.48); border-top-color: rgba(255,200,210,0.68);
      animation: pulseGlowRose 2.5s ease-in-out infinite;
      box-shadow: 0 0 32px rgba(255,170,185,0.12), 0 4px 20px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,170,185,0.28);
    }
    #prayer-bar.pbt-4 .prayer-card.is-current .pc-name,
    #prayer-bar.pbt-4 .prayer-card.is-current .pc-time,
    #prayer-bar.pbt-4 .prayer-card.is-current .pc-status { color: #ffb3c0; }
    @keyframes pulseGlowRose {
      0%,100% { box-shadow: 0 0 20px rgba(255,170,185,0.10), 0 4px 20px rgba(0,0,0,0.24), inset 0 1px 0 rgba(255,170,185,0.24); }
      50%      { box-shadow: 0 0 44px rgba(255,170,185,0.24), 0 6px 30px rgba(0,0,0,0.30), inset 0 1px 0 rgba(255,170,185,0.38); }
    }

    /* ── Theme 5: Royal Purple ───────────────────────────────── */
    #prayer-bar.pbt-5 {
      background: linear-gradient(to top, rgba(25,0,55,0.88) 0%, rgba(40,0,80,0.0) 100%);
    }
    #prayer-bar.pbt-5 .prayer-card {
      background: linear-gradient(160deg, rgba(140,60,255,0.10) 0%, rgba(90,20,180,0.06) 100%);
      border-color: rgba(160,80,255,0.18);
      border-top-color: rgba(200,140,255,0.30);
      box-shadow: 0 4px 20px rgba(0,0,0,0.30), inset 0 1px 0 rgba(200,140,255,0.10);
    }
    #prayer-bar.pbt-5 .pc-name { color: #d09cff; }
    #prayer-bar.pbt-5 .pc-time { color: rgba(235,220,255,0.92); }
    #prayer-bar.pbt-5 .pc-status { color: #5a3a8a; }
    #prayer-bar.pbt-5 .prayer-card.is-next {
      background: linear-gradient(160deg, rgba(255,200,80,0.12) 0%, rgba(200,140,0,0.07) 100%);
      border-color: rgba(255,200,80,0.35); border-top-color: rgba(255,220,110,0.55);
      box-shadow: 0 0 22px rgba(255,200,80,0.08), 0 4px 20px rgba(0,0,0,0.26), inset 0 1px 0 rgba(255,220,110,0.18);
    }
    #prayer-bar.pbt-5 .prayer-card.is-next .pc-name { color: #ffc840; }
    #prayer-bar.pbt-5 .prayer-card.is-next .pc-status { color: #ffc840; }
    #prayer-bar.pbt-5 .prayer-card.is-current {
      background: linear-gradient(160deg, rgba(200,140,255,0.16) 0%, rgba(140,60,255,0.09) 100%);
      border-color: rgba(200,140,255,0.48); border-top-color: rgba(220,170,255,0.68);
      animation: pulseGlowPurple 2.5s ease-in-out infinite;
      box-shadow: 0 0 32px rgba(200,140,255,0.12), 0 4px 20px rgba(0,0,0,0.26), inset 0 1px 0 rgba(200,140,255,0.28);
    }
    #prayer-bar.pbt-5 .prayer-card.is-current .pc-name,
    #prayer-bar.pbt-5 .prayer-card.is-current .pc-time,
    #prayer-bar.pbt-5 .prayer-card.is-current .pc-status { color: #d09cff; }
    @keyframes pulseGlowPurple {
      0%,100% { box-shadow: 0 0 20px rgba(200,140,255,0.10), 0 4px 20px rgba(0,0,0,0.26), inset 0 1px 0 rgba(200,140,255,0.24); }
      50%      { box-shadow: 0 0 44px rgba(200,140,255,0.24), 0 6px 30px rgba(0,0,0,0.32), inset 0 1px 0 rgba(200,140,255,0.38); }
    }

    </style>

