:root {
    --glass-bg: rgba(20, 20, 20, 0.65);
    --glass-border: rgba(255, 255, 255, 0.1);
    --accent-gold: #D4AF37;
    --accent-cyan: #00E5FF;
    --accent-glow: rgba(0, 229, 255, 0.4);
    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --active-bg: rgba(212, 175, 55, 0.2);
    --blur-strength: 20px;
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Outfit', sans-serif;
    overflow: hidden;
    color: var(--text-primary);
}

/* Dynamic Background */
.bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: url('https://d12man5gwydfvl.cloudfront.net/wp-content/uploads/2019/04/mosk-featured-min.jpg') no-repeat center center;
    background-color: #2a2a2a;
    background-size: cover;
    transition: transform 30s ease-in-out;
    animation: zoomBg 60s infinite alternate;
}

@keyframes zoomBg {
    0% { transform: scale(1); }
    100% { transform: scale(1.1); }
}

/* Main Layout */
.app-container {
    display: flex;
    height: 100vh;
}

/* Sidebar (Left) - Glassmorphism */
.sidebar {
    width: 380px;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

/* Clock Section */
.clock-container {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
}

.time-display {
    font-size: 5.5rem;
    font-weight: 200;
    line-height: 1;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    font-variant-numeric: tabular-nums;
}

.seconds-display {
    font-size: 2rem;
    color: var(--accent-cyan);
    font-weight: 400;
    vertical-align: top;
    margin-left: 5px;
}

.date-display {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: 10px;
    font-weight: 300;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Prayer List */
.schedule-title {
    font-size: 0.9rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}

.prayer-list {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.prayer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.prayer-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
}

.prayer-name {
    font-size: 1.3rem;
    font-weight: 500;
}

.prayer-time {
    font-size: 1.3rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: 1px;
}

/* Active Prayer Style */
.prayer-item.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(77, 26, 0, 0.3));
    border: 1px solid var(--accent-gold);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.1);
}

.prayer-item.active .prayer-name,
.prayer-item.active .prayer-time {
    color: var(--accent-gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

/* Upcoming Prayer Emphasis */
.prayer-item.next {
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid var(--accent-cyan);
}

.prayer-item.next .prayer-name,
.prayer-item.next .prayer-time {
    color: var(--accent-cyan);
}

/* Right Content Area */
.main-content {
    flex-grow: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 60px;
}

.next-prayer-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(15px);
    padding: 40px 60px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.next-label {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: 300;
}

.next-name {
    font-size: 5rem;
    font-weight: 700;
    color: var(--accent-gold);
    margin: 0;
    text-shadow: 0 0 40px rgba(212, 175, 55, 0.4);
    line-height: 1.2;
}

.countdown {
    font-size: 3rem;
    font-weight: 300;
    color: #fff;
    margin-top: 20px;
    font-variant-numeric: tabular-nums;
}

.countdown small {
    font-size: 1rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 5px;
}

/* Branding */
.branding {
    position: absolute;
    top: 40px;
    right: 50px;
    text-align: right;
}

.branding h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.branding span {
    color: var(--accent-cyan);
}

.location-info {
    font-size: 1rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 5px;
}

/* Footer Running Text */
.footer-marquee {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--glass-bg);
    backdrop-filter: blur(var(--blur-strength));
    border-top: 1px solid var(--glass-border);
    color: white;
    padding: 15px 0;
    z-index: 20;
}

.marquee-content {
    display: flex;
    gap: 50px;
    white-space: nowrap;
    overflow: hidden;
}

.marquee-content span {
    font-size: 1.4rem;
    padding-left: 100%;
    animation: marquee 30s linear infinite;
    display: flex;
    align-items: center;
    gap: 15px;
}

.marquee-content i {
    color: var(--accent-gold);
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Quote Card */
.quote-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    padding: 30px 45px;
    border-radius: 20px;
    border-right: 6px solid var(--accent-gold);
    border-left: none;
    max-width: 800px;
    text-align: right;
    opacity: 0;
    transform: translateY(20px);
    animation: fady 1s ease forwards;
    overflow: hidden;
}

/* New Info Panel Wrapper */
.info-panel {
    position: absolute;
    bottom: 80px;
    right: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-end;
    z-index: 30;
}

.quote-text {
    font-size: 2.2rem;
    font-weight: 300;
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 20px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.quote-arabic {
    font-family: 'Amiri', serif;
    font-size: 2.8rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
    line-height: 1.6;
    direction: rtl;
}

.quote-source {
    font-size: 1.4rem;
    color: var(--accent-cyan);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Stats Card */
.stats-container {
    width: 100%;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

.stats-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    color: #fff;
    transition: transform 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    background: rgba(20, 20, 20, 0.8);
    border-color: var(--accent-gold);
}

.stat-icon {
    font-size: 1.5rem;
    color: var(--accent-cyan);
}

.stat-info {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--accent-gold);
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Animation Keyframes */
.fade-enter { animation: fadeIn 1s ease forwards; }
.fade-exit { animation: fadeOut 1s ease forwards; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

@keyframes fady {
    to { opacity: 1; transform: translateY(0); }
}

/* Start Overlay */
.overlay-start {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(10px);
    transition: opacity 0.5s ease;
}

.start-btn {
    padding: 20px 40px;
    font-size: 1.5rem;
    background: var(--accent-gold);
    color: #000;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    transition: transform 0.2s ease;
    font-family: 'Outfit', sans-serif;
}

.start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(212, 175, 55, 0.6);
}

/* Hijri Date */
.hijri-display {
    font-size: 1.1rem;
    color: var(--accent-gold);
    margin-top: 5px;
    font-weight: 400;
    letter-spacing: 1px;
    font-style: italic;
}

/* Iqomah & Prayer Overlays */
.overlay-fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    backdrop-filter: blur(20px);
    opacity: 0;
    transition: opacity 1s ease;
}

.overlay-active { opacity: 1; }

.iqomah-timer {
    font-size: 15rem;
    font-weight: 700;
    color: var(--accent-gold);
    line-height: 1;
    font-variant-numeric: tabular-nums;
    transition: color 0.5s ease;
}

/* Warning Colors */
.warning-low {
    color: #ffd700 !important; /* Yellow */
}

.warning-critical {
    color: #ff4444 !important; /* Red */
    animation: pulseCritical 1s infinite;
}

@keyframes pulseCritical {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.iqomah-title.blinking {
    animation: blinkText 1s infinite;
    color: var(--accent-gold);
}

@keyframes blinkText {
    0% { opacity: 1; }
    50% { opacity: 0.3; }
    100% { opacity: 1; }
}

#iqomah-message {
    font-size: 3.5rem;
    color: #fff;
    margin-top: 40px;
    font-weight: 300;
    text-align: center;
    max-width: 80%;
    min-height: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

.prayer-message {
    font-size: 4rem;
    color: #fff;
    text-align: center;
}

.prayer-icon {
    font-size: 6rem;
    color: var(--accent-cyan);
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* QRIS Card */
.qris-card {
    position: absolute;
    top: 40px;
    left: 40px;
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    padding: 25px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 30;
    animation: fadeIn 1s ease forwards;
    transition: transform 0.3s ease;
}

.qris-card:hover {
    transform: scale(1.05);
    background: rgba(20, 20, 20, 0.8);
}

.qris-title {
    color: var(--accent-gold);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
    padding-bottom: 10px;
}

.qris-img {
    width: 180px;
    height: 180px;
    border-radius: 12px;
    border: 4px solid #fff;
    margin-bottom: 10px;
}

.qris-scan {
    margin-top: 5px;
    color: #fff;
    font-size: 1rem;
    font-weight: 300;
}

.qris-scan i {
    color: var(--accent-cyan);
    margin-right: 5px;
}
