/* =========================================
   TEMA 4 (RAINBOW MODERN - OPTIMIZED)
   Pembaruan: Layout Anti-Tabrakan untuk TV
   ========================================= */

body.theme-4 {
    background: #000 !important;
    /* --- DITAMBAHKAN AGAR BACKGROUND IMAGE MUNCUL --- */
    background: transparent !important;
}

body.theme-4 .content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    padding: 1vh 2vw 9vh 2vw !important; /* 9vh padding bawah untuk ruang footer */
    height: 100vh !important;
    box-sizing: border-box !important;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #000 100%) !important;
    /* --- DITAMBAHKAN AGAR BACKGROUND IMAGE MUNCUL --- */
    background: transparent !important;
    overflow: hidden !important;
}

/* =========================================
   HEADER: TOP BAR (COMPACT)
   ========================================= */
body.theme-4 .top-bar-modern {
    background: #111827 !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 3px solid transparent !important;
    border-image: linear-gradient(to right, #00f2fe, #4facfe, #7042f8, #b042f8, #f842f8) 1 !important;
    border-radius: 15px;
    padding: 1vh 2vw !important;
    margin-bottom: 1vh !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    flex-shrink: 0 !important;
    height: 12vh !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important; /* Memastikan tanggal, nama masjid, dan hijriah tersebar merata */
}

/* PENYESUAIAN WARNA TANGGAL MASEHI & HIJRIAH TEMA 4 */
body.theme-4 #current-date,
body.theme-4 #hijri-date {
    color: #00f2fe !important;
    text-shadow: 0 0 5px rgba(0, 242, 254, 0.5);
    font-size: clamp(1rem, 1.8vw, 1.5rem) !important;
}

/* TAMBAHAN: Memastikan jam di kanan atas berwarna putih bersih */
body.theme-4 #current-time,
body.theme-4 #clock,
body.theme-4 .time,
body.theme-4 #jam,
body.theme-4 .header-clock {
    color: #ffffff !important;
}

body.theme-4 .header-clock {
    flex: 1;
    text-align: left;
}

body.theme-4 .header-center {
    flex: 2;
    text-align: center;
}

body.theme-4 .header-date {
    flex: 1;
    text-align: right;
}

body.theme-4 .header-divider {
    background-color: rgba(255, 255, 255, 0.2) !important; /* Divider lebih halus untuk tema gelap */
}

body.theme-4 #masjid-name {
    color: #ffffff !important;
    text-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
    font-weight: 800 !important;
    letter-spacing: 1px;
    font-size: clamp(1.2rem, 2.5vw, 2.2rem) !important;
}

body.theme-4 #masjid-address {
    color: #38bdf8 !important;
    font-weight: 600 !important;
    font-size: clamp(0.7rem, 1vw, 1.1rem) !important;
}

/* =========================================
   SLIDESHOW CONTAINER (DYNAMIC CENTER)
   ========================================= */
body.theme-4 #slideshow-container {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    position: relative !important;
    overflow: hidden !important;
    min-height: 0 !important; /* Krusial agar tidak meluap */
    margin: 1vh 0 !important;
}

/* JAM RAKSASA (SLIDE 1) */
body.theme-4 #digital-clock {
    font-size: clamp(4rem, 14vw, 16rem) !important; /* Dibatasi agar tidak tabrakan */
    font-weight: 900 !important;
    background: linear-gradient(135deg, #ff8000 0%, #ffff00 50%, #ffffff 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    filter: drop-shadow(0 0 10px rgba(255, 128, 0, 0.8)) drop-shadow(0 0 20px rgba(255, 255, 0, 0.6)) !important;
    letter-spacing: -2px;
}

/* Kontainer untuk Slide 2 (Keuangan), 3 (Kegiatan), & 4 (Petugas) */
/* TAMBAHAN: body.theme-4 #slide-4 > div disisipkan di sini */
body.theme-4 #slide-2 > div,
body.theme-4 #slide-3 > div,
body.theme-4 #slide-4 > div {
    background: #0f172a !important;
    border: 2px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 20px !important;
    width: 85% !important;
    padding: 2vh 3vw !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
    max-height: 90% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

body.theme-4 .tv-slide h2 {
    color: #ffffff !important;
    font-size: clamp(1.4rem, 2.5vw, 2rem) !important;
    margin-bottom: 1.5vh;
    border-bottom: 1px solid rgba(255,255,255,0.2) !important;
    padding-bottom: 0.5vh;
}

/* Text Colors for Financial Report (Slide 2) */
body.theme-4 #slide-2 table {
    color: #f8fafc !important;
}

body.theme-4 #slide-2 tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

body.theme-4 #slide-2 td,
body.theme-4 #slide-2 th {
    color: #f8fafc !important;
}

body.theme-4 #kas-awal {
    color: #cbd5e1 !important;
}

body.theme-4 #kas-masuk {
    color: #10b981 !important; /* Emerald 500 */
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

body.theme-4 #kas-keluar {
    color: #fb7185 !important; /* Rose 400 */
    text-shadow: 0 0 10px rgba(251, 113, 133, 0.3);
}

body.theme-4 #kas-total {
    color: #38bdf8 !important; /* Sky 400 */
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* Text Colors for Activity Info (Slide 3) */
body.theme-4 #slide-3 ul {
    color: #f1f5f9 !important;
}

body.theme-4 #slide-3 li {
    color: #f1f5f9 !important;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.1);
}

/* TAMBAHAN BARU: Text Colors untuk Petugas Jumat (Slide 4) */
body.theme-4 #slide-4 strong {
    color: #f8fafc !important;
}

body.theme-4 #slide-4 span[id^="nama-"] {
    color: #00f2fe !important;
    text-shadow: 0 0 8px rgba(0, 242, 254, 0.4);
}

body.theme-4 #slide-4 > div > div > div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

/* =========================================
   PRAYER GRID (JADWAL SHALAT - COMPACT)
   ========================================= */
body.theme-4 .prayer-grid {
    background: #0a0f1e !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 15px !important;
    padding: 0.5vh !important;
    margin-top: 1vh !important;
    gap: 0.5vw !important;
    flex-shrink: 0 !important;
    height: 14vh !important; /* Tinggi tetap agar konsisten */
    display: flex !important;
    align-items: stretch !important;
}

body.theme-4 .prayer-card {
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 10px !important;
    padding: 0.5vh 0.2vw !important;
    border-top: 3px solid transparent !important;
}

body.theme-4 .prayer-card h4 {
    font-size: clamp(0.6rem, 1vw, 1.2rem) !important;
    margin: 0 !important;
    color: #94a3b8 !important;
}

body.theme-4 .prayer-card p {
    font-size: clamp(1.2rem, 3vw, 3.2rem) !important;
    margin: 0 !important;
    font-weight: 800 !important;
    color: #ffffff !important;
}

/* ACTIVE PRAYER */
body.theme-4 .active-prayer {
    background: rgba(56, 189, 248, 0.2) !important;
    border: 1px solid rgba(56, 189, 248, 0.5) !important;
    transform: scale(1.02);
}

/* =========================================
   FOOTER
   ========================================= */
body.theme-4 footer {
    background: #000 !important;
    height: 8vh !important;
    border-top: 2px solid #38bdf8 !important;
}

body.theme-4 #running-text {
    font-size: clamp(1.5rem, 3vw, 3.5rem) !important;
}

body.theme-4 #mini-clock {
    color: #ffffff !important;
}