/* Extracted from templates/hud/_raffles_hero.html (07-10-2026): a static file the browser can cache. Edit here, not in the template. */
/* ===== Shared full hero (landing and every raffles page) ===== */
.raffles-hero {
    text-align: center;
    background-image: url('/imgs/headers/raffles_header_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: rgba(10, 13, 18, 0.92);
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: clamp(1.1rem, 2.2vw, 2rem) clamp(1rem, 2.5vw, 2rem);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #111;
    animation: rafflesGlow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.raffles-hero:hover {
    transform: none;
}

.raffles-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse 70% 75% at 50% 45%, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.18) 75%);
    z-index: 1;
}

@keyframes rafflesGlow {
    0%, 100% {
        box-shadow: 0 0 14px rgba(255, 123, 0, 0.45), 0 0 34px rgba(255, 77, 0, 0.22);
    }
    50% {
        box-shadow: 0 0 22px rgba(255, 20, 147, 0.32), 0 0 42px rgba(255, 123, 0, 0.25);
    }
}

.raffles-eyebrow {
    font-size: 1.12rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #ffb347;
    margin-bottom: 0.55rem;
    text-shadow: 0 0 2px rgba(0, 0, 0, 1), 0 2px 4px rgba(0, 0, 0, 1), 0 0 14px rgba(0, 0, 0, 0.85), 0 4px 10px rgba(0, 0, 0, 0.9);
    position: relative;
    z-index: 2;
}

.raffles-title {
    font-size: clamp(1.8rem, 3.6vw, 2.6rem);
    color: white;
    margin: 0 0 1rem 0;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 1),
                 0 4px 8px rgba(0, 0, 0, 0.95),
                 0 6px 12px rgba(0, 0, 0, 0.9),
                 0 8px 16px rgba(0, 0, 0, 0.85),
                 0 10px 20px rgba(0, 0, 0, 0.8);
    position: relative;
    z-index: 2;
}

.raffles-trust {
    list-style: none;
    margin: 0.15rem auto 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem 0.6rem;
    position: relative;
    z-index: 2;
}

.raffles-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.38rem 0.9rem 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 180, 92, 0.42);
    background: rgba(11, 16, 27, 0.84);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 209, 102, 0.06);
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.86rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    white-space: nowrap;
}

.raffles-trust-icon {
    flex: 0 0 auto;
    color: #ffb347;
    opacity: 0.9;
}

.raffles-trust-accent {
    color: #ffb347;
    font-weight: 700;
}

.raffles-global-totals {
    margin-top: 1.1rem;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    width: 100%;
    max-width: 980px;
    position: relative;
    z-index: 2;
}

.raffles-hero-getbasc {
    margin-top: 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.34rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 180, 92, 0.42);
    background: rgba(11, 16, 27, 0.84);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    color: #ffb347;
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    position: relative;
    z-index: 2;
    transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.raffles-hero-getbasc:hover,
.raffles-hero-getbasc:focus-visible {
    color: #fff6ea;
    border-color: rgba(255, 204, 132, 0.9);
    box-shadow: 0 0 14px rgba(255, 123, 0, 0.4);
    outline: none;
}

/* Hero totals: one accent per card; "paid" and "burned" carry a quiet living effect. */
.raffles-total-card {
    --total-accent: #ffb347;
    --total-accent-rgb: 255, 179, 71;
    position: relative;
    overflow: hidden;
    isolation: isolate;
    /* Content centred vertically when a neighbour's label wraps to two lines. */
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1px solid rgba(var(--total-accent-rgb), 0.34);
    border-radius: 14px;
    background:
        radial-gradient(120% 90% at 50% 120%, rgba(var(--total-accent-rgb), 0.12), transparent 60%),
        rgba(11, 16, 27, 0.9);
    padding: 0.78rem 0.8rem 0.72rem;
    box-shadow: var(--raffles-main-block-shadow, 0 0 12px rgba(0, 0, 0, 0.78), 0 8px 20px rgba(0, 0, 0, 0.62)), var(--raffles-main-block-inset, inset 0 0 0 1px rgba(255, 209, 102, 0.14));
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}

.raffles-total-card:hover {
    transform: translateY(-2px);
    border-color: rgba(var(--total-accent-rgb), 0.7);
    box-shadow: var(--raffles-main-block-shadow, 0 0 12px rgba(0, 0, 0, 0.78), 0 8px 20px rgba(0, 0, 0, 0.62)), 0 0 22px rgba(var(--total-accent-rgb), 0.22);
}

.raffles-total-card.is-completed { --total-accent: #ffd27a; --total-accent-rgb: 255, 210, 122; }
.raffles-total-card.is-paid { --total-accent: #3ddc6a; --total-accent-rgb: 61, 220, 106; }
.raffles-total-card.is-burn { --total-accent: #ff6a3d; --total-accent-rgb: 255, 106, 61; }
.raffles-total-card.is-players { --total-accent: #8fb8ff; --total-accent-rgb: 143, 184, 255; }

.raffles-total-value {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    color: #ffe9cf;
    font-size: 1.55rem;
    font-weight: 900;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
}

.raffles-total-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    color: var(--total-accent);
    filter: drop-shadow(0 0 6px rgba(var(--total-accent-rgb), 0.45));
}

.raffles-total-card.is-paid .raffles-total-value {
    color: #4ff07c;
    text-shadow: 0 0 18px rgba(61, 220, 106, 0.35);
}

.raffles-total-card.is-burn .raffles-total-value span {
    background: linear-gradient(180deg, #ffd27a 0%, #ff8a3d 45%, #ff4d4d 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 10px rgba(255, 90, 50, 0.35));
}

.raffles-total-label {
    position: relative;
    z-index: 2;
    color: #ffca8f;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 0.22rem;
}

/* Breathing glow from the bottom edge. */
.raffles-total-card.is-paid::before,
.raffles-total-card.is-burn::before {
    content: '';
    position: absolute;
    z-index: 0;
    left: 10%;
    right: 10%;
    bottom: -40%;
    height: 80%;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(var(--total-accent-rgb), 0.4), transparent);
    animation: raffleTotalBreath 4.2s ease-in-out infinite;
    pointer-events: none;
}

.raffles-total-card.is-burn::before {
    background: radial-gradient(closest-side, rgba(255, 120, 40, 0.42), rgba(255, 60, 40, 0.12) 60%, transparent);
    animation: raffleTotalFlicker 2.6s ease-in-out infinite;
}

/* A slow light sweep across the card every few seconds. */
.raffles-total-card.is-paid::after,
.raffles-total-card.is-burn::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: 0;
    bottom: 0;
    left: -60%;
    width: 45%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.07) 45%, rgba(255, 255, 255, 0.12) 50%, rgba(255, 255, 255, 0.07) 55%, transparent);
    transform: skewX(-18deg);
    animation: raffleTotalSweep 7s ease-in-out infinite;
    pointer-events: none;
}

.raffles-total-card.is-burn::after {
    animation-delay: 3.5s;
}

/* Rising particles: green sparks for creators, embers for the burn. */
.raffles-total-fx {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.raffles-total-fx i {
    position: absolute;
    bottom: -6px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    opacity: 0;
    background: var(--total-accent);
    box-shadow: 0 0 6px 1px rgba(var(--total-accent-rgb), 0.75);
    animation: raffleTotalRise 4.8s ease-in infinite;
}

.raffles-total-card.is-burn .raffles-total-fx i {
    width: 4px;
    height: 4px;
    background: #ffc061;
    box-shadow: 0 0 8px 2px rgba(255, 110, 40, 0.85);
    animation-name: raffleTotalEmber;
    animation-duration: 3.4s;
    animation-timing-function: ease-out;
}

.raffles-total-fx i:nth-child(1) { left: 12%; animation-delay: 0s; }
.raffles-total-fx i:nth-child(2) { left: 27%; animation-delay: 1.7s; }
.raffles-total-fx i:nth-child(3) { left: 43%; animation-delay: 0.9s; }
.raffles-total-fx i:nth-child(4) { left: 58%; animation-delay: 2.6s; }
.raffles-total-fx i:nth-child(5) { left: 74%; animation-delay: 0.4s; }
.raffles-total-fx i:nth-child(6) { left: 88%; animation-delay: 2.1s; }
.raffles-total-fx i:nth-child(7) { left: 35%; animation-delay: 3s; }

/* Little pop when the count-up lands. */
.raffles-total-card.is-landed .raffles-total-value span {
    animation: raffleTotalLand 0.55s ease-out;
}

@keyframes raffleTotalBreath {
    0%, 100% { opacity: 0.55; transform: scale(0.95); }
    50% { opacity: 1; transform: scale(1.05); }
}

@keyframes raffleTotalFlicker {
    0%, 100% { opacity: 0.7; transform: scale(1) translateY(0); }
    22% { opacity: 1; transform: scale(1.06) translateY(-2px); }
    41% { opacity: 0.78; transform: scale(0.98) translateY(1px); }
    63% { opacity: 0.95; transform: scale(1.04) translateY(-1px); }
    81% { opacity: 0.74; transform: scale(1) translateY(0); }
}

@keyframes raffleTotalSweep {
    0%, 62% { left: -60%; }
    100% { left: 130%; }
}

@keyframes raffleTotalRise {
    0% { opacity: 0; transform: translateY(0) scale(0.6); }
    18% { opacity: 1; }
    75% { opacity: 0.4; }
    100% { opacity: 0; transform: translateY(-88px) scale(1); }
}

@keyframes raffleTotalEmber {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    15% { opacity: 1; }
    50% { transform: translate(5px, -40px) scale(0.85); }
    100% { opacity: 0; transform: translate(-4px, -82px) scale(0.3); }
}

@keyframes raffleTotalLand {
    0% { transform: scale(1); }
    40% { transform: scale(1.07); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .raffles-total-card,
    .raffles-total-card::before,
    .raffles-total-card::after,
    .raffles-total-fx i,
    .raffles-total-card.is-landed .raffles-total-value span {
        animation: none !important;
        transition: none;
    }

    .raffles-total-card::after,
    .raffles-total-fx {
        display: none;
    }

    .raffles-total-card:hover {
        transform: none;
    }
}


/* Bottom row: "Back" (inner pages) next to the Jupiter link. */
.raffles-hero-actions {
    position: relative;
    z-index: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1.1rem;
}

.raffles-hero-actions .raffles-hero-getbasc {
    margin-top: 0;
}

.raffles-hero-back {
    color: #ffe2bc;
}

.raffles-hero.is-subpage .raffles-title {
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .raffles-global-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.5rem;
        margin-top: 0.8rem;
    }

    .raffles-hero {
        min-height: 0;
        padding: 1rem 0.75rem;
    }

    .raffles-title {
        font-size: 1.55rem;
        letter-spacing: 1px;
        margin-bottom: 0.5rem;
    }

    .raffles-trust {
        gap: 0.4rem;
    }

    .raffles-trust-item {
        font-size: 0.8rem;
        padding: 0.3rem 0.7rem 0.3rem 0.6rem;
    }

    .raffles-total-card {
        padding: 0.58rem 0.5rem 0.52rem;
    }

    .raffles-total-value {
        font-size: 1.12rem;
        gap: 0.32rem;
    }

    .raffles-total-icon {
        width: 0.95rem;
        height: 0.95rem;
    }

    .raffles-total-label {
        font-size: 0.68rem;
    }

    .raffles-hero-getbasc {
        margin-top: 0.8rem;
    }

    .raffles-eyebrow {
        font-size: 1rem;
        letter-spacing: 0.14em;
    }

    .raffles-hero-actions {
        margin-top: 0.8rem;
        gap: 0.4rem;
    }

    /* One row on phones: short "← Back" next to the Jupiter link. */
    .raffles-hero-back-long {
        display: none;
    }

    .raffles-hero-actions .raffles-hero-getbasc {
        padding: 0.32rem 0.72rem;
        font-size: 0.8rem;
    }
}

/* Phones: the three trust pills smaller, two rows instead of three. */
@media (max-width: 480px) {
    .raffles-trust {
        gap: 0.35rem 0.3rem;
        max-width: 340px;
    }

    .raffles-trust-item {
        gap: 0.3rem;
        padding: 0.24rem 0.58rem 0.24rem 0.48rem;
        font-size: 0.72rem;
        letter-spacing: 0;
    }

    .raffles-trust-icon {
        width: 13px;
        height: 13px;
    }
}

