*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
    height: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #111111;
    color: #e5e5e5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Sale Bar ─────────────────────────── */
.salebar {
    background: #1a1a1a;
    border-bottom: 1px solid #2a2a2a;
    padding: 9px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    color: #999;
}
.salebar strong { color: #e5e5e5; }
.salebar button {
    background: none;
    border: 1px solid #3a3a3a;
    color: #e5e5e5;
    padding: 5px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: background .15s, border-color .15s;
    white-space: nowrap;
}
.salebar button:hover {
    background: #222;
    border-color: #555;
}

/* ── Main (100vh fill) ────────────────── */
.main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
}

.card {
    width: 100%;
    max-width: 640px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Top row ──────────────────────────── */
.top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.city-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
}
.city-row svg { flex-shrink: 0; }
.city-row select {
    background: transparent;
    border: none;
    color: #e5e5e5;
    font-size: 15px;
    font-family: inherit;
    font-weight: 500;
    outline: none;
    cursor: pointer;
    appearance: auto;
}

.dates {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}
.sep { opacity: .4; }

/* ── Countdown ────────────────────────── */
.countdown {
    text-align: center;
    padding: 24px 0;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
}
.countdown-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #555;
    margin-bottom: 8px;
}
.countdown-label span { color: #aaa; }
.countdown-time {
    font-size: clamp(2.2rem, 8vw, 3.2rem);
    font-weight: 700;
    letter-spacing: 6px;
    color: #d1fae5;
    font-variant-numeric: tabular-nums;
}

/* ── For Sale Box ─────────────────────── */
.forsale-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: #111a14;
    border: 1px solid #1f3327;
    border-left: 3px solid #4ade80;
    border-radius: 8px;
    padding: 14px 18px;
}
.forsale-left {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #aaa;
}
.forsale-left strong { color: #e5e5e5; }
.forsale-dot {
    width: 7px;
    height: 7px;
    background: #4ade80;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(74,222,128,.5);
    animation: blink 2.5s ease-in-out infinite;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: .3; }
}
.forsale-sub {
    display: block;
    font-size: 12px;
    color: #555;
    margin-top: 2px;
}
.forsale-btn {
    background: none;
    border: 1px solid #2d4a38;
    color: #86efac;
    font-size: 13px;
    font-weight: 500;
    padding: 7px 16px;
    border-radius: 6px;
    white-space: nowrap;
    transition: background .15s, border-color .15s, color .15s;
}
.forsale-btn:hover {
    background: #1a2e20;
    border-color: #3d6b4a;
    color: #bbf7d0;
}

/* ── Prayer Grid ──────────────────────── */
.prayers {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
}

.p {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: 8px;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s;
}
.p:hover {
    background: #1a1a1a;
}
.p-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #555;
    font-weight: 500;
}
.p-time {
    font-size: 1.25rem;
    font-weight: 600;
    color: #e5e5e5;
    font-variant-numeric: tabular-nums;
}

.p.active-prayer {
    background: #111a14;
    border-color: #1f3327;
}
.p.active-prayer .p-name { color: #86efac; }
.p.active-prayer .p-time { color: #d1fae5; }

/* ── Footer ───────────────────────────── */
.footer {
    padding: 14px 24px;
    border-top: 1px solid #1e1e1e;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    color: #444;
    flex-wrap: wrap;
    text-align: center;
}
.footer a:hover { color: #888; }

/* ── Modal Overlay ────────────────────── */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .2s, visibility .2s;
}
.overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: #191919;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 440px;
    position: relative;
    transform: translateY(8px);
    transition: transform .2s;
}
.overlay.active .modal {
    transform: translateY(0);
}

.close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: #555;
    font-size: 16px;
    line-height: 1;
    padding: 4px 8px;
    transition: color .15s;
}
.close-btn:hover { color: #aaa; }

.modal h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #fff;
}
.modal-sub {
    font-size: 13px;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}
.modal-sub strong { color: #aaa; }

.field {
    margin-bottom: 14px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.field label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.field input,
.field textarea {
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 6px;
    padding: 10px 12px;
    color: #e5e5e5;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: border-color .15s;
    resize: vertical;
}
.field input:focus,
.field textarea:focus {
    border-color: #444;
}

.channel-label {
    font-size: 12px;
    color: #555;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin: 20px 0 10px;
}

.channel-btns {
    display: flex;
    gap: 10px;
}

.ch-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #2a2a2a;
    transition: background .15s, border-color .15s;
}

.ch-wa {
    background: #1a2e1f;
    color: #4ade80;
    border-color: #1e3a24;
}
.ch-wa:hover {
    background: #1e3a24;
    border-color: #2d5434;
}

.ch-mail {
    background: #1a1f2e;
    color: #93c5fd;
    border-color: #1e2a3a;
}
.ch-mail:hover {
    background: #1e2a3a;
    border-color: #2a3f56;
}

/* ── Responsive ───────────────────────── */
@media (max-width: 600px) {
    .prayers {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .p { padding: 14px 6px; }
    .p-time { font-size: 1.1rem; }
    .dates { display: none; }
    .top-row { justify-content: flex-start; }
    .channel-btns { flex-direction: column; }
    .modal { padding: 24px 20px; }
    .forsale-box { flex-direction: column; align-items: flex-start; gap: 12px; }
    .forsale-btn { width: 100%; text-align: center; }
}
