:root {
    color-scheme: dark;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #f5f7fb;
    background: #070B18;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 24px;
    background: radial-gradient(circle at top left, rgba(47, 127, 255, 0.18), transparent 26%),
        radial-gradient(circle at bottom right, rgba(167, 86, 255, 0.14), transparent 25%),
        linear-gradient(180deg, #02040c 0%, #070b18 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 40%, rgba(255, 255, 255, 0.04) 100%);
    pointer-events: none;
}

.container {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px;
    border-radius: 32px;
    background: rgba(8, 14, 30, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(22px);
}

.glass-card {
    background: rgba(14, 22, 46, 0.78);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03), 0 20px 50px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(18px);
}

h1 {
    margin: 0 0 18px;
    font-size: clamp(2rem, 3vw, 3.2rem);
    text-align: center;
    letter-spacing: -0.04em;
    color: #f8fbff;
    text-shadow: 0 8px 40px rgba(33, 150, 243, 0.22);
}

.zone-label {
    margin: 0 0 12px;
    display: block;
    text-align: center;
    color: #91b7ff;
    font-size: 1rem;
    letter-spacing: 0.04em;
}

.top-panel {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px;
    margin-bottom: 28px;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.date-reference {
    padding: 22px 24px;
    margin-bottom: 26px;
    border-radius: 24px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-items: center;
    justify-items: stretch;
}

.date-display,
.date-clock {
    margin: 0;
    color: #e8eeff;
    font-size: 0.96rem;
    line-height: 1.4;
    min-width: 0;
}

.date-clock {
    justify-self: end;
}

.date-display.secondary {
    color: #aabeff;
}

.date-clock {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
    color: #7df2ff;
    font-size: 1.05rem;
    font-weight: 700;
    text-align: right;
}

.date-clock::before {
    content: '🕒';
    font-size: 1rem;
}

@media (max-width: 720px) {
    .date-reference {
        grid-template-columns: 1fr;
    }
    .date-clock {
        justify-content: flex-start;
    }
}

label {
    display: block;
    margin-bottom: 10px;
    color: #b3c0ff;
    font-weight: 600;
}

.zone-selector {
    position: relative;
    width: 100%;
    overflow: visible;
}

.zone-toggle {
    width: 100%;
    padding: 14px 18px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: #eef4ff;
    font-size: 1rem;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.zone-toggle::after {
    content: '▾';
    font-size: 0.88rem;
    color: #a8c9ff;
}

.zone-toggle:focus,
.zone-toggle:hover {
    outline: none;
    border-color: rgba(82, 193, 255, 0.75);
    box-shadow: 0 0 0 4px rgba(82, 193, 255, 0.12);
}

.zone-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    padding: 10px 0;
    border-radius: 22px;
    background: rgba(12, 18, 36, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 999;
}

.zone-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.zone-item {
    width: 100%;
    padding: 14px 18px;
    border: none;
    background: transparent;
    color: #eef4ff;
    font-size: 0.96rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease;
}

.zone-item:hover,
.zone-item:focus {
    background: rgba(82, 193, 255, 0.14);
    color: #ffffff;
    outline: none;
}

.zone-item.selected {
    color: #7df2ff;
}

#prayer-times {
    margin-top: 30px;
    padding: 26px;
    border-radius: 24px;
    background: rgba(15, 25, 53, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

#prayer-times h2,
#countdown h2 {
    margin: 0 0 18px;
    font-size: 1.3rem;
    color: #dce6ff;
}

#prayer-times ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}

#prayer-times li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: transform 0.2s ease;
}

#prayer-times li:hover {
    transform: translateY(-2px);
    border-color: rgba(82, 193, 255, 0.18);
}

#prayer-times li.active-prayer {
    background: rgba(71, 111, 255, 0.18);
    border-color: rgba(125, 221, 255, 0.4);
    box-shadow: 0 0 28px rgba(125, 221, 255, 0.12);
}

#prayer-times li span {
    font-weight: 700;
    color: #edf4ff;
}

#countdown {
    margin-top: 0;
    padding: 26px 24px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(18, 36, 70, 0.92), rgba(9, 12, 29, 0.92));
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.countdown-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.countdown-item {
    flex: 1 1 220px;
    min-width: 180px;
}

#current-prayer,
#next-prayer {
    margin: 0;
    color: #e5f7ff;
    font-size: 1.05rem;
    font-weight: 600;
    line-height: 1.4;
}

#next-prayer {
    text-align: right;
    color: #c9d6ff;
}

#countdown-timer {
    margin: 0;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #7df2ff;
    text-align: center;
    text-shadow: 0 0 20px rgba(125, 242, 255, 0.7);
    animation: pulseGlow 1.6s ease-in-out infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        text-shadow: 0 0 18px rgba(125, 242, 255, 0.6), 0 0 28px rgba(125, 242, 255, 0.3);
        transform: scale(1);
    }

    50% {
        text-shadow: 0 0 22px rgba(125, 242, 255, 0.9), 0 0 36px rgba(125, 242, 255, 0.5);
        transform: scale(1.02);
    }
}

@media (max-width: 640px) {
    body {
        padding: 16px;
    }

    .container {
        padding: 24px;
    }

    #prayer-times,
    #countdown {
        padding: 20px;
    }

    #countdown-timer {
        font-size: 2.5rem;
    }
}