/* ═══════════════════════════════════════
   LUXURY SPINNER WHEEL — STYLE
   Theme: Deep Navy #062037 + Gold #C9A96E
════════════════════════════════════════ */

:root {
    --navy-deepest: #041525;
    --navy-deep: #062037;
    --navy-dark: #0A3158;
    --gold: #C9A96E;
    --gold-light: #E2D1A0;
    --gold-pale: #F5EDD8;
}

/* --- LUXURY ROUND BADGE --- */
.zayyora-round-badge {
    position: fixed;
    bottom: 170px;
    right: 17px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    cursor: pointer;
    filter: drop-shadow(0 8px 24px rgba(6, 32, 55, 0.4));
    transition: transform 0.3s ease;
}

.zayyora-round-badge:hover { transform: scale(1.1); }

.inner-circle {
    width: 100%;
    height: 100%;
    background: var(--navy-deep);
    border-radius: 50%;
    border: 1px solid var(--gold);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.luxury-gif-loader {
    width: 60px;
    height: 60px;
    animation: spin-wheel 4s linear infinite;
    transition: animation-duration 0.5s ease-in-out;
    filter: hue-rotate(10deg) brightness(1.1);
}

.inner-circle:hover .luxury-gif-loader { animation-duration: 0.5s; }

@keyframes spin-wheel {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.badge-text-wrap {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: center;
    position: absolute;
}

.b-text-top {
    color: var(--gold);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 1.5px;
}

.b-text-bot {
    color: #ffffff;
    font-size: 7px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-ring {
    position: absolute;
    inset: -5px;
    border: 1px dashed var(--gold);
    border-radius: 50%;
    animation: spinRing 15s linear infinite;
}

@keyframes spinRing { to { transform: rotate(360deg); } }


/* --- MODAL OVERLAY --- */
.spinner-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 21, 37, 0.85);
    backdrop-filter: blur(18px) saturate(180%);
    z-index: 99999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeInModal 0.4s ease;
}

@keyframes fadeInModal {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* --- SPINNER CARD --- */
.spinner-card {
    background: #ffffff;
    width: 100%;
    max-width: 1050px;
    border-radius: 20px;
    display: grid;
    overflow: hidden;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--gold-pale);
    position: relative;
}

.spinner-grid { 
    display: grid; 
    grid-template-columns: 1.1fr 0.9fr; 
}

/* --- WHEEL SIDE --- */
.spinner-left { 
    background: var(--navy-deepest); 
    padding: 60px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    position: relative;
    overflow: hidden; 
}

.wheel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1 / 1; 
}

#wheelCanvas {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 7s cubic-bezier(0.15, 0.85, 0.15, 1); 
}

.wheel-pointer {
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 30px solid var(--gold);
    z-index: 100;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

#spin-action-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18%; 
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: var(--navy-deep);
    border: 3px solid var(--gold);
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: clamp(12px, 2vw, 18px); 
    cursor: pointer;
    z-index: 101;
    transition: all 0.3s ease;
    box-shadow: 0 0 0 6px rgba(201, 169, 110, 0.2);
}

#spin-action-btn:hover:not(:disabled) {
    background: var(--gold);
    color: var(--navy-deep);
    transform: translate(-50%, -50%) scale(1.05);
}

#spin-action-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* --- CONTENT SIDE --- */
.spinner-right { 
    padding: 70px 60px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
    overflow-y: auto;
    max-height: 90vh;
}

.gold-subtitle { 
    color: var(--gold); 
    text-transform: uppercase; 
    letter-spacing: 3px; 
    font-size: 11px; 
    font-weight: 700; 
    font-family: 'Jost', sans-serif;
}

.premium-title { 
    font-family: 'Cinzel', serif; 
    font-size: clamp(28px, 4vw, 42px); 
    color: var(--navy-deep); 
    margin: 15px 0; 
    font-weight: 400; 
    letter-spacing: -0.5px;
}

.spins-status { 
    color: #5A8FAD; 
    font-size: 15px; 
    line-height: 1.6; 
    margin-bottom: 30px; 
    font-family: 'Cormorant Garamond', serif;
}

/* --- PROFESSIONAL WIN CARD --- */
.result-card { 
    background: var(--navy-deep); 
    padding: 40px; 
    text-align: center; 
    color: #fff; 
    margin-bottom: 30px; 
    border-radius: 16px;
    border: 1px solid rgba(201, 169, 110, 0.3);
    box-shadow: 0 10px 30px rgba(6, 32, 55, 0.15);
    animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.win-banner { 
    color: var(--gold); 
    font-size: 12px; 
    letter-spacing: 4px; 
    text-transform: uppercase; 
    margin-bottom: 15px; 
    font-family: 'Jost', sans-serif;
}

.result-card h3 {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    color: #fff;
    margin-bottom: 15px;
}

.bespoke-note { 
    font-size: 13px; 
    opacity: 0.7; 
    margin-bottom: 15px; 
    font-family: 'Cormorant Garamond', serif;
}

.coupon-box { 
    display: flex; 
    border: 1px solid rgba(201, 169, 110, 0.3);
    background: var(--navy-deepest); 
    border-radius: 8px;
    overflow: hidden;
}

.coupon-box code { 
    padding: 15px; 
    font-family: 'Jost', sans-serif; 
    letter-spacing: 2px; 
    font-size: 1rem; 
    flex: 1; 
    color: var(--gold); 
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.luxury-copy-btn { 
    background: var(--gold); 
    color: var(--navy-deep); 
    border: none; 
    padding: 0 25px; 
    font-weight: 700; 
    font-size: 12px; 
    cursor: pointer; 
    transition: 0.3s;
    font-family: 'Jost', sans-serif;
    letter-spacing: 1px;
    min-height: 50px;
}

.luxury-copy-btn:hover { background: var(--gold-light); }

/* --- HISTORY LIST --- */
.history-container { margin-top: auto; }

.history-title { 
    font-size: 11px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: #94afc4; 
    margin-bottom: 20px; 
    border-bottom: 1px solid #dfe8f0; 
    padding-bottom: 10px; 
    font-family: 'Jost', sans-serif;
}

.history-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 12px 0; 
    border-bottom: 1px solid #f0f4f8; 
    font-size: 13px; 
    font-family: 'Cormorant Garamond', serif;
    animation: fadeIn 0.4s ease;
}

.history-item span { color: var(--navy-deep); }
.history-item strong { color: #8a7040; letter-spacing: 1px; font-family: 'Jost', sans-serif;}

.close-spinner-btn { 
    position: absolute; 
    top: 20px; 
    right: 24px; 
    font-size: 32px; 
    border: none; 
    background: none; 
    cursor: pointer; 
    color: var(--navy-deep);
    z-index: 200; /* Keep above wheel */
    transition: transform 0.2s;
    line-height: 1;
}
.close-spinner-btn:hover { transform: rotate(90deg); color: var(--gold); }

/* --- CONFETTI CANVAS --- */
#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    pointer-events: none; 
}

/* ── RESPONSIVE ──────────────────────────────── */

@media (max-width: 900px) {
    .spinner-grid { grid-template-columns: 1fr; }
     .spinner-card{
        max-height: calc(100vh - 40px);
        overflow-y: auto;
        overflow-x: hidden;

        /* smooth scroll */
        -webkit-overflow-scrolling: touch;
    }
    .spinner-left { padding: 40px 20px 20px; }
    .spinner-right { padding: 40px 30px; max-height: unset; }
    .premium-title { font-size: 32px; }
    
    .close-spinner-btn {
        color: #fff;
        top: 15px;
        right: 15px;
    }
}
@media (max-width: 768px) {
    .zayyora-round-badge.show-on-home {
        bottom: 132px;
        right: 14px;
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 480px) {
    .spinner-overlay {
        padding: 0;
        align-items: flex-end; /* Rise from bottom */
    }

    .spinner-card {
        border-radius: 24px 24px 0 0;
        max-height: 95vh;
        overflow-y: auto;
    }

    .spinner-left { 
        padding: 30px 15px 15px; /* Reduced padding for wheel */
    }

    /* Cap wheel size so it's not huge and squished */
    .wheel-container {
        max-width: 300px;
        margin: 0 auto;
    }

    .wheel-pointer {
        top: -2px;
        border-left-width: 12px;
        border-right-width: 12px;
        border-top-width: 24px;
    }

    #spin-action-btn {
        width: 70px; /* Fixed small size for mobile */
        height: 70px;
        font-size: 14px;
    }

    .spinner-right { 
        padding: 20px 20px 30px; 
    }

    .premium-title { 
        font-size: 24px; 
    }

    .gold-subtitle {
        font-size: 10px;
    }
    
    .result-card { 
        padding: 20px 15px; /* Less horizontal padding */
    }
    
    .result-card h3 { 
        font-size: 22px; 
    }

    .bespoke-note {
        font-size: 12px;
        margin-bottom: 12px;
    }
    
    /* Stack Coupon Code & Button vertically on mobile */
    .coupon-box { 
        flex-direction: column;
        border-radius: 8px;
    }

    .coupon-box code { 
        padding: 12px; 
        font-size: 0.9rem; 
        letter-spacing: 1px;
        justify-content: center;
        text-align: center;
        width: 100%;
    }

    .luxury-copy-btn { 
        padding: 12px; 
        min-height: 44px; 
        width: 100%;
        border-radius: 0 0 7px 7px;
    }

    .zayyora-round-badge.show-on-home {
        bottom: 110px;
        right: 10px;
        width: 40px;
        height: 40px;
    }

    .zayyora-round-badge.show-on-home .luxury-gif-loader {
        width: 50px;
        height: 50px;
    }
}
/* ── SPINNER BADGE: Hide on mobile/tablet except home page ── */
@media (max-width: 1024px) {
    .zayyora-round-badge {
        display: none;
    }

    .zayyora-round-badge.show-on-home {
        display: block;
    }
    
}
