html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/***** Ensure dropdowns appear above info alerts *****/
.dropdown-menu {
    z-index: 9999 !important;
    position: absolute !important;
}

/***** Ensure navbar and dropdowns are always above alerts and content *****/
.navbar * {
    position: relative;
}

.navbar-nav .dropdown {
    position: relative !important;
    z-index: 9999 !important;
}

.navbar-nav .dropdown-menu {
    z-index: 9999 !important;
}

/* Force dropdowns above everything */
.dropdown.show,
.dropdown.show .dropdown-menu {
    z-index: 9999 !important;
}

/* Optionally, lower z-index for alerts if needed */
.alert {
    z-index: 100 !important;
    position: relative;
}

.container.main-content {
    z-index: 1 !important;
    position: relative;
}
.page-title {
    color: #0d6efd;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
@media (max-width: 767.98px) {
    .page-title {
        font-size: 2rem;
    }
}

.responsive-font {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 2.0rem;
    line-height: 1.4;
    word-break: break-word;
}

@media (max-width: 900px) {
    .responsive-font {
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .responsive-font {
        font-size: 1.2rem;
    }
}

.prayer-time-label {
    font-weight: 600;
    letter-spacing: 0.03em;
}

.prayer-time-value {
    font-weight: 400;
    font-size: 1.1em;
}

.large-font {
    font-size: 2.5rem; /* or match the value from .responsive-title */
    font-family: var(--dynamic-font, 'Montserrat', 'Segoe UI', Arial, sans-serif);
    font-weight: bold;
    line-height: 1.2;
}

.responsive-font,
.responsive-title,
.large-font {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 0 #000;
    /* Ensures text is readable on any background */
}

.background-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 0;
    background: rgba(0,0,0,0.35); /* subtle dark overlay for contrast */
    pointer-events: none;
}

.container, .text-center, .responsive-font {
    position: relative;
    z-index: 1;
}

.text-dark {
    /* color: #111 !important; */ /* REMOVED - was causing navbar text to be dark */
    text-shadow: none !important;
}
.text-light {
    color: #fff !important;
    text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 0 #000 !important;
}

:root {
        --dynamic-font: @fontFamily;
        --prayer-font-color: #fff; /* default to white */
    }
.blur-bg {
    background: rgba(36, 51, 99, 0.38); /* modern blue with 38% opacity */
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-radius: 1rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    transition: background 0.3s, box-shadow 0.3s;
}
    .prayer-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 0.5em;
        gap: 0.5em;
        min-height: 3.5rem;
    }
    .prayer-name, .prayer-time {
        font-size: clamp(2.2rem, 9vw, 4.5rem);
        font-family: var(--dynamic-font, 'Montserrat', 'Segoe UI', Arial, sans-serif);
        font-weight: 700;
        line-height: 1.1;
        letter-spacing: 0.01em;
        color: var(--prayer-font-color);
        text-shadow: 0 2px 8px rgba(0,0,0,0.7), 0 1px 0 #000;
        word-break: break-word;
        transition: color 0.2s;
    }
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    html, body {
        height: 100%;
    }
    body {
        min-height: 100vh;
    }
/* Highlight for current prayer time ("now") */
.prayer-now {
    background: linear-gradient(90deg, #fffbe5 0%, #ffe066 60%, #ffd700 100%) !important;
    font-weight: bold;
    color: #b85c00 !important;
    border-left: 6px solid #ffb300;
    box-shadow: 0 4px 24px 0 #ffd70044, 0 1.5px 8px 0 #ffb30033;
    border-radius: 1.5rem;
    animation: glow 2.2s infinite alternate, pulse-border 2s infinite;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, border-radius 0.3s;
    backdrop-filter: blur(2px) brightness(1.08);
    outline: 2px solid #fff6;
    outline-offset: -6px;
    position: relative;
    overflow: hidden;
}
.prayer-now::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    pointer-events: none;
    box-shadow: 0 0 0 2px #ffd70033, 0 0 24px 8px #ffe06655;
    opacity: 0.7;
}
.prayer-now-optimise {
    background: linear-gradient(90deg, #ff9800 0%, #ff3d00 50%, #ff9800 100%) !important;
    color: #fff !important;
    font-weight: bold;
    border-left: 6px solid #fff176;
    border-radius: 1.2rem;
    box-shadow: 0 4px 24px 0 #ff980088, 0 1.5px 8px 0 #ff3d0033;
    padding-left: 1.2rem;
    padding-right: 1.2rem;
    transition: background 0.3s, color 0.3s;
    position: relative;
    overflow: hidden;
}
.prayer-now-optimise::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 1.2rem;
    pointer-events: none;
    box-shadow: 0 0 0 2px #fff17655, 0 0 24px 8px #ff980055;
    opacity: 0.5;
}
/* Remove or override conflicting color/text-shadow from Bootstrap and your own classes */
.list-group-item.auto-contrast-glow,
.responsive-title.auto-contrast-glow,
.responsive-font.auto-contrast-glow,
.large-font.auto-contrast-glow,
.auto-contrast-glow {
    color: #fff !important;
    text-shadow: 0 2px 8px #222, 0 1px 0 #000, 0 0 8px #0d6efd !important;
    background: transparent !important;
    position: relative !important;
    z-index: 2;
}

/* Add these classes for dynamic contrast */
.prayer-contrast-dark {
    color: #222 !important;
    text-shadow: 0 1px 0 #fff8;
}
.prayer-contrast-light {
    color: #fff !important;
    text-shadow: 0 1px 2px #0008;
}

.bg-thumbnail-scroll {
    display: flex;
    overflow-x: auto;
    gap: 0.7rem;
    padding: 0.5rem 0.2rem;
    max-width: 100%;
    background: rgba(255,255,255,0.7);
    border-radius: 0.7rem;
    scrollbar-width: thin;
    scrollbar-color: #bbb #f8fafc;
    box-shadow: 0 2px 12px 0 #0d6efd11;
    align-items: center;
}

.bg-thumbnail-scroll::-webkit-scrollbar {
    height: 8px;
}
.bg-thumbnail-scroll::-webkit-scrollbar-thumb {
    background: #bbb;
    border-radius: 4px;
}

.bg-thumb {
    width: 120px;
    height: 75px;
    object-fit: cover;
    cursor: pointer;
    border-radius: 0.7rem;
    box-shadow: 0 4px 16px #0d6efd22, 0 1.5px 8px #0001;
    border: 2px solid transparent;
    transition: border 0.2s, box-shadow 0.2s, transform 0.18s;
    flex: 0 0 auto;
    background: #f8fafc;
    position: relative;
}

.bg-thumb:hover, .bg-thumb:focus {
    border: 2px solid #0d6efd;
    box-shadow: 0 0 0 4px #0d6efd33, 0 4px 16px #0d6efd22;
    transform: scale(1.06);
    z-index: 2;
}

.bg-thumb.active-bg-thumb {
    border: 2.5px solid #0d6efd;
    box-shadow: 0 0 0 5px #0d6efd44, 0 4px 16px #0d6efd22;
    outline: none;
    transform: scale(1.09);
    z-index: 3;
    .solat-title {
           color: #fff;
           background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
           padding: 0.7rem 1.2rem;
           border-radius: 0.8rem;
           box-shadow: 0 4px 24px 0 rgba(30,60,114,0.18);
           font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
           font-weight: 800;
           letter-spacing: 0.03em;
           text-shadow: 0 2px 8px #222, 0 1px 0 #000;
           display: inline-block;
       }
}

.main-title {
    font-size: 2.1rem;
    font-family: 'Segoe UI', Arial, sans-serif;
    color: #fff;
    padding: 0.15em 0.5em; /* minimal horizontal space */
    border-radius: 0.7em;
    margin: 1em 0 0.7em 0;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6), 0 1px 0 #000;
    background: linear-gradient(90deg, rgba(13,110,253,0.85) 0%, rgba(32,201,151,0.7) 100%);
    box-shadow: 0 4px 24px 0 rgba(13,110,253,0.10);
    letter-spacing: 0.01em;
    line-height: 1.15;
    display: inline-block;
    transition: background 0.3s, box-shadow 0.3s;
}

@media (max-width: 600px) {
    .main-title {
        font-size: 1.2rem;
        padding: 0.12em 0.2em;
    }

    html, body, .futuristic-bg-outer {
        font-family: 'Montserrat', Arial, sans-serif;
        height: 100%;
        min-height: 100vh;
        margin: 0;
        padding: 0;
    }

    .futuristic-bg-outer {
        width: 100vw;
        min-height: 100vh;
        position: fixed;
        top: 0; left: 0;
        z-index: -1;
        /* Light gray gradient background */
        background: linear-gradient(135deg, #f4f6f8 0%, #e9ecef 100%);
        background-repeat: no-repeat;
        background-attachment: fixed;
    }
    .futuristic-bg-inner {
        position: relative;
        z-index: 1;
        background: linear-gradient(120deg, rgba(255,255,255,0.75) 0%, rgba(233,236,239,0.45) 100%);
        backdrop-filter: blur(8px) saturate(1.2);
        box-shadow: 0 8px 32px 0 #adb5bd22;
        padding-left: 2vw;
        padding-right: 2vw;
    }

    /* REMOVED - Conflicts with auth pages
    .btn-gradient {
        background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
        color: #fff !important;
        border: none;
        box-shadow: 0 2px 8px #dd247622;
        transition: background 0.2s, box-shadow 0.2s;
    }

        .btn-gradient:hover, .btn-gradient:focus {
            background: linear-gradient(90deg, #dd2476 0%, #ff512f 100%);
            color: #fff !important;
            box-shadow: 0 4px 16px #ff512f44;
        }
    */

    .glass-form {
        background: linear-gradient(120deg, rgba(255,255,255,0.22) 0%, rgba(221,36,118,0.10) 100%);
        backdrop-filter: blur(6px) saturate(1.2);
        border: 1.5px solid #dd247622;
    }

    .glass-card {
        background: linear-gradient(120deg, rgba(255,255,255,0.28) 0%, rgba(221,36,118,0.12) 100%);
        backdrop-filter: blur(8px) saturate(1.2);
        border-radius: 1.5rem;
        border: 1.5px solid #dd247622;
        box-shadow: 0 4px 32px 0 #dd247622, 0 1.5px 8px 0 #ff512f11;
        transition: box-shadow 0.2s, border 0.2s, transform 0.2s;
    }

        .glass-card:hover {
            box-shadow: 0 8px 48px 0 #ff512f44, 0 2px 12px 0 #dd247644;
            border: 1.5px solid #ff512fcc;
            transform: scale(1.03);
        }

    .media-thumb {
        box-shadow: 0 2px 12px 0 #dd247622;
        border-radius: 0.8rem;
        transition: box-shadow 0.2s;
    }

        .media-thumb:hover {
            box-shadow: 0 4px 24px 0 #ff512f44;
        }

    .text-gradient {
        background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .card-title {
        font-weight: 700;
        font-size: 1.15rem;
        letter-spacing: 0.01em;
    }

    .badge.bg-gradient {
        background: linear-gradient(90deg, #ffe0ec 0%, #f8fafc 100%);
        color: #222 !important;
        font-weight: 500;
    }

    #img-preview-popup {
        pointer-events: none;
        transition: opacity 0.15s;
    }

    #img-preview-popup-img {
        display: block;
    }

    .futuristic-photo-list-scroll {
        max-height: 70vh;
        overflow-y: auto;
    }

    .form-control, .form-select {
        border-radius: 1rem;
        background: rgba(255,255,255,0.7);
        border: 1.5px solid #dd247622;
        transition: border 0.2s, box-shadow 0.2s;
    }

        .form-control:focus, .form-select:focus {
            border: 1.5px solid #ff512fcc;
            box-shadow: 0 0 0 0.15rem #ff512f44;
        }

    .input-group-text {
        background: rgba(221,36,118,0.08);
        border: none;
        color: #dd2476;
        font-weight: 600;
    }

    .pagination .page-link {
        border-radius: 0.75rem !important;
        color: #dd2476;
        border: none;
        background: rgba(255,255,255,0.7);
        margin: 0 0.15rem;
        transition: background 0.2s, color 0.2s;
    }

        .pagination .page-item.active .page-link,
        .pagination .page-link:hover {
            background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
            color: #fff;
        }

    .media-title {
        color: #fff !important;
        text-shadow: 0 2px 8px #2228, 0 1px 0 #0004;
    }

    .media-desc {
        color: #f8f9fa !important;
        text-shadow: 0 1px 4px #2226;
    }
    .footer-gradient {
        /* Use the same gradient as your main theme (navbar, buttons, etc.) */
        background: linear-gradient(90deg, #ff512f 0%, #dd2476 100%);
        position: relative;
        width: 100%;
        bottom: 0;
        left: 0;
        z-index: 10;
        color: #fff;
    }

        .footer-gradient .text-white {
            color: #fff !important;
        }

    @@media (max-width: 575.98px) {
        .footer-gradient {
            font-size: 0.95rem;
        }
    }

}

/* Fix: Ensure navbar has proper left/right spacing and does not touch the edge */

/* Only target the main navbar, not all .container-fluid */
.modern-navbar .container-fluid {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

@media (min-width: 576px) {
    .modern-navbar .container-fluid {
        padding-left: 2rem !important;
        padding-right: 2rem !important;
    }
}

@media (min-width: 1400px) {
    .modern-navbar .container-fluid {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

@media (min-width: 1920px) {
    .modern-navbar .container-fluid {
        padding-left: 4rem !important;
        padding-right: 4rem !important;
    }
}

/* Remove global override for all .container-fluid that causes edge issue */
.container-fluid {
    padding-left: unset !important;
    padding-right: unset !important;
}

/* ...existing code... */

/* Online/Offline Notification - Glassy with Animated Red Laser Border */
.connection-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(30, 60, 114, 0.25); /* Blueish transparent */
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 12px;
    border: 2px solid rgba(255, 59, 48, 0.3); /* Red border */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-size: 14px;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    overflow: hidden;
}

/* Static glowing stroke around edges */
.connection-notification::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    background: rgba(255, 59, 48, 0.3);
    border-radius: 12px;
    z-index: -1;
    opacity: 0;
    box-shadow: 0 0 15px rgba(255, 59, 48, 0.6),
                inset 0 0 15px rgba(255, 59, 48, 0.3);
}

.connection-notification.show::before {
    opacity: 1;
}

.connection-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.connection-notification.offline {
    background: rgba(211, 47, 47, 0.25); /* Red-tinted glass when offline */
    border-color: rgba(255, 59, 48, 0.5);
}

.connection-notification.online {
    background: rgba(46, 125, 50, 0.25); /* Green-tinted glass when online */
    border-color: rgba(76, 175, 80, 0.5);
}

.connection-notification.online::before {
    background: rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 15px rgba(76, 175, 80, 0.6),
                inset 0 0 15px rgba(76, 175, 80, 0.3);
}

.connection-notification i {
    font-size: 18px;
    filter: drop-shadow(0 0 4px currentColor);
}

@media (max-width: 600px) {
    .connection-notification {
        bottom: 10px;
        font-size: 13px;
        padding: 10px 20px;
    }
}