:root {
    --bg1: #f7f2ea;
    --bg2: #ede3d3;
    --card: rgba(255, 255, 255, 0.76);
    --text: #6c5a49;
    --gold: #c6a96b;
    --gold-dark: #a78143;
    --gold-light: #dfc58f;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.12);
    --border: rgba(198, 169, 107, 0.18);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    overflow-x: hidden;

    /* Фон с фото мечети */
    background:
        linear-gradient(rgba(247, 242, 234, 0.72), rgba(237, 227, 211, 0.78)),
        url("XXXL.jpeg") center center / cover no-repeat fixed;
}

.page {
    position: relative;
    min-height: 100vh;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(198, 169, 107, 0.10), transparent 30%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.15), transparent 28%);
}

.bg-orb {
    position: fixed;
    z-index: 0;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    filter: blur(30px);
    pointer-events: none;
}

.bg-orb-1 {
    top: -80px;
    left: -80px;
    background: rgba(198, 169, 107, 0.12);
}

.bg-orb-2 {
    right: -90px;
    bottom: -90px;
    background: rgba(255, 255, 255, 0.22);
}

.card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    padding: 42px 30px 30px;
    border-radius: 30px;
    background: var(--card);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    animation: fadeIn 1.1s ease;
    overflow: hidden;
}

.ornament {
    position: relative;
    width: 100%;
    height: 34px;
    margin: 0 auto 18px;
}

.ornament::before,
.ornament::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 48px);
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
}

.ornament::before {
    left: 0;
}

.ornament::after {
    right: 0;
}

.ornament-top::after,
.ornament-bottom::after {
    content: "✦ ◌ ✦";
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--gold);
    font-size: 16px;
    letter-spacing: 6px;
    background: rgba(255,255,255,0.55);
    padding: 0 10px;
}

.ornament-bottom {
    margin-top: 24px;
    margin-bottom: 0;
}

.moon {
    font-size: clamp(42px, 6vw, 54px);
    color: var(--gold);
    margin-bottom: 8px;
    text-shadow: 0 0 18px rgba(198, 169, 107, 0.18);
    animation: glow 3s ease-in-out infinite alternate;
    user-select: none;
}

.intro {
    margin: 0 auto 16px;
    max-width: 520px;
    font-size: clamp(16px, 2.1vw, 19px);
    line-height: 1.9;
    color: #6f5e4c;
}

h1 {
    margin: 6px 0 12px;
    font-family: 'Playfair Display', serif;
    font-size: clamp(34px, 5.3vw, 56px);
    line-height: 1.08;
    color: var(--gold);
    letter-spacing: 0.4px;
    text-shadow: 0 1px 0 rgba(255,255,255,0.45);
}

h2 {
    margin: 0 0 18px;
    font-size: clamp(18px, 2.5vw, 24px);
    font-weight: 400;
    color: #7a6653;
}

.details {
    max-width: 540px;
    margin: 0 auto;
    padding: 18px 18px;
    background: rgba(255,255,255,0.58);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.65);
}

.detail-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 0;
    font-size: clamp(15px, 2vw, 18px);
    line-height: 1.5;
}

.detail-row + .detail-row {
    border-top: 1px dashed rgba(198, 169, 107, 0.18);
}

.icon {
    width: 26px;
    text-align: center;
    flex: 0 0 auto;
}

.gold {
    color: var(--gold-dark);
    font-weight: 700;
}

.countdown {
    margin-top: 26px;
}

.countdown-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(20px, 3vw, 28px);
    color: #7b6550;
    margin-bottom: 14px;
}

.timer {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.time-box {
    padding: 14px 8px;
    border-radius: 18px;
    background: rgba(255,255,255,0.68);
    border: 1px solid rgba(198, 169, 107, 0.16);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.05);
}

.time-value {
    display: block;
    font-size: clamp(24px, 4vw, 38px);
    font-weight: 700;
    line-height: 1;
    color: var(--gold-dark);
}

.time-label {
    display: block;
    margin-top: 7px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8b7764;
}

.status {
    margin-top: 12px;
    font-size: 14px;
    color: #9a8a7a;
    min-height: 20px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 26px;
}

.btn {
    appearance: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
    min-width: 190px;
    padding: 13px 22px;
    border-radius: 18px;
    background: linear-gradient(180deg, var(--gold), #b99555);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    box-shadow: 0 12px 22px rgba(198, 169, 107, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 26px rgba(198, 169, 107, 0.32);
    background: linear-gradient(180deg, var(--gold-dark), #99743a);
}

.btn:active {
    transform: translateY(0);
}

.footer {
    margin-top: 28px;
    font-size: clamp(15px, 2vw, 17px);
    line-height: 1.8;
    color: #7b6755;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    from {
        opacity: 0.65;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1.04);
    }
}

/* Tablet */
@media (max-width: 900px) {
    .page {
        padding: 18px;
    }

    .card {
        max-width: 92vw;
        padding: 34px 22px 24px;
        border-radius: 26px;
    }

    .timer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Phone */
@media (max-width: 560px) {
    .page {
        padding: 12px;
        align-items: flex-start;
    }

    .card {
        max-width: 100%;
        padding: 26px 16px 20px;
        border-radius: 22px;
    }

    .intro {
        line-height: 1.75;
    }

    .details {
        padding: 14px 12px;
        border-radius: 18px;
    }

    .detail-row {
        justify-content: flex-start;
        text-align: left;
        font-size: 15px;
    }

    .timer {
        gap: 10px;
    }

    .time-box {
        padding: 12px 6px;
        border-radius: 14px;
    }

    .btn {
        width: 100%;
        min-width: 0;
    }

    .button-row {
        flex-direction: column;
        gap: 10px;
    }

    .ornament::before,
    .ornament::after {
        width: calc(50% - 36px);
    }
}

/* Very small phones */
@media (max-width: 360px) {
    h1 {
        letter-spacing: 0;
    }

    .time-label {
        font-size: 11px;
    }
}
