/* ============================================================
   God's Promises Wheel — Stylesheet
   ============================================================ */

/* ── Button ─────────────────────────────────────────────── */
.gpw-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 1rem;
}

.gpw-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem 2.4rem;
    font-size: 1.15rem;
    font-weight: 700;
    font-family: Georgia, 'Times New Roman', serif;
    letter-spacing: 0.03em;
    color: #ffffff;
    border: none;
    border-radius: 60px;
    cursor: pointer;
    background: linear-gradient(135deg, #6a11cb 0%, #b721ff 40%, #ff6a00 80%, #ee0979 100%);
    background-size: 200% 200%;
    animation: gpw-btn-gradient 4s ease infinite;
    box-shadow:
        0 4px 20px rgba(106, 17, 203, 0.45),
        0 0 0 0 rgba(183, 33, 255, 0);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.3s ease;
    overflow: hidden;
}

.gpw-button::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 60%);
    border-radius: inherit;
    pointer-events: none;
}

.gpw-button:hover:not(:disabled) {
    transform: translateY(-3px) scale(1.03);
    box-shadow:
        0 8px 30px rgba(106, 17, 203, 0.55),
        0 0 0 6px rgba(183, 33, 255, 0.18);
}

.gpw-button:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.gpw-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    animation: none;
    background-position: 0 0;
}

.gpw-btn-icon {
    display: inline-block;
    animation: gpw-sparkle 1.8s ease-in-out infinite alternate;
}

.gpw-btn-icon:last-child {
    animation-delay: 0.9s;
}

@keyframes gpw-btn-gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes gpw-sparkle {
    from { transform: scale(1) rotate(-10deg); opacity: 0.8; }
    to   { transform: scale(1.3) rotate(10deg); opacity: 1; }
}

/* ── Overlay / Modal ─────────────────────────────────────── */
.gpw-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(10, 5, 30, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: gpw-fade-in 0.35s ease forwards;
    padding: 1rem;
}

.gpw-overlay[hidden] {
    display: none !important;
}

@keyframes gpw-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gpw-modal {
    position: relative;
    width: 100%;
    max-width: 500px;
    background: linear-gradient(160deg, #0f0524 0%, #1a063a 50%, #0a1040 100%);
    border-radius: 24px;
    padding: 2rem 1.8rem 1.6rem;
    box-shadow:
        0 0 0 1px rgba(255,255,255,0.08),
        0 30px 80px rgba(0,0,0,0.7),
        0 0 60px rgba(140, 0, 255, 0.25);
    animation: gpw-slide-up 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    overflow: hidden;
}

/* starfield shimmer */
.gpw-modal::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1px 1px at 15% 20%, rgba(255,255,255,0.6) 0%, transparent 100%),
        radial-gradient(1px 1px at 75% 10%, rgba(255,255,255,0.4) 0%, transparent 100%),
        radial-gradient(1px 1px at 40% 85%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 90% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 5%  70%, rgba(255,255,255,0.5) 0%, transparent 100%),
        radial-gradient(1px 1px at 55% 45%, rgba(255,255,255,0.3) 0%, transparent 100%),
        radial-gradient(1px 1px at 25% 55%, rgba(255,255,255,0.4) 0%, transparent 100%);
    pointer-events: none;
    border-radius: inherit;
}

@keyframes gpw-slide-up {
    from { opacity: 0; transform: translateY(40px) scale(0.92); }
    to   { opacity: 1; transform: translateY(0)   scale(1); }
}

/* ── Close button ────────────────────────────────────────── */
.gpw-close {
    position: absolute;
    top: 14px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s, transform 0.2s;
    z-index: 10;
}

.gpw-close:hover {
    background: rgba(255,255,255,0.18);
    border-color: rgba(255,255,255,0.55);
    transform: rotate(90deg) scale(1.1);
}

/* ── Countdown bar ───────────────────────────────────────── */
.gpw-countdown-bar {
    width: 100%;
    height: 5px;
    border-radius: 99px;
    background: rgba(255,255,255,0.1);
    overflow: hidden;
}

.gpw-timer-fill {
    height: 100%;
    width: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #a855f7, #ec4899, #f97316, #facc15);
    transform-origin: left center;
    transition: transform 1s linear;
}

/* ── Wheel container ─────────────────────────────────────── */
.gpw-wheel-container {
    position: relative;
    width: 420px;
    height: 420px;
    max-width: 100%;
}

#gpw-canvas {
    display: block;
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.5));
    transition: filter 0.6s ease;
}

/* ── Promise card (shown inside wheel when stopped) ──────── */
.gpw-center-promise {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2.2rem 1.8rem;
    gap: 0.6rem;
    animation: gpw-promise-appear 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.gpw-center-promise[hidden] {
    display: none !important;
}

@keyframes gpw-promise-appear {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}

.gpw-promise-number {
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(255,200,100,0.75);
    background: rgba(255,200,100,0.12);
    border: 1px solid rgba(255,200,100,0.3);
    border-radius: 99px;
    padding: 0.2em 0.8em;
}

.gpw-promise-text {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: clamp(0.95rem, 2.5vw, 1.15rem);
    font-style: italic;
    line-height: 1.6;
    color: #ffffff;
    text-shadow: 0 0 30px rgba(200, 130, 255, 0.6);
}

.gpw-promise-ref {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #f9a8d4;
    margin-top: 0.3rem;
}

/* ── Tagline ─────────────────────────────────────────────── */
.gpw-tagline {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.82rem;
    color: rgba(200, 180, 255, 0.6);
    text-align: center;
    margin: 0;
    letter-spacing: 0.04em;
}

.gpw-tagline em {
    font-style: italic;
    color: rgba(249, 168, 212, 0.9);
}

/* ── Responsive tweaks ───────────────────────────────────── */
@media (max-width: 520px) {
    .gpw-modal {
        padding: 1.5rem 1rem 1.2rem;
        border-radius: 18px;
    }
    .gpw-wheel-container {
        width: 310px;
        height: 310px;
    }
}

@media (max-width: 360px) {
    .gpw-wheel-container {
        width: 270px;
        height: 270px;
    }
    .gpw-button {
        font-size: 0.95rem;
        padding: 0.9rem 1.6rem;
    }
}
