/* ==================== */
/* BASE STYLES & RESETS */
/* ==================== */

/* ==========================================
   HEADER SECTION - SIMPLE CLEAN DESIGN
   Shared across all pages
   ========================================== */

.page-title {
    font-size: 2rem !important;
    font-weight: 700 !important;
    color: #f1f5f9 !important;
    letter-spacing: 3px !important;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    text-transform: uppercase !important;
    margin-bottom: 0.25rem !important;
}

.page-subtitle {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #6c757d !important;
    letter-spacing: 2px !important;
    text-transform: uppercase !important;
    margin-bottom: 0.5rem !important;
}

/* Clock Section - Simple Style */
.clock-display-section {
    background: #f8f9fa !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem 1rem !important;
    margin: 0.5rem auto !important;
    max-width: 350px !important;
    border: 1px solid #dee2e6 !important;
}

.clock-display-section #brunei-clock,
.clock-display-section .clock-time {
    font-size: 1.5rem !important;
    font-weight: 600 !important;
    color: #212529 !important;
    letter-spacing: 1px !important;
    display: block !important;
}

.clock-display-section #next-prayer-timer,
.clock-display-section .next-prayer {
    font-size: 1rem !important;
    font-weight: 500 !important;
    color: #198754 !important;
    margin-top: 0.25rem !important;
}

.clock-display-section #timelapse-after-current,
.clock-display-section .timelapse {
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    color: #1e293b !important;
    margin-top: 0.25rem !important;
}

@media (prefers-color-scheme: dark) {
    .clock-display-section #timelapse-after-current,
    .clock-display-section .timelapse {
        color: #e2e8f0 !important;
    }
}

/* Mobile responsive for header */
@media (max-width: 767.98px) {
    .page-title {
        font-size: 1.25rem !important;
        letter-spacing: 2px !important;
    }

    .page-subtitle {
        font-size: 0.75rem !important;
        letter-spacing: 1px !important;
    }

    .clock-display-section {
        padding: 0.5rem 0.75rem !important;
        max-width: 100% !important;
        margin: 0.25rem 0.5rem !important;
        border-radius: 0.375rem !important;
    }

    .clock-display-section #brunei-clock,
    .clock-display-section .clock-time {
        font-size: 1.1rem !important;
        letter-spacing: 1px !important;
    }

    .clock-display-section #next-prayer-timer,
    .clock-display-section .next-prayer {
        font-size: 0.9rem !important;
    }

    .clock-display-section #timelapse-after-current,
    .clock-display-section .timelapse {
        font-size: 0.8rem !important;
    }
}

/* =============== */
/* LAYOUT & STRUCTURE */
/* =============== */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

.bg-thumb-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    max-width: 100%;
    padding-bottom: 0.5rem;
}

/* ============= */
/* UI COMPONENTS */
/* ============= */

/* Background Thumbnails */
.bg-thumb {
    width: 60px;
    height: 40px;
    object-fit: cover;
    border: 2px solid #fff;
    border-radius: 16px;
    margin: 0 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: border 0.2s, box-shadow 0.2s;
    flex: 0 0 auto;
}

    .bg-thumb.selected {
        border: 2px solid #0d6efd;
        box-shadow: 0 0 0 3px #0d6efd33;
    }

/* Prayer Cards */
.prayer-card-modern {
    background: rgba(255,255,255,0.18);
    border-radius: var(--card-radius, 1.25rem);
    transition: transform 0.2s, box-shadow 0.2s;
    opacity: 0.95;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    backdrop-filter: blur(95px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 2px solid rgba(13,110,253,0.25);
    border-image: linear-gradient(120deg, #0d6efd 10%, #6f42c1 60%, #00e0ff 100%);
    border-image-slice: 1;
    letter-spacing: -0.5px;
    line-height: 1.1;
    padding: 0.5rem;
}

    .prayer-card-modern:hover {
        transform: translateY(-8px) scale(1.03);
        box-shadow: 0 12px 36px rgba(13,110,253,0.18);
        border-color: #6f42c1;
    }

.prayer-card-today {
    background-color: #ffe082 !important; /* A visible yellow highlight */
    border: 2px solid #ffb300 !important; /* A strong amber border */
}

/* Prayer List Items */
.list-group-item {
    font-size: clamp(2.4rem, 4vw, 3.3rem);
    padding: 0.0rem 0.3rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease, color 0.2s ease, text-shadow 0.2s;
    color: var(--prayer-list-color, #222);
    text-shadow: var(--prayer-list-shadow, none);
    border-radius: 1.5rem;
}

.list-group-item2 {
    font-size: clamp(2.0rem, 2vw, 3.3rem);
    padding: 0.0rem 0.3rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease, color 0.2s ease, text-shadow 0.2s;
    color: var(--prayer-list-color, #222);
    text-shadow: var(--prayer-list-shadow, none);
    border-radius: 1.5rem;
}

.list-group-item1 {
    font-size: clamp(1.9rem, 1vw, 2.5rem);
    padding: 0.0rem 1.9rem;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: background 0.2s ease, color 0.2s ease, text-shadow 0.2s;
    color: var(--prayer-list-color, #222);
    text-shadow: var(--prayer-list-shadow, none);
    border-radius: 1.5rem;
}

.prayer-now {
    background: linear-gradient(90deg, #e0ffe0 0%, #c0f7ff 100%) !important;
    font-weight: bold;
    color: #0d6efd !important;
    border-left: 5px solid #0d6efd;
    box-shadow: 0 0 12px 2px #0d6efd33;
    animation: glow 1.2s infinite alternate, pulse-border 2s infinite;
}

/* Timer Cards */
#next-prayer-timer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.timer-card {
    background: rgba(255, 255, 255, 0.85);
    border-radius: 2.2rem 1.2rem 2.2rem 1.2rem / 1.5rem 2.5rem 1.5rem 2.5rem;
    padding: 0.8rem 1.2rem;
    min-width: 80px;
    text-align: center;
    box-shadow: 0 6px 24px rgba(13, 110, 253, 0.18), 0 1.5px 0 #6f42c1;
    border: 2.5px solid transparent;
    background-clip: padding-box;
    position: relative;
    overflow: hidden;
}

    .timer-card::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 0;
        border-radius: inherit;
        padding: 2px;
        background: linear-gradient(120deg, #0d6efd 10%, #6f42c1 60%, #00e0ff 100%);
        -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
        -webkit-mask-composite: xor;
        mask-composite: exclude;
        pointer-events: none;
    }

.timer-value {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #0d6efd, #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.timer-label {
    font-size: 1rem;
    color: #6f42c1;
    font-weight: 600;
    margin-top: 0.3rem;
}

/* Card styles moved to inline @section in Today.cshtml */

.icon-glass {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0d6efd 60%, #6f42c1 100%);
    box-shadow: 0 2px 8px #0d6efd33;
}

/* ============= */
/* TYPOGRAPHY */
/* ============= */
.modern-gradient-text {
    font-family: 'Montserrat', 'Poppins', Arial, sans-serif !important;
    background: linear-gradient(120deg, #0d6efd 10%, #6f42c1 60%, #00e0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    letter-spacing: 2px;
    filter: brightness(1.2) contrast(1.3) drop-shadow(0 2px 8px #fff) drop-shadow(0 0 12px #0d6efd99);
    text-shadow: 0 2px 16px #fff, 0 0 8px #0d6efd, 0 0 2px #fff;
}

.auto-contrast-glow {
    color: #fff !important;
    text-shadow: 0 2px 1px #0d6efd, 0 0 8px #0d6efd, 0 0 2px #fff !important;
    position: relative;
}

.modern-gradient-text-blue {
    background: linear-gradient(90deg, #2196f3 0%, #0d47a1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

h2 {
    background: linear-gradient(90deg, #0d6efd, #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
    margin-bottom: 1rem;
}

h4 {
    background: linear-gradient(90deg, #0d6efd, #6f42c1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============= */
/* UTILITY CLASSES */
/* ============= */
.gradient-line {
    width: 100%;
    height: 0.5px;
    border: none;
    margin: 0.1rem 0;
    background: linear-gradient(90deg, #0d6efd 0%, #6f42c1 100%);
}

.fancy-link {
    color: #0d6efd;
    font-weight: bold;
    text-decoration: none;
    background: linear-gradient(90deg, #0d6efd 0%, #6f42c1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

    .fancy-link:hover {
        color: #6f42c1;
        text-shadow: 0 0 8px #6f42c1, 0 0 2px #fff;
    }

.auto-contrast {
    transition: color 0.3s, text-shadow 0.3s;
}

.clock-glow {
    color: #0d6efd;
    text-shadow: 0 0 8px #0d6efd66, 0 0 2px #fff;
    letter-spacing: 2px;
}

.custom-footer {
    background: transparent !important;
    box-shadow: none !important;
}

/* ============= */
/* ANIMATIONS */
/* ============= */
@keyframes glow {
    from {
        box-shadow: 0 0 12px 2px #0d6efd33;
    }

    to {
        box-shadow: 0 0 24px 6px #0d6efd66;
    }
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 4px 24px 0 #0d6efd33, 0 1.5px 0 #6f42c1;
    }

    50% {
        box-shadow: 0 8px 32px 4px #6f42c155, 0 2.5px 0 #0d6efd;
    }

    100% {
        box-shadow: 0 4px 24px 0 #0d6efd33, 0 1.5px 0 #6f42c1;
    }
}

/* ============= */
/* RESPONSIVE STYLES */
/* ============= */
@media (max-width: 767px) {
    .prayer-card-modern {
        border-radius: var(--card-radius-sm, 0.75rem) !important;
    }

    .container {
        padding: 1rem !important;
    }

    #next-prayer-timer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .timer-card {
        padding: 0.6rem 1rem;
        min-width: 70px;
        border-radius: 1.2rem 2rem 1.2rem 2rem !important;
    }

    .timer-value {
        font-size: 2rem;
    }

    .holiday-glass-card {
        border-radius: 1.5rem !important;
    }

    .icon-glass {
        width: 40px;
        height: 40px;
    }

    .bg-thumb-row {
        justify-content: center;
    }
}
@media (min-width: 1024px) and (max-width: 1366px) {
    .modern-navbar .container-fluid {
        padding-left: 2.5rem !important;
        padding-right: 2.5rem !important;
    }
    .navbar {
        font-size: 1.15rem;
        min-height: 64px;
    }
    .navbar-brand {
        font-size: 1.5rem;
    }
    .navbar-nav .nav-link {
        padding-left: 1.2rem;
        padding-right: 1.2rem;
        font-size: 1.15rem;
    }
}
@media (min-width: 1367px) {
    .modern-navbar .container-fluid {
        padding-left: 3rem !important;
        padding-right: 3rem !important;
    }
}

/* ============= */
/* LOGOUT MODERN PAGE */
/* ============= */
.logout-glass-card {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.18);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 1.25rem;
    border: 1px solid rgba(255,255,255,0.18);
    max-width: 400px;
    margin: 0 auto;
    padding: 2.5rem 2rem 2rem 2rem;
}
.logout-progress {
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(90deg, #1e90ff 0%, #00c6ff 100%);
    width: 0;
    transition: width 2.5s linear;
}
.logout-spinner {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1.2rem;
}
.logout-message {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1.2rem;
    letter-spacing: 0.01em;
}

/* ============= */
/* ADMIN MENU LINK */
/* ============= */
.admin-link {
    background: linear-gradient(90deg, #fffbe6 0%, #ffe082 100%);
    border-radius: 0.75rem;
    color: #b28704 !important;
    font-family: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.08);
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    letter-spacing: 0.02em;
}
.admin-link:hover, .admin-link:focus {
    background: linear-gradient(90deg, #ffe082 0%, #ffd54f 100%);
    color: #7c5a00 !important;
    box-shadow: 0 4px 16px rgba(255, 193, 7, 0.18);
    text-decoration: none;
}
.admin-link i {
    font-size: 1.2rem;
    vertical-align: middle;
}
/* Add or update this CSS to ensure dropdowns appear above info alerts */
.dropdown-menu {
    z-index: 1050 !important;
}
.container.main-content {
    margin-top: 0 !important;
    padding-top: 1.5rem !important;
}
/***** Ensure navbar and dropdowns are always above alerts and content *****/
.navbar,
.navbar *,
.dropdown-menu {
    z-index: 1060 !important;
    position: relative;
}
/* Optionally, lower z-index for alerts if needed */
.alert {
    z-index: 100 !important;
    position: relative;
}

/* Ensure Bootstrap modals appear above navbar (navbar is forced to z-index 1060) */
.modal-backdrop {
    z-index: 1070 !important;
}
.modal {
    z-index: 1080 !important;
}

.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;
    }
}

/* main.css */
.responsive-title {
    font-size: clamp(2rem, 4vw, 4rem); /* Responsive between 2rem and 4rem */
    font-family: var(--dynamic-font, 'Montserrat', sans-serif);
}

.responsive-subtitle {
    font-size: clamp(1.2rem, 2vw, 2.2rem);
    font-family: var(--dynamic-font, 'Montserrat', sans-serif);
}

/* Add or update this class for a more glassy effect */
.glassy-blur-bg {
    background: rgba(30, 30, 40, 0.28);
    border-radius: 1.5rem;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.25);
    backdrop-filter: blur(18px) saturate(180%);
    -webkit-backdrop-filter: blur(18px) saturate(180%);
    border: 1.5px solid rgba(255,255,255,0.22);
    border-image: linear-gradient(120deg, #fff 10%, #0d6efd 60%, #6f42c1 100%);
    border-image-slice: 1;
    opacity: 0.98;
    transition: box-shadow 0.3s, background 0.3s, border 0.3s;
}

.blur-bg,
.bg-thumbnail-scroll,
.holiday-glass-card,
.next-prayer-card,
.prayer-card-modern,
.logout-glass-card,
#todayTipsCard,
#prayerTrackerCard {
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    background: rgba(255,255,255,0.82);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Crisp vibrant text on all cards — render above glass blur */
.blur-bg *,
.bg-thumbnail-scroll *,
.holiday-glass-card *,
.next-prayer-card *,
.prayer-card-modern *,
.logout-glass-card *,
#todayTipsCard *,
#prayerTrackerCard *,
.countdown-container *,
.countdown-cards * {
    position: relative;
    z-index: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Optional: add a subtle inner shadow for more depth */
.glassy-blur-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: 0 0 32px 8px rgba(255,255,255,0.08) inset;
}

/* Example usage:
   <div class="glassy-blur-bg"> ... </div>
   or add glassy-blur-bg to your main prayer container
*/

/* Optionally, you can add the same classes here if you use .prayer-name or .prayer-time in main.css context */
.prayer-contrast-dark {
    color: #222 !important;
    text-shadow: 0 2px 8px #fff, 0 1px 0 #fff !important;
}
.prayer-contrast-light {
    color: #fff !important;
    text-shadow: 0 2px 8px #222, 0 1px 0 #000 !important;
}

/* Sticky footer — flex column layout, applies on all screen sizes */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    /* Rich vibrant dark gradient background */
    background: linear-gradient(135deg, #0d111c 0%, #111a2e 30%, #0f2440 60%, #0c1a38 100%);
}
.main-content {
    flex: 1 0 auto;
}
@media (max-width: 768px) {
    footer {
        position: relative !important;
        width: 100%;
        bottom: 0 !important;
        left: 0 !important;
        margin-top: 2rem !important;
        margin-bottom: 0 !important;
        z-index: 10;
        display: block;
        clear: both;
    }
}
@media (max-width: 767.98px) {
    .media-search-form {
        transition: max-height 0.3s, opacity 0.3s, padding 0.3s, margin 0.3s;
        overflow: hidden;
        max-height: 0 !important;
        opacity: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        pointer-events: none;
    }
    .media-search-form.show {
        max-height: 1000px !important;
        opacity: 1 !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        margin-bottom: 2rem !important;
        pointer-events: auto;
    }
    .media-search-toggle {
        display: inline-block !important;
    }
}
@media (min-width: 768px) {
    .media-search-form {
        max-height: none !important;
        opacity: 1 !important;
        margin-bottom: 2rem !important;
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
        pointer-events: auto;
    }
    .media-search-toggle {
        display: none !important;
    }
}

/* Add or update this at the end of your main.css for thin-stroke buttons */
.btn,
.btn-gradient,
.btn-outline-secondary,
.btn-outline-light,
.btn-outline-primary,
.btn-outline-danger {
    border-width: 1px !important;
    border-style: solid !important;
}

/* Enhanced Bootstrap-based Login/Logout Button Styles */
.btn-login, .btn-logout {
    background: linear-gradient(90deg, #0d6efd 0%, #2563eb 100%);
    color: #fff !important;
    font-weight: 700;
    border: none;
    border-radius: 0.5rem;
    padding: 0.55rem 1.7rem;
    box-shadow: 0 4px 18px 0 #0d6efd33, 0 1.5px 0 #6f42c1;
    letter-spacing: 0.03em;
    font-size: 1.08rem;
    transition: background 0.18s, box-shadow 0.18s, transform 0.12s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-login {
    background: linear-gradient(90deg, #fff 0%, #e7f1ff 100%);
    color: #0d6efd !important;
    border: 1.5px solid #0d6efd;
    box-shadow: 0 2px 8px 0 #0d6efd11;
}

.btn-login:hover, .btn-login:focus {
    background: linear-gradient(90deg, #e7f1ff 0%, #d0e2ff 100%);
    color: #084298 !important;
    box-shadow: 0 6px 24px 0 #0d6efd22;
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}

.btn-logout:hover, .btn-logout:focus {
    background: linear-gradient(90deg, #2563eb 0%, #0d6efd 100%);
    color: #fff !important;
    box-shadow: 0 8px 32px 0 #0d6efd33;
    transform: translateY(-2px) scale(1.04);
    text-decoration: none;
}

/* Use this for the Logout button */
form.asp-area-identity-logout {
    display: inline;
}

form.asp-area-identity-logout button {
    background: linear-gradient(90deg, #0d6efd 0%, #2563eb 100%);
    color: #fff !important;
    font-weight: 600;
    border: none;
    border-radius: 0.4rem;
    padding: 0.5rem 1.5rem;
    box-shadow: 0 2px 8px 0 #0d6efd22;
    transition: background 0.2s, box-shadow 0.2s;
}

form.asp-area-identity-logout button:hover,
form.asp-area-identity-logout button:focus {
    background: linear-gradient(90deg, #2563eb 0%, #0d6efd 100%);
    color: #fff !important;
    box-shadow: 0 4px 16px 0 #0d6efd33;
    text-decoration: none;
}

/* Use this for the Login button */
.asp-area-identity-login {
    display: inline-block;
    background: linear-gradient(90deg, #ffffff, #f8f9fa);
    color: #0d6efd;
    font-weight: 500;
    border: 1px solid #0d6efd;
    border-radius: 0.4rem;
    padding: 0.5rem 1.5rem;
    text-align: center;
    transition: background 0.2s, color 0.2s;
}

.asp-area-identity-login:hover,
.asp-area-identity-login:focus {
    background: linear-gradient(90deg, #e7f1ff, #ced4da);
    color: #0056b3;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}