:root {
    --bg: #081120;
    --bg-soft: #101c31;
    --panel: rgba(8, 17, 32, 0.74);
    --panel-strong: rgba(11, 22, 42, 0.92);
    --surface: rgba(255, 255, 255, 0.07);
    --surface-strong: rgba(255, 255, 255, 0.11);
    --border: rgba(255, 255, 255, 0.12);
    --text: #eef4ff;
    --muted: #b9c6dd;
    --accent: #f5b942;
    --accent-strong: #ffcf70;
    --success: #73e2b3;
    --danger: #ff908c;
    --shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Cairo", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(245, 185, 66, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(115, 226, 179, 0.14), transparent 25%),
        linear-gradient(160deg, var(--bg), var(--bg-soft));
    padding: 24px;
    overflow-x: hidden;
}

.background-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
    opacity: 0.45;
}

.orb-1 {
    top: 4%;
    right: 3%;
    width: 240px;
    height: 240px;
    background: rgba(245, 185, 66, 0.18);
}

.orb-2 {
    bottom: 8%;
    left: 4%;
    width: 280px;
    height: 280px;
    background: rgba(115, 226, 179, 0.12);
}

.app-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 24px;
}

.hero-panel,
.content-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.hero-panel {
    display: grid;
    grid-template-columns: 1.35fr 0.85fr;
    gap: 24px;
    padding: 32px;
}

.eyebrow,
.focus-tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.92rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.eyebrow {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
}

.hero-copy h1 {
    margin: 18px 0 10px;
    font-size: clamp(2.1rem, 5vw, 4rem);
    line-height: 1.05;
}

.hero-copy p {
    margin: 0;
    max-width: 650px;
    color: var(--muted);
    line-height: 1.9;
    font-size: 1rem;
}

.search-bar {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: var(--muted);
    font-size: 0.95rem;
}

.field input {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    padding: 16px 18px;
    font: inherit;
    outline: none;
    transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.field input:focus {
    border-color: rgba(245, 185, 66, 0.5);
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-1px);
}

.btn {
    border: 0;
    border-radius: 18px;
    padding: 16px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.22s ease, opacity 0.22s ease, box-shadow 0.22s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #1b2438;
    box-shadow: 0 12px 30px rgba(245, 185, 66, 0.22);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-row {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.status-card,
.focus-panel,
.prayer-card,
.mini-meta div {
    border-radius: 24px;
    border: 1px solid var(--border);
}

.status-card {
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
}

.status-label {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.status-card strong {
    font-size: 1.18rem;
}

.focus-panel {
    background:
        linear-gradient(180deg, rgba(245, 185, 66, 0.16), rgba(255, 255, 255, 0.04)),
        var(--panel-strong);
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100%;
}

.focus-tag {
    color: #ffe2a3;
    background: rgba(245, 185, 66, 0.12);
}

.focus-panel h2 {
    margin: 18px 0 8px;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.focus-time {
    font-size: clamp(2.4rem, 6vw, 4.4rem);
    font-weight: 800;
    color: var(--accent);
    line-height: 1;
}

.focus-note {
    margin: 14px 0 0;
    color: var(--muted);
    line-height: 1.8;
}

.mini-meta {
    margin-top: 24px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.mini-meta div {
    background: rgba(255, 255, 255, 0.06);
    padding: 16px;
}

.mini-meta span {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.content-panel {
    padding: 28px 32px 32px;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 22px;
}

.panel-kicker {
    margin: 0 0 6px;
    color: var(--accent);
    font-size: 0.95rem;
}

.panel-head h3 {
    margin: 0;
    font-size: 1.6rem;
}

.loading-text {
    margin: 0;
    color: var(--muted);
}

.error-box {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 144, 140, 0.12);
    border: 1px solid rgba(255, 144, 140, 0.22);
    color: #ffd6d4;
}

.hidden {
    display: none;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.prayer-card {
    position: relative;
    overflow: hidden;
    padding: 22px 18px;
    background: rgba(255, 255, 255, 0.05);
    transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease;
}

.prayer-card:hover {
    transform: translateY(-4px);
    border-color: rgba(245, 185, 66, 0.28);
    background: rgba(255, 255, 255, 0.075);
}

.prayer-card.active {
    background: linear-gradient(180deg, rgba(245, 185, 66, 0.18), rgba(255, 255, 255, 0.05));
    border-color: rgba(245, 185, 66, 0.36);
}

.prayer-card.active::before {
    content: "القادمة";
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(245, 185, 66, 0.18);
    color: #ffe3aa;
    font-size: 0.78rem;
}

.prayer-name {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 18px;
}

.prayer-time {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 12px;
}

.prayer-detail {
    color: #d7e2f5;
    font-size: 0.95rem;
}

.skeleton {
    min-height: 170px;
    background:
        linear-gradient(110deg, rgba(255, 255, 255, 0.05) 8%, rgba(255, 255, 255, 0.12) 18%, rgba(255, 255, 255, 0.05) 33%),
        rgba(255, 255, 255, 0.04);
    background-size: 200% 100%;
    animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
    to {
        background-position-x: -200%;
    }
}

@media (max-width: 1040px) {
    .hero-panel {
        grid-template-columns: 1fr;
    }

    .prayer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    body {
        padding: 14px;
    }

    .hero-panel,
    .content-panel {
        padding: 20px;
        border-radius: 24px;
    }

    .search-bar,
    .status-row,
    .mini-meta,
    .prayer-grid {
        grid-template-columns: 1fr;
    }

    .panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .prayer-card.active::before {
        position: static;
        display: inline-block;
        margin-bottom: 14px;
    }
}
