body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f5f5f5; 

    font-family: Arial, sans-serif;
    margin: 0;
}

.container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

.clock-container {
    position: relative;
    width: 400px;
    height: 400px;
}

.clock-face {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    border: 10px solid #333;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.center-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 15px;
    height: 15px;
    background: #333;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.hand {
    position: absolute;
    bottom: 50%;
    left: 50%;
    transform-origin: 50% 100%;
    background: #333;
    border-radius: 5px;
}

.hour-hand {
    width: 8px;
    height: 100px;
    margin-left: -4px;
    background: #555;
}

.minute-hand {
    width: 6px;
    height: 140px;
    margin-left: -3px;
}

.second-hand {
    width: 3px;
    height: 160px;
    margin-left: -1.5px;
    background: #e74c3c;
}

.number {
    position: absolute;
    width: 100%;
    height: 100%;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.number span {
    display: inline-block;
    position: absolute;
    transform: translate(-50%, -50%);
}

.prayer-marker {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #73a313;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.prayer-label {
    position: absolute;
    font-size: 24px;
    font-weight: 400;
    color: #73a313;
    white-space: nowrap;
    width: 60px;
    margin-left: -30px;
    text-align: center;
    transform-origin: center;
}

.clock-title {
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}


#prayerTimeReminderContainer {
    margin-left: 100px;
    width: 400px;
    transform: scale(0.78);
    }


 /* Table Styles */
.prayer-times-table {
    font-size: 40px; /* Increase font size */
    border-collapse: collapse;
    width: 100%; /* Set table width to fill container */
}

.prayer-times-table th, .prayer-times-table td {
    padding: 2px 30px; /* Increase padding */
    text-align: left;
}

.prayer-times-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.prayer-times-table td {
    font-size: 40px; /* Ensure table data has the same font size */
}

.highlight {
    /*background-color: #e74c3c;    */
    color: #73a313;
    font-weight: bold;
}

.clock-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 60px;

    transform: scale(1.1) translateX(-60px) translateY(-10px);
    transform-origin: left center;


    /*
    transform: scale(1.1) translateX(-30px) translateY(0px);
    transform-origin: left center;
    */
    
}

#digital-clock {
    margin-top: 30px;
    font-size: 54px;
    font-weight: bold;
    color: #333;
    text-align: center;
    margin-left: 20px; /* Added this line to move it right */
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* Aligns content to the right */
    position: absolute;
    top: 20px;
    right: 20px; /* Positions container 20px from the right edge */
    padding: 0 20px;
    box-sizing: border-box;
    margin: 0; /* Removes default margins */
    
}

.header-logo {
    height: 48px;
    width: auto;
    margin-right: 15px; /* Space between logo and title */
}

.header-title {
    font-size: 25px;
    color: #333;
    margin: 0;
    white-space: nowrap; /* Prevents text wrapping */
}

.sunrise-row {
    position: relative;
    border-top: 2px solid #c9c9c9; /* Horizontal line above Jummah */
    margin-top: 20px; /* Space above Jummah */
}

.bottom-right-text {
    position: fixed;
    bottom: 20px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    text-align: right;
}


#prayerTimeReminder {
    font-family: Arial, sans-serif;
    text-align: center;
    padding: 10px;
    width: 400px;
    margin-left: 70px;
    margin-bottom: 10px; /* Add some space between the reminder and the table */
}

#prayerName {
    font-size: 30px; /* Smaller font for the prayer name and azan/iqamah info */
    line-height: 1.2;
    color: #73a313;
    font-weight: 600;
}

#timeLeft {
    font-size: 72px; /* Larger font for the remaining time */
    font-weight: bold;
    margin-top: -20px;
    color: #73a313;
}

#norwegian-date {
    font-family: Arial, sans-serif;
    font-size: 24px;
    text-align: center;
    margin-top: 10px;
    color: #333;
    margin-left: 20px; /* Added this line to move it right */
}

#hijri-date {
    font-family: Arial, sans-serif;
    font-size: 23px;
    text-align: center;
    margin-top: 10px;
    color: #333;
    margin-left: 20px; /* Added this line to move it right */
}


.large-time {
    font-size: 1.3em;  /* Adjust the size for numbers (hour and minute) */
    font-weight: 900; /* Makes the large text thicker */
}

.small-time {
    font-size: 1.2em;  /* Keeps the 'h' and 'm' smaller */
    font-weight: lighter; /* Makes the small text thinner */
}


#sunrise-jamah {
    text-align: center;
    letter-spacing: 25px; /* Pulls the hyphen slightly left */
}



#soundOffOverlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 100;
}
  
#soundOffOverlay img {
    width: 400px;
    height: 400px;
    position: relative;
    top: 270px;  /* move down */
    left: 325px; /* move right */
}

#ishraaq-jamah {
    text-align: center;
    letter-spacing: 25px; /* Pulls the hyphen slightly left */
}



/* Dark Mode Styles */
body.dark-mode {
    background-color: #131313;  /* Dark gray (not pitch black) */
    color: #dfe6e9; /* Soft light gray text */
}

body.dark-mode .clock-face {
    background: #131313; /* Even darker gray for the clock background */
    border: 10px solid #6e6e6e; /* Lighter gray border */
}

body.dark-mode .prayer-marker {
    background: #73a313; /* Light gray prayer markers */
}

body.dark-mode .prayer-label {
    color: #73a313; /* Light gray prayer labels */
}

body.dark-mode .clock-title, 
body.dark-mode #digital-clock, 
body.dark-mode #norwegian-date,
body.dark-mode #hijri-date,  
body.dark-mode .header-title {
    color: #dfe6e9; /* Light gray text */
}

body.dark-mode .prayer-times-table th {
    background-color: #1f1f1f; /* Lighter background for table headers */
    color: #dfe6e9; /* Light gray table header text */
}

body.dark-mode .prayer-times-table tr:not(.highlight) td {
    background-color: #131313;
    color: #dfe6e9;
}

body.dark-mode .highlight {
    /*background-color: #2c2c2c !important; /* Red highlight */
    color: #73a313;
}

body.dark-mode .bottom-right-text {
    color: #e0e0e0; /* Light gray that's easy on the eyes */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8); /* Stronger shadow for dark background */
}




@media (max-width: 768px) {
    /* Reset all spacing first */
    body, .container, .clock-container, 
    #prayerTimeReminderContainer, .bottom-right-text {
        margin: 0;
        padding: 0;
    }

    /* Base layout structure */
    body {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* ✅ instead of center */
        min-height: 100vh;
        padding: 0;
    }

    .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        margin: 1rem 0; /* Consistent spacing */
        margin-bottom: 0.5rem;
        position: relative;
        bottom: 2rem;

    }

    /* Clock section */
    .clock-container {
        margin: 0.5rem 0; /* Small consistent margin */
        transform: scale(0.65); /* Scales entire clock container */
        margin-top: -8rem;
        margin-left: 4rem;
        margin: 0; /* Reset all margins */
        padding: 0;
        position: relative;
        left: 2.5rem;
        
    }

    .clock-stack {
        margin-top: 0rem;  
        margin: 0;

        
    }

    #digital-clock {
        font-size: 3.975rem; /* 22px */
        line-height: 1;
        margin-left: 4rem;
        margin: 0;
        padding: 0;
        position: relative;
        top: -2rem;
        left: 3rem;
    }

    #norwegian-date, #hijri-date {
        font-size: 0.8125rem; /* 13px */
        line-height: 1.2;
        margin: 0.125rem 0 0 0; /* Tiny top margin only */
        margin-left: 4rem;
        position: relative;
        bottom: 1.5rem;
        left: 1rem;
    }

    /* Prayer times - right under clock */
    #prayerTimeReminderContainer {
        margin-top: 0;
        width: 95%;
        max-width: 280px;
        margin-right: 10rem;
        position: relative;
        bottom: 3rem;
        left: 1rem;
        transform: scale(0.91);
    }

    #prayerTimeReminder {
        text-align: center;
        padding: 0.5rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    #prayerName {
        font-size: 20px; /* Reduced from 30px */
        line-height: 1.2;
        color: #73a313;
        font-weight: 600;
    }
    
    #timeLeft {
        font-size: 48px; /* Reduced from 72px */
        font-weight: bold;
        margin-top: -10px; /* Reduced from -20px */
        color: #73a313;
    }

    .prayer-times-table {
        font-size: 13px;
        border-collapse: separate;
        border-spacing: 2px;
        margin-left: 5rem;
    }

    .prayer-times-table td {
        padding: 2px 4px;
        font-size: 25px;
    }

    /* Footer - minimal space */
    .bottom-right-text {
        font-size: 11px;
        margin-top: 10px;
        visibility: hidden;
    }

    .header-container {
        display: none;
    }
}