/* =========================================
   TEMA 9 (JADWAL DI KIRI, JAM ANALOG BESAR DI KANAN)
   Diadaptasi dari sistem analog Theme 8
   ========================================= */

body.theme-9 .content {
    display: grid !important;
    grid-template-columns: 30vw 1fr;
    grid-template-rows: auto 1fr;
    column-gap: 2vw;
    row-gap: 3vh !important;
    padding: 2vh 2vw 11vh 2vw !important;
    height: 100vh;
    box-sizing: border-box;
    overflow: hidden !important;
}

body.theme-9 .top-bar-modern {
    grid-column: 1 / 3;
    grid-row: 1;
    margin: 0 !important;
    width: 100% !important;
}

/* GRID JADWAL SHALAT (KIRI) */
body.theme-9 .prayer-grid {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: 100% !important;
    max-height: 100% !important;
    justify-content: space-between !important;
    border-radius: 15px !important;
    overflow: hidden !important;
}

body.theme-9 .prayer-card {
    border-right: none !important;
    border-bottom: 2px solid #d97706;
    padding: 0 1.5vw !important;
    flex: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

body.theme-9 .prayer-card:last-child {
    border-bottom: none !important;
}

body.theme-9 .active-prayer {
    border-right: none !important;
    border-bottom: 2px solid #ea580c !important;
    background: #ea580c !important;
}

body.theme-9 .prayer-card:last-child.active-prayer {
    border-bottom: none !important;
}

body.theme-9 .prayer-card h4 {
    font-size: clamp(1rem, 1.5vw, 1.8rem) !important;
    margin: 0 !important;
    text-align: left;
    flex: 1;
    color: inherit;
}

body.theme-9 .prayer-card p {
    font-size: clamp(1.5rem, 2.5vw, 2.8rem) !important;
    margin: 0 !important;
    color: inherit;
}

body.theme-9 .countdown {
    font-size: clamp(1rem, 1.2vw, 1.5rem) !important;
    margin: 0 0 0 1vw !important;
    color: inherit;
}

/* AREA KANAN (TAMPAT JAM / SLIDE) */
body.theme-9 #slideshow-container {
    grid-column: 2;
    grid-row: 2;
    height: 100% !important;
    max-height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow: hidden !important;
    margin: 0 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* PERBAIKAN: Memisahkan .tv-slide agar Javascript bisa menyembunyikannya (Mencegah Slide Tabrakan) */
body.theme-9 .tv-slide {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

/* Hanya paksa layout saat slide sedang status aktif */
body.theme-9 .tv-slide.active-slide {
    display: flex !important;
}

body.theme-9 #slide-2 > div,
body.theme-9 #slide-3 > div,
body.theme-9 #slide-4 > div {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}


/* =========================================
   PENGATURAN JAM ANALOG
   ========================================= */

/* Sembunyikan Jam Digital Lama */
body.theme-9 #digital-clock {
    display: none !important;
}

body.theme-9 .clock-container {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    height: 100%;
}

/* Frame Jam Analog (Ukuran diperkecil 10%) */
body.theme-9 .analog-clock {
    display: block !important;
    position: relative;
    /* Dikecilkan dari min(60vw, 75vh) menjadi min(54vw, 67vh) */
    width: min(48vw, 61vh);
    height: min(48vw, 61vh);
    border-radius: 50%;
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.9) 0%, rgba(2, 6, 23, 0.95) 100%);
    box-shadow:
        0 0 40px rgba(0,0,0,0.6),
        inset 0 0 30px rgba(0,0,0,0.8),
        0 0 0 8px #0f172a,
        0 0 0 12px #ea580c,
        0 0 20px 12px rgba(234, 88, 12, 0.3);
    margin: 0 !important;
}

/* Jarum Jam Base */
body.theme-9 .analog-clock .hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: bottom center;
    border-radius: 50px;
    z-index: 5;
    box-shadow: 2px 5px 10px rgba(0,0,0,0.7);
    transition: transform 0.05s cubic-bezier(0.4, 2.08, 0.55, 0.44);
}

/* Jarum Jam (Jam) */
body.theme-9 .analog-clock .hour-hand {
    width: 1.3vw;
    height: 28%;
    background: linear-gradient(to top, #94a3b8, #ffffff);
    margin-left: -0.65vw;
}

/* Jarum Jam (Menit) */
body.theme-9 .analog-clock .minute-hand {
    width: 0.8vw;
    height: 40%;
    background: linear-gradient(to top, #ea580c, #fbd38d);
    margin-left: -0.4vw;
}

/* Jarum Jam (Detik) */
body.theme-9 .analog-clock .second-hand {
    width: 0.25vw;
    height: 45%;
    background: #ef4444;
    margin-left: -0.125vw;
    z-index: 6;
}

/* Ekor Jarum Detik */
body.theme-9 .analog-clock .second-hand::after {
    content: '';
    position: absolute;
    bottom: -15%;
    left: 0;
    width: 100%;
    height: 15%;
    background: #ef4444;
    border-radius: 50px;
}

/* Titik Tengah Jarum */
body.theme-9 .analog-clock .center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2.2vw;
    height: 2.2vw;
    background: radial-gradient(circle, #fbd38d 0%, #ea580c 60%, #9a3412 100%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.8);
    border: 3px solid #0f172a;
}

/* Container Angka Jam */
body.theme-9 .analog-clock .numbers {
    position: absolute;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

/* Format Angka Jam */
body.theme-9 .analog-clock .numbers span {
    position: absolute;
    font-size: clamp(1.8rem, 4.5vw, 4rem); /* Disesuaikan agar pas di frame */
    font-weight: bold;
    color: #ffffff;
    transform: translate(-50%, -50%);
    text-shadow: 1px 2px 5px rgba(0,0,0,0.8);
    font-family: Arial, sans-serif;
}

/* Posisi Angka 1-12 */
body.theme-9 .analog-clock .numbers span:nth-child(1) { top: 12%; left: 50%; } /* 12 */
body.theme-9 .analog-clock .numbers span:nth-child(2) { top: 18%; left: 69%; } /* 1 */
body.theme-9 .analog-clock .numbers span:nth-child(3) { top: 31%; left: 82%; } /* 2 */
body.theme-9 .analog-clock .numbers span:nth-child(4) { top: 50%; left: 88%; } /* 3 */
body.theme-9 .analog-clock .numbers span:nth-child(5) { top: 69%; left: 82%; } /* 4 */
body.theme-9 .analog-clock .numbers span:nth-child(6) { top: 82%; left: 69%; } /* 5 */
body.theme-9 .analog-clock .numbers span:nth-child(7) { top: 88%; left: 50%; } /* 6 */
body.theme-9 .analog-clock .numbers span:nth-child(8) { top: 82%; left: 31%; } /* 7 */
body.theme-9 .analog-clock .numbers span:nth-child(9) { top: 69%; left: 18%; } /* 8 */
body.theme-9 .analog-clock .numbers span:nth-child(10) { top: 50%; left: 12%; } /* 9 */
body.theme-9 .analog-clock .numbers span:nth-child(11) { top: 31%; left: 18%; } /* 10 */
body.theme-9 .analog-clock .numbers span:nth-child(12) { top: 18%; left: 31%; } /* 11 */