/* ==============================================================
   Halal Village — Raffle (festive)
   ==============================================================
   This stylesheet is only loaded on the raffle page (via @push),
   so we can safely override body/mainx to make the dark gradient
   bleed under the navbar — eliminates the visible band between
   the navbar and the wrap.
*/
body {
    background: linear-gradient(180deg, #0e1729 0%, #1a2240 60%, #0e1729 100%) fixed !important;
}

[data-theme="light"] body {
    background: linear-gradient(180deg, #fff8ec 0%, #fff 60%, #f5fbf6 100%) fixed !important;
}

/* mainx must be transparent so the body gradient shows under the nav padding */
.mainx {
    background: transparent !important;
}

/* Hide the noise overlay on this page so the gradient stays clean */
body::before { display: none !important; }

.rf-wrap {
    position: relative;
    overflow: hidden;
    /* Negative margin pulls the wrap up under .mainx's padding-top so the
       wrap's radial accents extend right up to the navbar with no seam. */
    margin-top: calc(-1 * var(--nav-h, 80px));
    padding: calc(40px + var(--nav-h, 80px)) 0 80px;
    background:
        radial-gradient(ellipse at top, rgba(180, 140, 100, .18), transparent 55%),
        radial-gradient(ellipse at bottom, rgba(39, 114, 69, .18), transparent 55%),
        linear-gradient(180deg, #0e1729 0%, #1a2240 60%, #0e1729 100%);
    color: #fff;
    min-height: 100vh;
}

[data-theme="light"] .rf-wrap {
    background:
        radial-gradient(ellipse at top, rgba(180, 140, 100, .25), transparent 55%),
        radial-gradient(ellipse at bottom, rgba(39, 114, 69, .14), transparent 55%),
        linear-gradient(180deg, #fff8ec 0%, #fff 60%, #f5fbf6 100%);
    color: var(--ink, #0f172a);
}

.rf-inner {
    position: relative;
    z-index: 2;
}

/* Stars (background animation) ---------------------------------- */
.rf-stars {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.rf-star {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffd700 0%, rgba(255, 215, 0, 0) 70%);
    transform: scale(var(--s));
    animation: rf-twinkle var(--d) ease-in-out infinite;
    animation-delay: var(--delay);
    opacity: 0.7;
}

@keyframes rf-twinkle {
    0%, 100% { opacity: 0.2; transform: scale(calc(var(--s) * 0.6)); }
    50%      { opacity: 1;   transform: scale(var(--s)); }
}

/* Hero ---------------------------------------------------------- */
.rf-hero {
    text-align: center;
    margin-bottom: 28px;
}

.rf-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, rgba(255, 215, 0, .22), rgba(180, 140, 100, .22));
    border: 1.5px solid rgba(255, 215, 0, .55);
    color: #ffe282;
    padding: 8px 18px;
    border-radius: 999px;
    font-weight: 1000;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    backdrop-filter: blur(6px);
}

.rf-hero-badge-icon {
    font-size: 1.1rem;
    animation: rf-bounce 1.4s ease-in-out infinite;
}

@keyframes rf-bounce {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-4px); }
}

.rf-hero-title {
    font-weight: 1000;
    font-size: clamp(2.2rem, 6vw, 4rem);
    margin: 18px 0 10px;
    background: linear-gradient(135deg, #ffd700 0%, #ffaf36 50%, #b48c64 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 20px rgba(255, 215, 0, .25);
    letter-spacing: 1px;
    line-height: 1.1;
}

.rf-hero-sub {
    font-weight: 700;
    color: rgba(255, 255, 255, .8);
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
    line-height: 1.6;
}

[data-theme="light"] .rf-hero-sub { color: var(--muted, #6b7280); }

/* Stats --------------------------------------------------------- */
.rf-stats {
    display: flex;
    justify-content: center;
    gap: 18px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.rf-stat {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 215, 0, .25);
    border-radius: 18px;
    padding: 14px 26px;
    min-width: 130px;
    backdrop-filter: blur(8px);
}

[data-theme="light"] .rf-stat {
    background: var(--card-bg-stack);
    border: var(--card-border);
    box-shadow: var(--shadow-sm);
}

.rf-stat-num {
    font-size: 2rem;
    font-weight: 1000;
    color: #ffd700;
    line-height: 1;
}

[data-theme="light"] .rf-stat-num { color: var(--brand-gold, #b48c64); }

.rf-stat-label {
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 6px;
    color: rgba(255, 255, 255, .7);
}

[data-theme="light"] .rf-stat-label { color: var(--muted, #6b7280); }

/* Current winner ------------------------------------------------ */
.rf-current-winner {
    position: relative;
    text-align: center;
    margin: 28px auto 26px;
    max-width: 640px;
    padding: 28px 24px;
    background:
        linear-gradient(135deg, rgba(255, 215, 0, .12), rgba(180, 140, 100, .08)) padding-box,
        linear-gradient(
            135deg,
            var(--card-grad-from) 0%,
            var(--card-grad-mid) 55%,
            var(--card-grad-to) 100%
        ) border-box;
    border: var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.rf-current-winner-glow {
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at center, rgba(255, 215, 0, .22), transparent 60%);
    animation: rf-glow-rotate 8s linear infinite;
    pointer-events: none;
}

@keyframes rf-glow-rotate {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.rf-current-winner-trophy {
    position: relative;
    font-size: 3.5rem;
    margin-bottom: 8px;
    animation: rf-trophy-bounce 2s ease-in-out infinite;
}

@keyframes rf-trophy-bounce {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    50%      { transform: translateY(-6px) rotate(3deg); }
}

.rf-current-winner-label {
    position: relative;
    font-weight: 900;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 13px;
    margin-bottom: 4px;
}

.rf-current-winner-name {
    position: relative;
    font-weight: 1000;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    background: linear-gradient(135deg, #ffd700, #fff8e0, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 6px 0;
}

.rf-current-winner-meta {
    position: relative;
    font-weight: 700;
    color: rgba(255, 255, 255, .75);
    font-size: 13px;
}

[data-theme="light"] .rf-current-winner-meta { color: var(--muted, #6b7280); }

/* =================================================================
   Live name strip (festive marquee + draw spin)
   ================================================================= */
.rf-strip {
    position: relative;
    margin: 18px auto 28px;
    max-width: 1200px;
}

/* ---------------------------------------------------------------
   Timer pill (shown above the strip)
   --------------------------------------------------------------- */
.rf-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 18px auto 14px;
    padding: 10px 22px;
    background: rgba(255, 215, 0, .10);
    border: 1.5px solid rgba(255, 215, 0, .35);
    border-radius: 999px;
    font-weight: 900;
    font-size: clamp(13px, 1.6vw, 15px);
    color: #ffe9a8;
    letter-spacing: 1.5px;
    width: fit-content;
    transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}

[data-theme="light"] .rf-timer {
    color: var(--brand-gold, #b48c64);
    background: rgba(180, 140, 100, .10);
    border-color: rgba(180, 140, 100, .35);
}

.rf-timer.is-running {
    background: rgba(255, 215, 0, .18);
    border-color: #ffd700;
    box-shadow: 0 0 24px rgba(255, 215, 0, .35);
    animation: rf-timer-pulse 1s ease-in-out infinite;
}

.rf-timer.is-done {
    background: rgba(39, 114, 69, .18);
    border-color: #4ade80;
    color: #4ade80;
}

@keyframes rf-timer-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.03); }
}

.rf-timer-icon {
    font-size: 1.1em;
}

.rf-timer-label {
    text-transform: uppercase;
    opacity: .85;
}

.rf-timer-value {
    font-weight: 1000;
    font-size: 1.4em;
    color: #ffd700;
    min-width: 1.5em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

[data-theme="light"] .rf-timer-value { color: var(--brand-gold, #b48c64); }

.rf-timer.is-done .rf-timer-value { color: inherit; }

.rf-timer-unit {
    opacity: .8;
    font-weight: 800;
}

.rf-strip-frame {
    position: relative;
    height: clamp(110px, 15vw, 160px);
    background:
        linear-gradient(135deg, rgba(255, 215, 0, .04), rgba(180, 140, 100, .04)),
        rgba(0, 0, 0, .25);
    border: 2px solid rgba(255, 215, 0, .35);
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        inset 0 0 60px rgba(0, 0, 0, .35),
        0 18px 40px rgba(0, 0, 0, .35);
    transition: border-color .4s ease, box-shadow .4s ease;
}

[data-theme="light"] .rf-strip-frame {
    background:
        linear-gradient(135deg, rgba(255, 215, 0, .12), rgba(180, 140, 100, .08)),
        rgba(255, 255, 255, .85);
    border-color: rgba(180, 140, 100, .55);
    box-shadow:
        inset 0 0 30px rgba(180, 140, 100, .12),
        0 10px 26px rgba(0, 0, 0, .08);
}

.rf-strip.is-spinning .rf-strip-frame {
    border-color: #ffd700;
    box-shadow:
        inset 0 0 60px rgba(255, 215, 0, .25),
        0 0 50px rgba(255, 215, 0, .55),
        0 18px 40px rgba(0, 0, 0, .4);
}

.rf-strip.has-winner .rf-strip-frame {
    border-color: #ffd700;
    box-shadow:
        inset 0 0 80px rgba(255, 215, 0, .4),
        0 0 80px rgba(255, 215, 0, .65),
        0 18px 40px rgba(0, 0, 0, .4);
}

/* Edge fades */
.rf-strip-edge {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 18%;
    z-index: 3;
    pointer-events: none;
}

.rf-strip-edge-start {
    inset-inline-start: 0;
    background: linear-gradient(to right,
        rgba(14, 23, 41, 1),
        rgba(14, 23, 41, .85) 35%,
        rgba(14, 23, 41, 0));
}

.rf-strip-edge-end {
    inset-inline-end: 0;
    background: linear-gradient(to left,
        rgba(14, 23, 41, 1),
        rgba(14, 23, 41, .85) 35%,
        rgba(14, 23, 41, 0));
}

[data-theme="light"] .rf-strip-edge-start {
    background: linear-gradient(to right,
        rgba(255, 248, 236, 1),
        rgba(255, 248, 236, .85) 35%,
        rgba(255, 248, 236, 0));
}

[data-theme="light"] .rf-strip-edge-end {
    background: linear-gradient(to left,
        rgba(255, 248, 236, 1),
        rgba(255, 248, 236, .85) 35%,
        rgba(255, 248, 236, 0));
}

/* Center marker */
.rf-strip-marker {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    z-index: 4;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.rf-strip-marker-line {
    flex: 1;
    width: 4px;
    background: linear-gradient(180deg,
        transparent 0%,
        #ffd700 18%,
        #ffd700 82%,
        transparent 100%);
    box-shadow: 0 0 18px rgba(255, 215, 0, .85);
    border-radius: 2px;
}

.rf-strip-marker-arrow {
    color: #ffd700;
    font-size: 14px;
    text-shadow: 0 0 8px rgba(255, 215, 0, .9);
    line-height: 1;
}

.rf-strip-marker-arrow-top { transform: translateY(-2px); }
.rf-strip-marker-arrow-bot { transform: translateY(2px); }

/* Track + slots ------------------------------------------------- */
.rf-strip-track {
    display: flex;
    align-items: center;
    height: 100%;
    width: max-content;
    will-change: transform;
    /* Fast ambient scroll while idle — 3× faster than before.
       With ALL participants in 2 copies, every name passes through quickly. */
    animation: rf-strip-idle 16s linear infinite;
    transform: translateX(0);
}

@keyframes rf-strip-idle {
    /* 2 copies → one full copy = 50% of total width (seamless loop) */
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

.rf-strip-slot {
    flex: 0 0 auto;
    width: clamp(160px, 18vw, 260px);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    /* reduce paint cost — each slot composites independently */
    contain: layout paint;
}

/* keep idle slots cheap to render: solid color, no background-clip / shadow */
.rf-strip-name {
    font-weight: 1000;
    font-size: clamp(1.05rem, 2.4vw, 1.8rem);
    color: #ffe9a8;
    text-align: center;
    line-height: 1.15;
    letter-spacing: .3px;
    user-select: none;
    pointer-events: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

[data-theme="light"] .rf-strip-name {
    color: var(--brand-gold, #b48c64);
}

/* Winner-target slot (the one we'll spin to) glows even before lock-in */
.rf-strip-slot-target .rf-strip-name {
    color: #fff;
}

/* Winner slot lock-in (after the strip stops moving) */
.rf-strip-slot.is-winner {
    transform: scale(1.06);
    transition: transform .4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
}

.rf-strip-slot.is-winner .rf-strip-name {
    color: transparent;
    background: linear-gradient(180deg, #fff 0%, #fff8e0 50%, #ffd700 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 24px rgba(255, 215, 0, .9),
        0 0 50px rgba(255, 215, 0, .55);
    animation: rf-name-shimmer 2.2s linear infinite;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .rf-strip-track {
        animation: none;
    }
}

/* Admin bar ----------------------------------------------------- */
.rf-admin-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, .04);
    border: 1.5px dashed rgba(255, 215, 0, .4);
    border-radius: 14px;
    margin-bottom: 24px;
}

[data-theme="light"] .rf-admin-bar {
    background: rgba(180, 140, 100, .06);
    border-color: rgba(180, 140, 100, .4);
}

.rf-admin-bar-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 900;
    font-size: 13px;
    color: #ffd700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

[data-theme="light"] .rf-admin-bar-info { color: var(--brand-gold, #b48c64); }

.rf-admin-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ffd700;
    box-shadow: 0 0 0 4px rgba(255, 215, 0, .25);
    animation: rf-pulse 1.6s ease-in-out infinite;
}

@keyframes rf-pulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%      { transform: scale(1.3); opacity: .7; }
}

.rf-admin-bar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.rf-admin-bar-actions form { margin: 0; }

/* Buttons ------------------------------------------------------- */
.rf-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-weight: 1000;
    font-size: 14px;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, filter .2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rf-btn-icon { font-size: 1.15rem; }

.rf-btn-gold {
    background: linear-gradient(135deg, #ffd700, #ffaf36);
    color: #1a1208;
    box-shadow: 0 8px 24px rgba(255, 215, 0, .35);
}

.rf-btn-gold:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(255, 215, 0, .5);
    filter: brightness(1.05);
}

.rf-btn-gold:disabled {
    opacity: .55;
    cursor: not-allowed;
    box-shadow: none;
}

.rf-btn-ghost {
    background: rgba(255, 255, 255, .08);
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, .25);
}

[data-theme="light"] .rf-btn-ghost {
    background: rgba(0, 0, 0, .04);
    color: var(--ink, #0f172a);
    border-color: rgba(0, 0, 0, .12);
}

.rf-btn-ghost:hover {
    background: rgba(255, 255, 255, .14);
}

.rf-btn.is-drawing .rf-btn-icon {
    animation: rf-spin 0.6s linear infinite;
}

@keyframes rf-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =================================================================
   Participants pool — lightweight counter + chips wall
   (Replaces the heavy 300-card grid; ~31 simple elements)
   ================================================================= */
.rf-pool {
    margin: 36px auto 12px;
    text-align: center;
    max-width: 1100px;
}

.rf-pool-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 24px;
}

.rf-pool-counter {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    line-height: 1;
}

.rf-pool-num {
    font-weight: 1000;
    font-size: clamp(3.5rem, 9vw, 6.5rem);
    background: linear-gradient(135deg, #ffd700 0%, #ffaf36 50%, #fff8e0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: 1px;
    text-shadow: 0 6px 30px rgba(255, 215, 0, .35);
    /* Variable font numerics keep the count steady while animating */
    font-variant-numeric: tabular-nums;
}

[data-theme="light"] .rf-pool-num {
    background: linear-gradient(135deg, #b48c64 0%, #d4a373 60%, #b48c64 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

.rf-pool-plus {
    font-weight: 1000;
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: #ffd700;
    opacity: 0.7;
}

[data-theme="light"] .rf-pool-plus { color: var(--brand-gold, #b48c64); }

.rf-pool-label {
    font-weight: 900;
    font-size: clamp(14px, 1.6vw, 18px);
    color: rgba(255, 255, 255, .85);
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 6px;
}

[data-theme="light"] .rf-pool-label { color: var(--ink, #0f172a); }

/* Chips wall — flex-wrap of plain text pills (no shadows, no per-element animation) */
.rf-pool-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px 8px;
    border-top: 1px dashed rgba(255, 215, 0, .22);
}

[data-theme="light"] .rf-pool-chips {
    border-top-color: rgba(180, 140, 100, .28);
}

.rf-chip {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 999px;
    font-weight: 800;
    font-size: clamp(13px, 1.3vw, 15px);
    color: rgba(255, 255, 255, .82);
    background: rgba(255, 215, 0, .07);
    border: 1px solid rgba(255, 215, 0, .18);
    line-height: 1.2;
    white-space: nowrap;
    user-select: none;
}

[data-theme="light"] .rf-chip {
    color: var(--ink, #0f172a);
    background: rgba(180, 140, 100, .07);
    border-color: rgba(180, 140, 100, .25);
}

.rf-chip-more {
    color: #ffd700;
    background: rgba(255, 215, 0, .12);
    border-color: rgba(255, 215, 0, .35);
    font-weight: 1000;
}

[data-theme="light"] .rf-chip-more {
    color: var(--brand-gold, #b48c64);
    background: rgba(180, 140, 100, .14);
    border-color: rgba(180, 140, 100, .4);
}

/* Winner chip — only the chip whose data-id matches gets this */
.rf-chip.is-winner {
    color: #1a1208;
    background: linear-gradient(135deg, #ffd700, #ffaf36);
    border-color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 22px rgba(255, 215, 0, .55);
    transition: transform .35s cubic-bezier(0.18, 0.89, 0.32, 1.28), box-shadow .35s ease;
}

/* Empty state --------------------------------------------------- */
.rf-empty {
    text-align: center;
    padding: 60px 20px;
    background: rgba(255, 255, 255, .04);
    border: 1.5px dashed rgba(255, 255, 255, .15);
    border-radius: 18px;
}

[data-theme="light"] .rf-empty {
    background: var(--card-bg-stack);
    border: var(--card-border);
    box-shadow: var(--shadow-sm);
}

.rf-empty-icon { font-size: 3rem; display: block; margin-bottom: 10px; }
.rf-empty-text { font-weight: 800; color: rgba(255, 255, 255, .7); font-size: 1.05rem; }
[data-theme="light"] .rf-empty-text { color: var(--muted, #6b7280); }

/* =================================================================
   Full-screen winner overlay
   ================================================================= */
.rf-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity .5s ease;
}

.rf-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
}

.rf-overlay-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at center, rgba(255, 215, 0, .25), transparent 60%),
        rgba(8, 12, 24, .92);
    backdrop-filter: blur(8px);
}

.rf-overlay-rays {
    position: absolute;
    inset: 50% 50%;
    width: 200vmax;
    height: 200vmax;
    transform: translate(-50%, -50%);
    background:
        repeating-conic-gradient(
            from 0deg,
            rgba(255, 215, 0, .18) 0deg,
            rgba(255, 215, 0, .18) 6deg,
            transparent 6deg,
            transparent 14deg
        );
    animation: rf-rays-spin 22s linear infinite;
    opacity: 0;
    transition: opacity .8s ease .2s;
}

.rf-overlay.is-open .rf-overlay-rays { opacity: 1; }

@keyframes rf-rays-spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.rf-overlay-card {
    position: relative;
    text-align: center;
    padding: 40px 30px;
    max-width: 92vw;
    transform: scale(0.6);
    opacity: 0;
    transition: transform .6s cubic-bezier(.18, .89, .32, 1.28) .2s, opacity .5s ease .2s;
    z-index: 2;
}

.rf-overlay.is-open .rf-overlay-card {
    transform: scale(1);
    opacity: 1;
}

.rf-overlay-trophy {
    font-size: clamp(4rem, 10vw, 7rem);
    margin-bottom: 8px;
    filter: drop-shadow(0 8px 24px rgba(255, 215, 0, .6));
    animation: rf-trophy-bounce 2s ease-in-out infinite;
}

.rf-overlay-kicker {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #ffd700;
    font-weight: 1000;
    font-size: clamp(13px, 2vw, 16px);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.rf-overlay-star {
    font-size: 1.2em;
    animation: rf-twinkle 1.4s ease-in-out infinite;
}

.rf-overlay-name {
    font-weight: 1000;
    font-size: clamp(2.4rem, 8vw, 5.5rem);
    line-height: 1.1;
    margin: 6px 0 18px;
    background: linear-gradient(135deg, #ffd700 0%, #fffbea 30%, #ffd700 60%, #ffaf36 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 4px 30px rgba(255, 215, 0, .5);
    animation: rf-name-shimmer 3s linear infinite;
}

@keyframes rf-name-shimmer {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.rf-overlay-prize {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, .08);
    border: 1.5px solid rgba(255, 215, 0, .4);
    border-radius: 999px;
    padding: 10px 22px;
    color: #fff;
    font-weight: 900;
    font-size: clamp(14px, 2.5vw, 18px);
    backdrop-filter: blur(6px);
    margin-bottom: 14px;
}

.rf-kaaba { font-size: 1.4em; }

.rf-overlay-mabrouk {
    color: #ffd700;
    font-weight: 1000;
    font-size: clamp(1.1rem, 3vw, 1.6rem);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 24px;
}

.rf-overlay-close {
    margin-top: 10px;
}

/* Confetti ------------------------------------------------------ */
.rf-confetti {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.rf-confetti-piece {
    position: absolute;
    top: -20px;
    width: 10px;
    height: 14px;
    opacity: 0.9;
    animation: rf-fall var(--dur, 2.5s) linear forwards;
    animation-delay: var(--delay, 0s);
    transform-origin: center;
}

@keyframes rf-fall {
    0% {
        transform: translateY(-20vh) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(120vh) rotate(var(--rot, 360deg));
        opacity: 0.4;
    }
}

/* Reduced motion ------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
    .rf-card,
    .rf-hero-badge-icon,
    .rf-current-winner-trophy,
    .rf-overlay-trophy,
    .rf-current-winner-glow,
    .rf-overlay-rays,
    .rf-star,
    .rf-overlay-name { animation: none !important; }
}

/* =================================================================
   Mobile — most users will browse on phones
   ================================================================= */
@media (max-width: 600px) {
    .rf-wrap { padding: 22px 0 50px; }

    .rf-hero { margin-bottom: 18px; }
    .rf-hero-badge { font-size: 11px; padding: 6px 12px; letter-spacing: 1px; }
    .rf-hero-title { font-size: clamp(1.6rem, 8vw, 2.3rem); margin: 14px 0 6px; }
    .rf-hero-sub { font-size: 13px; line-height: 1.5; }

    .rf-stats { gap: 10px; margin-top: 16px; }
    .rf-stat { padding: 10px 14px; min-width: 100px; }
    .rf-stat-num { font-size: 1.5rem; }
    .rf-stat-label { font-size: 10px; letter-spacing: .5px; margin-top: 4px; }

    .rf-current-winner { margin: 18px auto; padding: 20px 14px; border-radius: 18px; }
    .rf-current-winner-trophy { font-size: 2.6rem; }
    .rf-current-winner-name { font-size: clamp(1.3rem, 6vw, 1.9rem); }

    .rf-timer {
        margin: 14px auto 10px;
        padding: 8px 14px;
        gap: 6px;
        font-size: 12px;
        letter-spacing: .5px;
    }
    .rf-timer-value { font-size: 1.3em; }

    .rf-strip { margin: 10px auto 18px; }
    .rf-strip-frame { height: clamp(72px, 16vw, 100px); border-radius: 14px; border-width: 1.5px; }
    .rf-strip-track { animation-duration: 14s; } /* slightly faster on mobile */
    .rf-strip-slot { width: clamp(130px, 28vw, 200px); padding: 0 10px; }
    .rf-strip-name { font-size: clamp(0.95rem, 3.5vw, 1.4rem); letter-spacing: 0; }

    .rf-strip-edge { width: 22%; }
    .rf-strip-marker-line { width: 3px; }
    .rf-strip-marker-arrow { font-size: 11px; }

    .rf-admin-bar { padding: 10px 12px; gap: 8px; margin-bottom: 18px; }
    .rf-btn { padding: 10px 18px; font-size: 12px; letter-spacing: .5px; }

    .rf-pool { margin: 22px auto 8px; }
    .rf-pool-header { gap: 2px; margin-bottom: 16px; }
    .rf-pool-num { font-size: clamp(2.6rem, 14vw, 4.5rem); }
    .rf-pool-plus { font-size: clamp(1.4rem, 7vw, 2.5rem); }
    .rf-pool-label { font-size: 12px; letter-spacing: 1.5px; }

    .rf-pool-chips { gap: 6px; padding: 14px 6px 6px; }
    .rf-chip { padding: 5px 11px; font-size: 12px; }

    .rf-overlay-card { padding: 30px 16px; }
    .rf-overlay-trophy { font-size: clamp(3rem, 14vw, 5rem); }
    .rf-overlay-kicker { font-size: 11px; letter-spacing: 2px; gap: 8px; }
    .rf-overlay-name { font-size: clamp(2rem, 11vw, 4rem); margin: 6px 0 14px; }
    .rf-overlay-prize { padding: 8px 14px; font-size: 13px; gap: 6px; }
    .rf-overlay-mabrouk { font-size: 1rem; letter-spacing: 1px; margin-bottom: 18px; }
}
