/* Global Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #b0bec5;
    display: flex;
    flex-direction: column;
    height: 100vh;
    text-align: center;
    overflow: hidden;
}
/* Header Section */
#header {
    margin-top: 20px;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    color: #2d3b45;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
    box-sizing: border-box;
}
#messages-container {
    flex-grow: 1;
    min-height: 80px;
    color: #2d3b45;
    font-size: 2em;
    display: flex;
    align-items: center;
    margin: 0 20px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}
.message-wrapper {
    position: absolute;
    white-space: nowrap;
    top: 50%;
    transform: translateY(-50%);
    visibility: visible;
    opacity: 1;
}
.message-wrapper span {
    white-space: nowrap;
    display: inline-block;
    padding: 0 20px;
    font-family: inherit;
}
.button1, .fullscreen-button {
    background-color: #b0bec5;
    color: #2d3b45;
    border: none;
    padding: 10px;
    cursor: pointer;
    font-size: 1em;
}
.fullscreen-button {
    margin-right: 10px;
}
.message-wrapper span.arabic {
    direction: rtl;
    font-family: 'Noto Sans Arabic', sans-serif;
}
@keyframes marqueeLeft {
    0% { transform: translateX(2000px) translateY(-50%); }
    100% { transform: translateX(-2000px) translateY(-50%); }
}
@keyframes marqueeRight {
    0% { transform: translateX(-2000px) translateY(-50%); }
    100% { transform: translateX(2000px) translateY(-50%); }
}
/* Next Prayer Section */
#next-prayer {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-direction: row;
    width: 100%;
    height: 60vh;
    background-color: #b0bec5;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 12px;
}
/* Slideshow Section */
#slideshow {
    display: none;
    width: 100%;
    height: 60vh;
    background-color: #b0bec5;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    border-radius: 12px;
    margin-top: 20px;
    position: relative;
    justify-content: center;
    align-items: center;
}
#slideshow img {
    max-width: 90%;
    margin: auto;
    height: auto;
    object-fit: contain;
    display: none;
    border-radius: 12px;
}
#slideshow img.active {
    display: block;
}
#slideshow .error {
    color: #D32F2F;
    font-size: 1.5em;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}
@keyframes highlightChange {
    0% { background-color: #2d3b45; }
    50% { background-color: #008b98; }
    100% { background-color: #2d3b45; }
}
.highlight-next-prayer {
    animation: highlightChange 1.5s ease-in-out infinite !important;
    background-color: #008b98;
    color: #2C3E50;
    font-size: 4vw !important;
}        
.highlight-next-prayer .remaining-time {
    font-size: 2em !important;
    color: #fbb559 !important; /* Highlight color for remaining-time */
}
/* Date & Time Section on the Left */
#date-time {
    width: 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: #2d3b45;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 4vw !important;
    border-radius: 12px;
}
.error {
    color: #D32F2F;
    font-size: 1.5em;
    font-weight: bold;
    direction: ltr;
    text-align: center;
}
#date-time #date {
    color: #ffffff;
}
#date-time #clock {
    font-weight: bold;
    font-size: 2.5em !important;
    color: #7fdbff;
}
/* Next Prayer Details Section on the Right */
#next-prayer-details {
    width: 46%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    background-color: #2d3b45;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-size: 4vw !important;
    border-radius: 12px;
}
#next-prayer-details .arabic-prayer-name {
    font-size: 1.5em !important;
    color: #ffffff;
    font-weight: bold;
}
#next-prayer-details .french-prayer-name {
    font-size: 1.3em !important;
    color: #ffffff;
    font-weight: normal;
}
#next-prayer-details .remaining-time {
    font-size: 2em !important;
    color: #7fdbff; /* Default color for remaining-time */
    font-weight: bold;
}
/* All Prayers Section */
#all-prayers {
    flex: 1;
    padding: 20px;
    background-color: #b0bec5;
    margin-top: 20px;
    display: block;
}
.prayer-time-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}
.prayer-time {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    flex: 1;
    text-align: center;
    background-color: #2d3b45;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.prayer-time .time {
    font-size: 2vw;
    color: #7fdbff; /* Default color for time */
    font-weight: bold;
}
.prayer-time.next-prayer {
    background-color: #008b98;
    color: #ffffff;
}
.prayer-time.next-prayer .time {
    color: #fbb559 !important; /* Highlight color for time when prayer is highlighted */
}
.latin-date {
    font-size: 0.8em;
    white-space: nowrap;
    display: inline-block;
}
.prayer-time span {
    font-size: 16px;
    color: #777;
}
.arabic, .arabic-text {
    font-family: 'Noto Sans Arabic', sans-serif;
    font-size: 2vw;
    white-space: nowrap;
    direction: rtl;
    text-align: center;
}
.french-prayer-name, .latin-date {
    direction: ltr;
    text-align: center;
}
/* Responsive Design */
@media (max-width: 768px) {
    #next-prayer {
        flex-direction: column;
        height: calc(60% - 20);
    }
    #date-time, #next-prayer-details {
        width: 100%;
    }
    #date-time {
        text-align: center;
        font-size: 6vw !important;
    }
    #next-prayer-details {
        font-size: 5vw !important;
    }
    #next-prayer-details p {
        font-size: 5vw !important;
        font-weight: bold;
        color: #333;
    }
    #date-time p {
        font-size: 6vw !important;
    }
    .highlight-next-prayer {
        font-size: 5vw !important;
    }
    .highlight-next-prayer .remaining-time {
        font-size: 2em !important;
        color: #fbb559 !important; /* Highlight color for remaining-time */
    }
    #slideshow {
        height: 50vh;
    }
}
@media (max-width: 428px){
    #date-time, #next-prayer-details {
        width: 90%;
        text-align: center;
    }
    #next-prayer {
        flex-direction: column;
        height: 40vh;
        font-size: 3vw !important;
    }   
    #next-prayer-details p {
        font-size: 3vw !important;   
    }    
    #date-time p {
        font-size: 3vw !important;
    }  
    #date-time {
        text-align: center;
        font-size: 3vw !important;
    }            
}        
@media (max-width: 375px){
    #date-time, #next-prayer-details {
        width: 90%;
        text-align: center;
    }
    #next-prayer {
        flex-direction: column;
        height: 38vh;
        font-size: 3vw !important;
    }   
    #next-prayer-details p {
        font-size: 3vw !important;   
    }    
    #date-time p {
        font-size: 3vw !important;
    }  
    #date-time {
        text-align: center;
        font-size: 3vw !important;
    }            
}
@media (max-height:844){
    #next-prayer {
        flex-direction: column;
        height: 40vh;
        font-size: 3vw !important;
    }   
    #next-prayer-details p {
        font-size: 3vw !important;   
    }    
    #date-time p {
        font-size: 3vw !important;
    }  
    #date-time {
        text-align: center;
        font-size: 3vw !important;
    }
}
@media (max-height:760){
    #next-prayer {
        flex-direction: column;
        height: 30vh;
        font-size: 3vw !important;
    }               
    #next-prayer-details p {
        font-size: 2vw !important;   
    }    
    #date-time p {
        font-size: 2vw !important;
    }  
    #date-time {
        text-align: center;
        font-size: 2vw !important;
    }
}