:root { 
    --gold: #ffd700; 
    --highlight: #28a745;
    --card-bg: rgba(0, 0, 0, 0.7);
    --card-bg-y: rgba(220, 210, 150, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.1); 
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body, html { 
    height: 100vh; width: 100vw;
    font-family: 'Segoe UI', sans-serif; 
    background: #000; color: white; 
    overflow: hidden; 
}

#bg-slider {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; 
    z-index: 1; background-size: cover; background-position: center;
    transition: background-image 2s ease-in-out; 
}

#bg-slider::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.top-banner, .ticker-wrap, .main-container { position: relative; z-index: 10; }

.top-banner { 
    display: grid; grid-template-columns: 1.5fr 2fr 1.5fr;
    align-items: center; padding: 0 3vw; height: 15vh;
    background: rgba(0, 0, 0, 0.3); border-bottom: 1px solid rgba(255,215,0,0.2);
}

.contact-info { text-align: left; font-size: 0.9vw; line-height: 1.4; opacity: 0.9; }
.time-date-group { text-align: right; }
#live-clock { font-size: 3vw; font-weight: 800; }
.g-date { font-size: 1.2vw; opacity: 0.9; }
.h-date { font-size: 1.1vw; color: var(--gold); font-weight: bold; }
.credentials { text-align: center; }
.credentials h1 { color: var(--gold); font-size: 2.5vw; text-transform: uppercase; }

.ticker-wrap { background: rgba(0, 0, 0, 0.5); height: 5vh; overflow: hidden; display: flex; align-items: center; }
.ticker { animation: scroll 40s linear infinite; white-space: nowrap; }
.ticker span { margin-right: 100px; font-weight: bold; font-size: 1.1vw; color: var(--gold); }
@keyframes scroll { 0% { transform: translateX(100%); } 100% { transform: translateX(-100%); } }

/* Main Container - 70% Content / 28% Sidebar */
.main-container { 
    display: grid; 
    grid-template-columns: 70% 28%; 
    height: 80vh; 
    padding: 1.5vh 1vw; 
    gap: 1vw; 
}

.welcome-card { 
    background: var(--glass-bg); 
    /*backdrop-filter: blur(10px);*/
    padding: 5vh 3vw; 
    border-radius: 20px; 
    border: 1px solid rgba(255,215,0,0.1); 
    text-align: center; 
}

/* Sidebar Flex Logic for 50/50 Height */
.sidebar { 
    display: flex; 
    flex-direction: column; 
    gap: 1vh; 
    height: 100%;
}

.side-box { 
    background: var(--card-bg); 
    /*backdrop-filter: blur(10px);*/ 
    border-radius: 12px; 
    border: 1px solid rgba(255,255,255,0.1); 
    padding: 1.2vh; /* Slightly reduced padding */
    flex: 1; 
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.side-box h3 { 
    color: var(--gold); 
    font-size: 1.1vw; 
    text-align: center; 
    margin-bottom: 0.8vh; 
    border-bottom: 1px solid rgba(255,215,0,0.3);
    padding-bottom: 0.4vh;
}

.scroll-content { font-size: 0.9vw; line-height: 1.4; overflow-y: auto; }

/* Table area takes up available space */
.prayer-panel { justify-content: flex-start; }

.prayer-table { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0 0.20vh; /* Tighter spacing for 9 rows */
}

.prayer-table td { 
    padding: 0.45vh 0.8vw; /* Further reduced padding to fit navigation */
    background: rgba(255,255,255,0.05); 
    font-weight: 700; 
    font-size: 1.05vw; /* Slightly smaller font */
}

.prayer-table td:first-child { border-radius: 6px 0 0 6px; color: var(--gold); }
.prayer-table td:last-child { border-radius: 0 6px 6px 0; text-align: right; }

/* Highlighted row */
tr.active td { 
    background: var(--highlight) !important; 
    color: white !important;
}

/* Navigation Controls - Pinned to bottom of the card */
.nav-controls { 
    display: flex; 
    justify-content: center; 
    gap: 0.5vw; 
    margin-top: auto; /* Automatically pushes to the bottom of side-box */
    padding-top: 0.5vh;
}

.nav-controls button { 
    background: rgba(40, 40, 40, 0.8); 
    border: 1px solid #555; 
    color: white; 
    padding: 0.3vh 0.8vw; 
    border-radius: 6px; 
    cursor: pointer; 
    font-size: 0.8vw;
    transition: all 0.2s ease;
}

.nav-controls button:hover { background: rgba(80, 80, 80, 0.9); border-color: var(--gold); }
.nav-controls button.active { border-color: var(--gold); color: var(--gold); background: rgba(0, 0, 0, 0.5); }