:root {
    --primary-color: #D4AF37; /* Gold */
    --primary-dark: #AA8B2B;
    --text-main: #FFFFFF;
    --text-muted: #E0E0E0;
    --glass-bg: rgba(15, 32, 39, 0.65); /* Deep dark blue/green */
    --glass-bg-darker: rgba(10, 20, 25, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Cinzel', serif;
    --font-body: 'Montserrat', sans-serif;
    --font-display: 'Playfair Display', serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: var(--font-body);
    color: var(--text-main);
    overflow: hidden; /* Hide scrollbars for TV display */
    background-color: #000;
}
/* Background Video */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -2;
}
.video-background iframe {
    width: 100vw;
    height: 56.25vw; /* 16:9 Aspect Ratio */
    min-height: 100vh;
    min-width: 177.77vh;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.7) 0%, rgba(15, 32, 39, 0.5) 100%);
    z-index: -1;
}
/* Reusable Glass Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}
.glass-panel-dark {
    background: var(--glass-bg-darker);
    backdrop-filter: blur(16px);
    border: 1px solid var(--primary-color);
    box-shadow: 0 0 40px rgba(212, 175, 55, 0.2);
    border-radius: 20px;
}
/* App Layout */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    padding: 2vh 2vw;
    gap: 2vh;
}
/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5vh 2vw;
    height: 12vh;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}
.logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--primary-color);
}
.masjid-info h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 2px;
}
.masjid-info p {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}
.header-center {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
#current-time {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
    letter-spacing: 2px;
}
.date-info {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-top: 5px;
    font-weight: 500;
}
.divider {
    margin: 0 10px;
    color: var(--text-muted);
}
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}
.branding {
    text-align: right;
}
.premium-badge {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-color));
    color: #000;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 5px;
}
.branding p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
}
/* Main Content */
main {
    display: flex;
    gap: 2vw;
    flex: 1;
    min-height: 0; /* Important for flex children to shrink */
}
/* Prayer Times Panel */
.prayer-times-panel {
    flex: 0 0 300px;
    display: flex;
    flex-direction: column;
    padding: 20px;
}
.prayer-times-panel h3 {
    text-align: center;
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}
#prayer-list {
    list-style: none;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
}
.prayer-item {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    padding: 10px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}
.prayer-item.active-prayer {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, transparent 100%);
    border-left: 4px solid var(--primary-color);
}
.prayer-item.active-prayer .prayer-time {
    color: var(--primary-color);
    font-weight: 700;
}
.next-prayer-countdown {
    margin-top: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}
.next-prayer-countdown p {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}
#next-prayer-name {
    color: var(--primary-color);
    font-weight: 700;
}
#countdown-timer {
    font-size: 2.2rem;
    font-weight: 700;
    margin-top: 5px;
    font-variant-numeric: tabular-nums;
}
/* Info Slider */
.info-slider {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 20px;
    position: relative;
    overflow: hidden;
}
.slider-container {
    flex: 1;
    position: relative;
}
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.slide.active {
    opacity: 1;
    pointer-events: auto;
}
.slide-loading {
    justify-content: center;
    align-items: center;
    color: var(--primary-color);
    gap: 15px;
}
/* Specific Slide Types */
.slide-header {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 2rem;
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.3);
}
/* Agenda Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
.data-table th, .data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.data-table th {
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}
.data-table tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:nth-child(even) {
    background: rgba(255,255,255,0.03);
}
/* Ayat/Hadits Style */
.ayat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 40px;
}
.ayat-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    opacity: 0.7;
}
.ayat-text {
    font-family: var(--font-display);
    font-size: 2.2rem;
    line-height: 1.5;
    margin-bottom: 20px;
    font-style: italic;
}
.ayat-source {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 600;
}
/* Slider Indicators */
.slider-indicators {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}
.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transition: background 0.3s;
}
.indicator.active {
    background: var(--primary-color);
}
/* Marquee Footer */
.marquee-container {
    height: 6vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 0;
}
.marquee-title {
    background: var(--primary-color);
    color: #000;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
}
marquee {
    flex: 1;
    font-size: 1.3rem;
    color: var(--text-main);
    padding-left: 20px;
    font-weight: 500;
}
/* --- OVERLAYS --- */
.full-screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transition: opacity 1s ease;
}
.full-screen-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}
/* Adzan Screen */
.adzan-content {
    text-align: center;
    padding: 60px;
    width: 80%;
    max-width: 800px;
    animation: pulseGlow 2s infinite alternate;
}
@keyframes pulseGlow {
    from { box-shadow: 0 0 20px rgba(212, 175, 55, 0.2); }
    to { box-shadow: 0 0 50px rgba(212, 175, 55, 0.6); }
}
.adzan-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-transform: uppercase;
}
.adzan-location {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 40px;
}
.iqomah-countdown-container p {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.massive-timer {
    font-size: 8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin: 10px 0 30px 0;
    font-variant-numeric: tabular-nums;
}
.adzan-doa {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-muted);
    max-width: 80%;
    margin: 0 auto;
}
/* Sholat Screen */
.sholat-mode {
    background: #000; /* Pitch black for distraction-free praying */
}
.sholat-content {
    text-align: center;
    opacity: 0.5; /* Dim so it's not bright */
}
.sholat-icon {
    font-size: 5rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.sholat-title {
    font-size: 4rem;
    margin-bottom: 10px;
    letter-spacing: 5px;
}
.sholat-subtitle {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.sholat-instruction {
    font-size: 1.5rem;
}
/* Modal configuration */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0,0,0,0.8);
}
.modal.hidden {
    display: none;
}
.modal-content {
    padding: 40px;
    width: 500px;
    text-align: center;
}
.modal-content h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}
.modal-content input {
    width: 100%;
    padding: 10px;
    margin: 15px 0;
    background: rgba(255,255,255,0.1);
    border: 1px solid var(--primary-color);
    color: white;
    border-radius: 4px;
}
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    margin: 5px;
}
.btn-primary {
    background: var(--primary-color);
    color: #000;
}
.btn-secondary {
    background: rgba(255,255,255,0.2);
    color: white;
}
.config-hint {
    margin-top: 15px;
    color: var(--text-muted);
}
/* Floating Config Button */
.floating-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--glass-bg-darker);
    color: var(--text-muted);
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}
.floating-btn:hover {
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    transform: scale(1.1);
}