/* Main Interface Styles */
/* ===================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oxanium:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@400;700&family=Nunito+Sans:wght@400;700&display=swap');


/* Reset dan Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 30%, #1e3a8a 70%, #312e81 100%);
    overflow: hidden;
    height: 100vh;
    color: white;
    position: relative;
}

/* Layout Container */
.main-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* Sidebar Jadwal Sholat */
.prayer-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 24cqw;
    height: 100vh;
    background: linear-gradient(180deg, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.6) 100%);
    backdrop-filter: blur(10px);
    padding: 3cqh 1.2cqw;
    z-index: 100;
    box-shadow: 5px 0px 10px rgba(0, 0, 0, 0.7);
}

.masjid-info {
    text-align: center;
    margin-bottom: 1cqh;
    padding-bottom: 0px;
    border-bottom: 0.1cqh solid rgba(255,255,255,0.2);
}

.masjid-name {
    font-size: 1.7cqw;
    font-weight: 700;
    color: #f59e0b;
    margin-bottom: 0cqh;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.masjid-location {
    font-size: 0.9rem;
    color: #cbd5e1;
    opacity: 0.8;
}

.prayer-times-section {
    margin-bottom: 2cqh;
}

.section-title {
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 2cqh;
    text-align: center;
    text-transform: uppercase;
}

.prayer-list {
    space-y: 3;
}

.prayer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.3cqh 0.8cqw;
    margin-bottom: 0.6cqw;
    background: rgba(255,255,255,0.05);
    border-radius: 2cqh;
    transition: all 0.3s ease;
    border-left: 0.2cqh solid transparent;
}

.prayer-item.next-prayer {
    background: linear-gradient(135deg, #cc9900 20%, #993300 100%);
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    color: #ffffff;
    border-left-color: #ffffff;
    box-shadow: 0 1cqh 5cqh rgba(245, 158, 11, 0.3);
    animation: nextPrayerGlow 2s ease-in-out infinite;
}

.prayer-item.current-prayer {
    background: linear-gradient(90deg, #003366 0%, #3730a3 50%, #1e40af 100%);
    color: #ffffff;
    border-left-color: #ffffff;
    box-shadow: 0 1qh 5cqh rgba(16, 185, 200, 0.4);
    //animation: currentPrayerPulse 5s ease-in-out infinite;
}

.prayer-name {
    font-size: 2.9cqh;
    font-family: "Lato", "Nunito Sans";
    font-weight: 600;
    text-transform: capitalize;
    margin-top: 2cqh;
}

.prayer-time {
    font-size: 10.0cqh;
    font-weight: 100;
    letter-spacing: -0.14em;
    padding-right: 0.6cqw;
    font-family: 'Liberation Mono', 'Ubuntu Sans Mono', 'Courier New', 'Roboto Mono', monospace;
}

/* Countdown Container */
.countdown-section {
    position: fixed;
    bottom: 0.8cqh;
    left: 0.7cqw;
    z-index: 110;
    background: rgba(0,0,0,0.9);
    padding: 0.5cqh 0.5cqw;
    border-radius: 12px;
    border: 0.1cqh solid rgba(255,255,255,0.15);

}

.countdown-container {
    text-align: center;
}

.countdown-label {
    font-size: 1.4cqw;
    font-weight: 900;
    color: #cbd5e1;
    margin-right: -2cqw;
    margin-bottom: 0.2cqh;
    text-transform: uppercase;
    font-family: "Nunito Sans", "Latto", "Poppins";
    letter-spacing: 1.2cqw;
}

.countdown-time {
    font-size: 4.0cqw;
    font-weight: 900;
    color: #f59e0b;
    font-family: 'Liberation Mono', 'Courier New', monospace;
    margin-bottom: 0.5cqh;
    margin-top: -0.5cqh;
    letter-spacing: -0.00em;
}

.next-prayer-info {
    font-size: 0.2cqh;
    color: #94a3b8;
    font-weight: 500;
}

/* Main Content Area */
.main-content {
    margin-left: 24cqw;
    width: 100%;
    min-width: 76cqw;
    //flex: 1;
    //display: flex;
    //flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    padding: 0cqh 1cqw;
    left: 24cqw;
    background: rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.clock-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.digital-clock {
    font-size: 12.0cqh;
    margin-left: 2cqw;
    letter-spacing: 0.2em;
    font-weight: 700;
    color: #f1f5f9;
    font-family: 'Oxanium', 'Poppins','Courier New', monospace;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.date-info {
    text-align: right;
}

.current-date {
    font-family: 'Poppins', "Lato", "Nunito Sans";
    font-size: 1.8cqw;
    font-weight: 700;
    letter-spacing: 0.2cqw;
    color: #cbd5e1;
    margin-right: 2cqw;
}

.hijri-date {
    margin-top: -0.5cqh;
    letter-spacing: 0.05em;
    font-size: 1.6cqw;
    margin-right: 2cqw;
    color: #94a3b8;
    font-family: "Lato", "Nunito Sans";
}

/* Content Area */
.content-area {
    //flex: 1;
    padding: 0;
    //display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    padding-bottom: 20cqh; /* Space for running text */
}

.slideshow-container {
    text-align: center;
    margin-left: 0px;
    margin-top: -2cqh;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.slideshow-container canvas {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    object-position: bottom;
    object-position: bottom;
    display: block;
}

/* Transisi animasi untuk slideshow */
.slideshow-container.fade-in {
    animation: fadeIn 10s ease-in-out;
}

.slideshow-container.slide-left {
    animation: slideLeft 1.5s ease-in-out;
}

.slideshow-container.slide-right {
    animation: slideRight 1.5s ease-in-out;
}

.slideshow-container.zoom-in {
    animation: zoomIn 10s ease-in-out;
}

.slideshow-container.slide-up {
    animation: slideUp 1.5s ease-in-out;
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideLeft {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideRight {
    0% { transform: translateX(-100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes zoomIn {
    0% { transform: scale(0.7); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes slideUp {
    0% { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.slide-title {
    font-size: 3cqw;
    font-weight: 600;
    color: #f1f5f9;
    margin-bottom: 30px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.slide-content {
    font-size: 1.5cqw;
    color: #cbd5e1;
    line-height: 1.6;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Running Text */
.running-text-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(90deg, #1e3a8a 0%, #3730a3 50%, #1e40af 100%);
    color: #f59e0b;
    padding: 0.5cqw  0;
    z-index: 90;
    border-top: 3px solid #f59e0b;
    overflow: hidden;
}

.running-text {
    display: inline-block;
    white-space: nowrap;
    font-size: 2.8cqw;
    letter-spacing: 1px;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    font-family: "Poppins", "Lato", "Nunito Sans", "Montserrat";

}

#currentTime {
	display:none;
	font-size:0cqh;
	line-height:0cqh;
	height:0cqh;
}

.running-text-wrapper {
    display: flex;
    width: fit-content;
    animation: scroll-text-continuous 140s linear infinite;
}

/* Navigation Overlay for Testing */
.nav-overlay {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    display: none;
}

.nav-overlay.show {
    display: block;
}



@keyframes scroll-text-continuous {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #1e3a8a 0%, #3730a3 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.2s ease-out;
}

.loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}


.loading-text {
    font-size: 1.2rem;
    font-weight: 500;
    color: #cbd5e1;
}

/* Countdown Overlay */
.countdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7); /* Latar belakang semi-transparan */
    display: flex; /* Gunakan flexbox untuk centering konten */
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Pastikan di atas elemen lain */
    opacity: 0; /* Sembunyikan secara default */
    visibility: hidden; /* Sembunyikan secara default */
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out; /* Transisi halus */
}

.countdown-overlay.show {
    opacity: 1; /* Tampilkan */
    visibility: visible; /* Tampilkan */
}

.countdown-circle-container {
    position: relative;
    width: 30cqw; /* Ukuran kontainer lingkaran */
    height: 30cqw;
    display: flex;
    justify-content: center;
    align-items: center;
}

.countdown-circle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.countdown-overlay-text {
    position: relative; /* Agar di atas canvas */
    font-size: 25cqh; /* Sesuaikan ukuran font */
    font-weight: 900;
    color: white;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.tabir {
	position: fixed;
	top: 0px;
	left: 0px;
	margin: 0px;
	padding: 0px;
	background: #0e0a3a;
	opacity: 0.8;
	z-index: 2000;
    	width: 100vw;
    	height: 100vh;
    	display: flex; /* Gunakan flexbox untuk centering konten */
    	justify-content: center;
    	transition: opacity 2s ease-in-out, visibility 2s ease-in-out; /* Transisi halus */

#loading {
	height: 100vh;
	font-weight: 900;
	font-family: poppins;
	font-size: 4cqh;
	color: #FFFFFF;
	text-shadow: 0 2px 4px rgba(0,0,0,0.5);
	margin-top: 50vh;
}

/* Styling khusus untuk Jumatan */
.prayer-item[data-prayer="dhuhur"] .prayer-name:contains("Jumatan") {
    color: #2d5a27;
    font-weight: bold;
}

.countdown-label:contains("Jumatan") {
    color: #2d5a27;
    font-weight: bold;
}

/* Kerning adjustment untuk tanda ":" di waktu sholat */
.prayer-time {
    font-family: monospace;
    letter-spacing: -0.5px;
}

.prayer-time::before,
.prayer-time::after {
    letter-spacing: 0;
}

/* Alternative approach dengan ::after untuk fine-tuning colon spacing */
.prayer-time.colon-spacing {
    position: relative;
}

/* Tight spacing untuk tanda colon di waktu sholat */
.prayer-time .colon {
    margin: 0 -2px; /* Negative margin untuk merapatkan */
    display: inline-block;
}

/* Variasi level kerning untuk colon - bisa disesuaikan */
.prayer-time .colon.tight-1 { margin: 0 -1.5px; }
.prayer-time .colon.tight-2 { margin: 0 -1px; }
.prayer-time .colon.tight-3 { margin: 0 -1.5px; }
.prayer-time .colon.tight-4 { margin: 0 -2px; }

/* Ensure consistent height for running text container */
.running-text-container {
    min-height: 4.5cqw; /* Minimum height to prevent layout shift */
}

.running-text {
    min-height: 2.8cqw; /* Match the font-size for consistent height */
    line-height: 1.2;
    display: flex;
    align-items: center;
}

/* Placeholder styling - hidden but maintains height */
.running-text .placeholder {
    opacity: 0;
    user-select: none;
    pointer-events: none;
}

/* Default image for slideshow container */
.slideshow-container .default-image {
    opacity: 1;
    transition: opacity 0.5s ease-out;
    z-index: 1;
}

.slideshow-container .default-image.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Ensure smooth transition from default to slideshow */
.slideshow-container {
    position: relative;
    z-index: 1;
    background: #000; /* Fallback background */
}

.slideshow-container__image.incoming {
    z-index: 2; /* Above default image */
}

/* Fix untuk view slideshow agar tidak jadi hitam */
.slideshow-container .view-special {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 1;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
}

/* Pastikan container view selalu visible */
.slideshow-container:has(.view-special) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* AGGRESSIVE OVERRIDE untuk view-special positioning */
.slideshow-container .view-special,
.slideshow-container .slideshow-container__image.view-special {
    transform: none !important;
    transition: none !important;
    position: static !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Override semua animasi yang mungkin menyembunyikan view image */
.slideshow-container.fade-in .view-special,
.slideshow-container.fade-out .view-special,
.slideshow-container .view-special * {
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* Pastikan loading screen dan tabir tidak menutupi slideshow saat aktif */
.slideshow-container:not(.hidden) ~ .loading-screen,
.slideshow-container:not(.hidden) ~ .tabir {
    z-index: 1 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Force slideshow to be on top of everything */
.slideshow-container,
.slideshow-container * {
    z-index: 1;
}
