/*
 * Lottery Homepage Animator - Public Styles
 * Version 1.1.0
 * Author: Bitghost.com
 * Support: ghost@bitghost.com
 *
 * 🧊 Bitghost DNA — Israeli Pais Jackpot Palette
 * Four-stop red ramp: pink-deep → pais red → red-deep → crimson
 * Drives both jackpot banners (fl = Florida Lotto, mml = Mega Millions Lotto)
 */

/* ========================================
   🧊 DESIGN TOKENS — ISRAELI PAIS PALETTE
   Single source of truth. Both banner
   namespaces (fl / mml) resolve to the
   same ramp so swaps stay 1:1.
======================================== */
:root {
    /* --- Florida Lotto (fl) Pais namespace --- */
    --fl-pais-red-pink:    #EFA3A9;  /* stop 0 — pink-deep */
    --fl-pais-red:         #E63946;  /* stop 1 — pais red  */
    --fl-pais-red-deep:    #C1272D;  /* stop 2 — red-deep  */
    --fl-pais-red-crimson: #8B1A1F;  /* stop 3 — crimson (deep-end) */

    /* --- Mega Millions Lotto (mml) Pais namespace --- */
    --mml-pais-red-pink:    #EFA3A9;
    --mml-pais-red:         #E63946;
    --mml-pais-red-deep:    #C1272D;
    --mml-pais-red-crimson: #8B1A1F;  /* NEW — deep-end crimson stop */

    /* --- Universal Pais aliases (neutral) --- */
    --pais-red-pink:    var(--fl-pais-red-pink);
    --pais-red:         var(--fl-pais-red);
    --pais-red-deep:    var(--fl-pais-red-deep);
    --pais-red-crimson: var(--fl-pais-red-crimson);

    /* --- Four-stop gradient ramps --- */
    --pais-ramp-45:  linear-gradient(45deg,  #EFA3A9, #E63946, #C1272D, #8B1A1F);
    --pais-ramp-135: linear-gradient(135deg, #EFA3A9, #E63946, #C1272D, #8B1A1F);
    --pais-ramp-rad: radial-gradient(circle at 30% 30%, #EFA3A9, #E63946 35%, #C1272D 65%, #8B1A1F 100%);

    /* --- Contrast + surface --- */
    --pais-contrast-light: #ffffff;
    --pais-contrast-dark:  #1a0506;
    --pais-ink-shadow:     rgba(139, 26, 31, 0.45);
    --pais-glow:           rgba(230, 57, 70, 0.55);
}

/* ========================================
   WRAPPER & RESET
======================================== */
.lha-wrapper {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.lha-wrapper * {
    box-sizing: border-box;
}

/* Banner variant attribute hooks — allow per-variant overrides without JS */
.lha-wrapper[data-variant="fl"] {
    --pais-red-pink:    var(--fl-pais-red-pink);
    --pais-red:         var(--fl-pais-red);
    --pais-red-deep:    var(--fl-pais-red-deep);
    --pais-red-crimson: var(--fl-pais-red-crimson);
}
.lha-wrapper[data-variant="mml"] {
    --pais-red-pink:    var(--mml-pais-red-pink);
    --pais-red:         var(--mml-pais-red);
    --pais-red-deep:    var(--mml-pais-red-deep);
    --pais-red-crimson: var(--mml-pais-red-crimson);
}

/* ========================================
   ANIMATED BACKGROUND
======================================== */
.lha-bg-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    z-index: 0;
}

/* Lava Lamp Gradient — 4-stop ramps keep jackpot banners reading "deep red" */
.lha-lava-lamp-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: lhaLavaFlow 15s ease infinite;
}

@keyframes lhaLavaFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Blobs */
.lha-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: lhaFloat 20s ease-in-out infinite;
    transition: transform 0.3s ease-out;
}

.lha-blob-1 { width: 400px; height: 400px; top: 20%; left: 10%;  animation-delay: 0s;  animation-duration: 25s; }
.lha-blob-2 { width: 500px; height: 500px; top: 60%; right: 15%; animation-delay: 5s;  animation-duration: 30s; }
.lha-blob-3 { width: 350px; height: 350px; bottom: 10%; left: 30%; animation-delay: 10s; animation-duration: 22s; }
.lha-blob-4 { width: 450px; height: 450px; top: 40%; right: 40%; animation-delay: 15s; animation-duration: 28s; }

@keyframes lhaFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%      { transform: translate(50px, -50px) scale(1.1); }
    50%      { transform: translate(-30px, 50px) scale(0.9); }
    75%      { transform: translate(40px, 30px) scale(1.05); }
}

/* Coin Particles Container */
.lha-coins-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lha-coin {
    position: absolute;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 32px;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    box-shadow:
        0 5px 15px rgba(255, 215, 0, 0.4),
        inset 0 -3px 8px rgba(0,0,0,0.2),
        inset 0 3px 8px rgba(255,255,255,0.3);
    animation: lhaFloatCoin 15s ease-in-out infinite;
    transition: transform 0.2s ease-out;
}

/* Pais-variant coins get crimson-rim glow when banner is fl/mml */
.lha-wrapper[data-variant="fl"] .lha-coin,
.lha-wrapper[data-variant="mml"] .lha-coin {
    box-shadow:
        0 5px 15px var(--pais-glow),
        0 0 0 2px var(--pais-red-crimson) inset,
        inset 0 -3px 8px rgba(0,0,0,0.2),
        inset 0 3px 8px rgba(255,255,255,0.3);
}

.lha-coin::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.5), transparent);
    top: 10%;
    left: 10%;
}

.lha-coin::after { content: '$'; }
.lha-coin.mega::after { content: 'M'; font-size: 28px; }
.lha-coin.number { font-size: 24px; font-weight: 800; }

@keyframes lhaFloatCoin {
    0%, 100% { transform: translateY(0)    rotate(0deg); }
    25%      { transform: translateY(-30px) rotate(90deg); }
    50%      { transform: translateY(0)    rotate(180deg); }
    75%      { transform: translateY(-20px) rotate(270deg); }
}

/* Sparkles Container */
.lha-sparkles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.lha-sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 0 10px #FFD700;
    animation: lhaSparkle 3s ease-in-out infinite;
    pointer-events: none;
}

/* Pais variants get crimson-tinted sparkles to reinforce the palette */
.lha-wrapper[data-variant="fl"] .lha-sparkle,
.lha-wrapper[data-variant="mml"] .lha-sparkle {
    background: var(--pais-red-pink);
    box-shadow: 0 0 10px var(--pais-red), 0 0 20px var(--pais-red-crimson);
}

@keyframes lhaSparkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    50%      { opacity: 1; transform: scale(1.5); }
}

/* ========================================
   CONTENT OVERLAY
======================================== */
.lha-content-overlay {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    padding: 60px 20px;
}

.lha-content-container {
    max-width: 1000px;
    width: 100%;
}

/* Heading */
.lha-heading {
    font-size: 72px;
    font-weight: 900;
    margin: 0 0 20px 0;
    line-height: 1.1;
    text-shadow:
        3px 3px 6px rgba(0,0,0,0.5),
        0 0 20px rgba(255, 255, 255, 0.3);
    animation: lhaGlow 2s ease-in-out infinite;
}

/* Pais variants: crimson-infused glow */
.lha-wrapper[data-variant="fl"] .lha-heading,
.lha-wrapper[data-variant="mml"] .lha-heading {
    animation: lhaGlowPais 2s ease-in-out infinite;
    text-shadow:
        3px 3px 6px var(--pais-ink-shadow),
        0 0 24px rgba(255, 255, 255, 0.35),
        0 0 48px var(--pais-glow);
}

@keyframes lhaGlow {
    0%, 100% { text-shadow: 3px 3px 6px rgba(0,0,0,0.5), 0 0 20px rgba(255, 255, 255, 0.3); }
    50%      { text-shadow: 3px 3px 6px rgba(0,0,0,0.5), 0 0 40px rgba(255, 255, 255, 0.6); }
}

@keyframes lhaGlowPais {
    0%, 100% {
        text-shadow:
            3px 3px 6px var(--pais-ink-shadow),
            0 0 24px rgba(255,255,255,0.35),
            0 0 48px var(--pais-glow);
    }
    50% {
        text-shadow:
            3px 3px 6px var(--pais-ink-shadow),
            0 0 32px rgba(255,255,255,0.6),
            0 0 72px var(--pais-red-crimson);
    }
}

/* Subheading */
.lha-subheading {
    font-size: 24px;
    margin: 0 auto 40px auto;
    line-height: 1.6;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    max-width: 800px;
    font-weight: 400;
}

/* Buttons Container */
.lha-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Button Base */
.lha-btn {
    padding: 20px 60px;
    border: none;
    border-radius: 50px;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.lha-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Primary Button (Gold) */
.lha-btn-primary {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #1a1a1a;
}
.lha-btn-primary:hover {
    background: linear-gradient(135deg, #FFC700 0%, #FF9500 100%);
}

/* Secondary Button (Outline) */
.lha-btn-secondary {
    background: transparent;
    color: white;
    border: 3px solid white;
}
.lha-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFD700;
    color: #FFD700;
}

/* Danger Button — now driven by Pais ramp (was e74c3c/c0392b) */
.lha-btn-danger {
    background: linear-gradient(135deg, var(--pais-red) 0%, var(--pais-red-crimson) 100%);
    color: var(--pais-contrast-light);
}
.lha-btn-danger:hover {
    background: linear-gradient(135deg, var(--pais-red-deep) 0%, var(--pais-red-crimson) 100%);
    box-shadow: 0 15px 40px var(--pais-glow);
}

/* 🧊 NEW — Crimson Button: full 4-stop Pais ramp */
.lha-btn-crimson {
    background: var(--pais-ramp-135);
    background-size: 200% 200%;
    background-position: 0% 50%;
    color: var(--pais-contrast-light);
    border: 2px solid var(--pais-red-crimson);
    animation: lhaCrimsonFlow 6s ease infinite;
}
.lha-btn-crimson:hover {
    background-position: 100% 50%;
    box-shadow: 0 15px 40px var(--pais-glow), 0 0 0 4px rgba(255,255,255,0.08) inset;
}
@keyframes lhaCrimsonFlow {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

/* 🧊 NEW — Crimson shimmer overlay (Bitghost signature) */
.lha-btn-crimson::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.25) 50%,
        rgba(255,255,255,0) 100%);
    animation: lhaShimmer 3s infinite linear;
    pointer-events: none;
}
@keyframes lhaShimmer {
    0%   { left: -100%; }
    100% { left: 100%; }
}

/* Success Button (Green) */
.lha-btn-success {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
}
.lha-btn-success:hover {
    background: linear-gradient(135deg, #1ebc61 0%, #179e50 100%);
}

/* ========================================
   🧊 PAIS JACKPOT BANNER STRIP (optional)
   Renders the 4-stop ramp as a diagnostic
   strip — useful for preview pages.
======================================== */
.lha-pais-strip {
    display: flex;
    width: 100%;
    height: 22px;
    border: 0;
    overflow: hidden;
}
.lha-pais-strip span {
    flex: 1;
    display: block;
}
.lha-pais-strip .s0 { background: var(--pais-red-pink); }
.lha-pais-strip .s1 { background: var(--pais-red); }
.lha-pais-strip .s2 { background: var(--pais-red-deep); }
.lha-pais-strip .s3 { background: var(--pais-red-crimson); }

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .lha-heading { font-size: 56px; }
    .lha-subheading { font-size: 20px; }
    .lha-btn { padding: 16px 40px; font-size: 20px; }
}

@media (max-width: 768px) {
    .lha-heading { font-size: 42px; }
    .lha-subheading { font-size: 18px; }
    .lha-btn { padding: 14px 30px; font-size: 18px; }
    .lha-coin { width: 40px; height: 40px; font-size: 20px; }
    .lha-blob { filter: blur(40px); }
    .lha-blob-1, .lha-blob-2, .lha-blob-3, .lha-blob-4 { width: 250px; height: 250px; }
    .lha-buttons { gap: 15px; }
}

@media (max-width: 480px) {
    .lha-content-overlay { padding: 40px 15px; }
    .lha-heading { font-size: 32px; }
    .lha-subheading { font-size: 16px; margin-bottom: 30px; }
    .lha-btn { padding: 12px 24px; font-size: 16px; width: 100%; max-width: 280px; }
    .lha-buttons { flex-direction: column; align-items: center; }
    .lha-coin { width: 30px; height: 30px; font-size: 16px; }
    .lha-blob { filter: blur(30px); }
    .lha-blob-1, .lha-blob-2, .lha-blob-3, .lha-blob-4 { width: 180px; height: 180px; }
}

/* ========================================
   ACCESSIBILITY
======================================== */
@media (prefers-reduced-motion: reduce) {
    .lha-blob,
    .lha-coin,
    .lha-sparkle,
    .lha-lava-lamp-bg,
    .lha-heading,
    .lha-btn-crimson,
    .lha-btn-crimson::after {
        animation: none !important;
    }
}

/* Focus styles for accessibility — Pais-tinted on jackpot banners */
.lha-btn:focus {
    outline: 3px solid #FFD700;
    outline-offset: 4px;
}
.lha-wrapper[data-variant="fl"] .lha-btn:focus,
.lha-wrapper[data-variant="mml"] .lha-btn:focus {
    outline: 3px solid var(--pais-red-crimson);
    outline-offset: 4px;
}

/* ========================================
   PRINT STYLES
======================================== */
@media print {
    .lha-bg-wrapper { display: none; }
    .lha-content-overlay { color: #000; }
    .lha-heading, .lha-subheading { text-shadow: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   🧊 v2.0.0 — LIVE JACKPOT ENGINE STYLES
   Additive layer. Zero modifications to v1.1.0 selectors above.
   Author: Bitghost.com · Support: ghost@bitghost.com
   Checkpoint: 2026-04-29 / stable
═══════════════════════════════════════════════════════════════════════════ */

/* ────────────────────────────────────────────────
   v2.0.0 DESIGN TOKENS — extend the Pais ramp
─────────────────────────────────────────────────── */
:root {
    --lha-tile-bg:        rgba(0, 0, 0, 0.55);
    --lha-tile-border:    rgba(255, 255, 255, 0.12);
    --lha-tile-radius:    22px;       /* Bitghost border rhythm */
    --lha-tile-shadow:    0 20px 60px rgba(0,0,0,0.35), 0 0 0 1px rgba(255,255,255,0.06) inset;
    --lha-tile-shadow-hi: 0 30px 80px var(--pais-glow), 0 0 0 2px rgba(255,255,255,0.18) inset;
    --lha-jackpot-color:  #FFFFFF;
    --lha-jackpot-glow:   var(--pais-glow);
    --lha-timer-color:    #FFD700;
    --lha-cta-bg:         linear-gradient(135deg, #FFD700, #FFA500);
    --lha-cta-color:      #1a0506;
    --lha-burst-color:    var(--pais-red);
}

/* ────────────────────────────────────────────────
   GAME TILE — core block
─────────────────────────────────────────────────── */
.lha-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    padding: 28px 28px 24px;
    min-width: 280px;
    max-width: 380px;
    text-decoration: none;
    color: var(--lha-jackpot-color);
    background: var(--lha-tile-bg);
    border: 22px solid var(--lha-tile-border);
    border-radius: var(--lha-tile-radius);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: var(--lha-tile-shadow);
    overflow: hidden;
    isolation: isolate;
    transition:
        transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
        box-shadow 0.4s ease,
        border-color 0.4s ease;
    cursor: pointer;
    will-change: transform;
}

/* Pais variant tinting */
.lha-tile[data-variant="fl"],
.lha-tile[data-variant="mml"] {
    border-color: rgba(230, 57, 70, 0.35);
    box-shadow:
        0 20px 60px rgba(139, 26, 31, 0.45),
        0 0 0 1px var(--pais-red-crimson) inset;
}

/* Hover — magnetic lift + crimson halo */
.lha-tile:hover,
.lha-tile:focus-visible {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--lha-tile-shadow-hi);
    border-color: rgba(255, 215, 0, 0.45);
    outline: none;
}
.lha-tile[data-variant="fl"]:hover,
.lha-tile[data-variant="mml"]:hover,
.lha-tile[data-variant="fl"]:focus-visible,
.lha-tile[data-variant="mml"]:focus-visible {
    border-color: var(--pais-red);
    box-shadow:
        0 30px 80px var(--pais-glow),
        0 0 0 2px var(--pais-red-crimson) inset;
}

.lha-tile:active {
    transform: translateY(-4px) scale(1.01);
    transition-duration: 0.15s;
}

/* Tile shimmer overlay (Bitghost signature) */
.lha-tile__shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        110deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.08) 45%,
        rgba(255,255,255,0.18) 50%,
        rgba(255,255,255,0.08) 55%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    background-position: -200% 0;
    pointer-events: none;
    z-index: 1;
    animation: lhaTileShimmer 6s ease-in-out infinite;
}
@keyframes lhaTileShimmer {
    0%, 100% { background-position: -200% 0; opacity: 0.6; }
    50%      { background-position:  200% 0; opacity: 1.0; }
}

/* Layout regions */
.lha-tile__head,
.lha-tile__jackpot-wrap,
.lha-tile__timer-wrap,
.lha-tile__cta {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.lha-tile__head {
    flex-direction: row;
    gap: 10px;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.9;
}
.lha-tile__emoji { font-size: 28px; }
.lha-tile__label { color: rgba(255,255,255,0.92); }

/* JACKPOT — the big bold number */
.lha-tile__jackpot-prefix {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 4px;
    color: var(--pais-red-pink);
    text-transform: uppercase;
    margin-bottom: 4px;
    opacity: 0.85;
}
.lha-tile__jackpot {
    font-size: 56px;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -1px;
    color: var(--lha-jackpot-color);
    text-shadow:
        2px 2px 4px rgba(0,0,0,0.6),
        0 0 24px rgba(255,255,255,0.35),
        0 0 48px var(--lha-jackpot-glow);
    transition: text-shadow 0.4s ease, transform 0.4s ease;
    word-break: keep-all;
}
.lha-tile:hover .lha-tile__jackpot {
    text-shadow:
        2px 2px 4px rgba(0,0,0,0.6),
        0 0 32px rgba(255,255,255,0.55),
        0 0 72px var(--pais-red-crimson);
    transform: scale(1.04);
}
.lha-tile--placeholder .lha-tile__jackpot {
    opacity: 0.7;
    font-style: italic;
    font-size: 32px;
}
.lha-tile.is-updating .lha-tile__jackpot {
    animation: lhaJackpotPulse 0.6s ease-out;
}
@keyframes lhaJackpotPulse {
    0%   { transform: scale(1);   filter: brightness(1); }
    40%  { transform: scale(1.1); filter: brightness(1.6); }
    100% { transform: scale(1);   filter: brightness(1); }
}

/* TIMER — the live countdown */
.lha-tile__timer-prefix {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    margin-bottom: 4px;
}
.lha-tile__timer {
    font-size: 26px;
    font-weight: 800;
    color: var(--lha-timer-color);
    font-variant-numeric: tabular-nums;
    font-family: 'SF Mono', 'Monaco', 'Consolas', 'Courier New', monospace;
    letter-spacing: 2px;
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5);
    line-height: 1;
}
.lha-tile[data-variant="fl"] .lha-tile__timer,
.lha-tile[data-variant="mml"] .lha-tile__timer {
    color: var(--pais-red-pink);
    text-shadow: 0 0 12px var(--pais-glow);
}
.lha-tile__timer-date {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.65);
    letter-spacing: 1px;
}

/* ============================================================
   V2.1.0 — EST label beside the live countdown
   ============================================================ */
.lha-tile__timer-line {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
}
.lha-tile__timer-tz {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 2px;
    color: rgba(255, 215, 0, 0.92);
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 215, 0, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.35);
}
.lha-tile[data-variant="fl"] .lha-tile__timer-tz,
.lha-tile[data-variant="mml"] .lha-tile__timer-tz {
    color: var(--pais-red-pink);
    background: rgba(230, 57, 70, 0.14);
    box-shadow: inset 0 0 0 1px var(--pais-red-crimson);
}

/* ============================================================
   V2.1.0 — Latest winning balls
   ============================================================ */
.lha-tile__numbers-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin: 4px 0 2px;
    width: 100%;
}
.lha-tile__numbers-prefix {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
}
.lha-tile__balls {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.lha-ball {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    background: radial-gradient(circle at 32% 28%, #ffffff, #e9e9ee 60%, #cfcfd6 100%);
    color: #15060a;
    box-shadow:
        0 3px 8px rgba(0,0,0,0.35),
        inset 0 -2px 4px rgba(0,0,0,0.18),
        inset 0 2px 3px rgba(255,255,255,0.9);
    animation: lhaBallPop 0.45s cubic-bezier(0.18, 0.89, 0.32, 1.28) both;
}
.lha-ball--special.lha-ball--pb {
    background: radial-gradient(circle at 32% 28%, #ff8a93, #E63946 55%, #8B1A1F 100%);
    color: #fff;
    box-shadow: 0 3px 10px var(--pais-glow), inset 0 -2px 4px rgba(0,0,0,0.3), inset 0 2px 3px rgba(255,255,255,0.35);
}
.lha-ball--special.lha-ball--mb {
    background: radial-gradient(circle at 32% 28%, #fff1a8, #FFD700 55%, #d9a400 100%);
    color: #1a0506;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.5), inset 0 -2px 4px rgba(0,0,0,0.22), inset 0 2px 3px rgba(255,255,255,0.85);
}
.lha-ball--special:not(.lha-ball--pb):not(.lha-ball--mb) {
    background: radial-gradient(circle at 32% 28%, #ff8a93, #E63946 55%, #8B1A1F 100%);
    color: #fff;
}
.lha-ball-extra {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 1px;
    color: #fff;
    background: rgba(255,255,255,0.12);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.28);
}
@keyframes lhaBallPop {
    0%   { transform: scale(0.4) translateY(6px); opacity: 0; }
    100% { transform: scale(1) translateY(0); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .lha-ball { animation: none; }
}
.lha-tile--small .lha-ball { width: 28px; height: 28px; font-size: 12px; }
.lha-tile--large .lha-ball { width: 40px; height: 40px; font-size: 16px; }

/* ============================================================
   V2.1.0 — Draw Pending state (Tier-1 flag, pulsing 🧊)
   ============================================================ */
.lha-tile--pending .lha-tile__jackpot {
    color: rgba(255,255,255,0.92);
    animation: lhaPendingPulse 1.6s ease-in-out infinite;
}
.lha-tile--pending .lha-tile__jackpot::after {
    content: " 🧊";
    animation: lhaPendingPulse 1.6s ease-in-out infinite;
}
@keyframes lhaPendingPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.55; }
}
@media (prefers-reduced-motion: reduce) {
    .lha-tile--pending .lha-tile__jackpot,
    .lha-tile--pending .lha-tile__jackpot::after { animation: none; }
}

/* CTA */
.lha-tile__cta {
    flex-direction: row;
    gap: 8px;
    margin-top: 6px;
    padding: 12px 24px;
    background: var(--lha-cta-bg);
    color: var(--lha-cta-color);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(255, 165, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.lha-tile:hover .lha-tile__cta {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.6);
}

/* Pais strip at bottom */
.lha-tile__pais-strip {
    position: absolute;
    left: 0;
    bottom: 0;
    display: flex;
    width: 100%;
    height: 6px;
    z-index: 2;
}
.lha-tile__pais-strip span {
    flex: 1;
    display: block;
}
.lha-tile__pais-strip .s0 { background: var(--pais-red-pink); }
.lha-tile__pais-strip .s1 { background: var(--pais-red); }
.lha-tile__pais-strip .s2 { background: var(--pais-red-deep); }
.lha-tile__pais-strip .s3 { background: var(--pais-red-crimson); }

/* Tier diagnostic badge */
.lha-tile__tier-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1px;
}

/* Size variants */
.lha-tile--small {
    min-width: 220px;
    max-width: 280px;
    padding: 20px 20px 18px;
    border-width: 14px;
}
.lha-tile--small .lha-tile__jackpot { font-size: 38px; }
.lha-tile--small .lha-tile__timer   { font-size: 20px; }

.lha-tile--large {
    min-width: 340px;
    max-width: 460px;
    padding: 36px 36px 30px;
}
.lha-tile--large .lha-tile__jackpot { font-size: 72px; }
.lha-tile--large .lha-tile__timer   { font-size: 32px; }

/* Invalid placeholder */
.lha-tile--invalid {
    display: inline-block;
    padding: 12px 18px;
    background: rgba(255, 99, 71, 0.15);
    border: 2px dashed #ff6347;
    color: #fff;
    border-radius: 12px;
    font-family: monospace;
    font-size: 14px;
}

/* ────────────────────────────────────────────────
   TILE GRID
─────────────────────────────────────────────────── */
.lha-tile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto 24px auto;
    padding: 0 12px;
    align-items: stretch;
    justify-items: center;
}
.lha-tile-grid--1 { grid-template-columns: 1fr; max-width: 520px; }
.lha-tile-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lha-tile-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.lha-tile-grid--inline { margin-top: 8px; }

.lha-tile-grid > .lha-tile {
    width: 100%;
}

/* When grid is inside the homepage banner, layer it above bg */
.lha-content-container .lha-tile-grid {
    position: relative;
    z-index: 11;
}

/* ────────────────────────────────────────────────
   BUTTONS GRID — ensure tiles + buttons mix nicely
─────────────────────────────────────────────────── */
.lha-buttons {
    align-items: stretch;
}
.lha-buttons .lha-tile {
    flex: 0 1 320px;
}

/* ────────────────────────────────────────────────
   COMPACT MODE — when wrapper has mode="compact"
─────────────────────────────────────────────────── */
.lha-wrapper--mode-compact .lha-content-overlay {
    min-height: auto;
    padding: 80px 20px 60px;
}

/* ────────────────────────────────────────────────
   PARTICLE BURST CONTAINER
─────────────────────────────────────────────────── */
.lha-burst-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 12;
}
.lha-burst-particle {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--lha-burst-color);
    box-shadow: 0 0 12px var(--lha-burst-color);
    pointer-events: none;
    will-change: transform, opacity;
}

/* ────────────────────────────────────────────────
   LUCKY NUMBER TICKER (gamified procedural element)
─────────────────────────────────────────────────── */
.lha-lucky-ticker {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 56px;
    overflow: hidden;
    z-index: 11;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.45) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255,255,255,0.12);
    pointer-events: none;
}
.lha-lucky-ticker__track {
    display: flex;
    gap: 14px;
    align-items: center;
    height: 100%;
    padding: 0 20px;
    white-space: nowrap;
    will-change: transform;
}
.lha-lucky-ball {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff, #e0e0e0);
    color: #1a0506;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 900;
    font-family: 'SF Mono', monospace;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.3),
        inset 0 -2px 4px rgba(0,0,0,0.15),
        inset 0 2px 4px rgba(255,255,255,0.6);
    border: 2px solid rgba(255,255,255,0.4);
    transition: transform 0.3s ease;
}
.lha-lucky-ball.is-special {
    background: linear-gradient(135deg, var(--pais-red), var(--pais-red-crimson));
    color: #ffffff;
    border-color: var(--pais-red-crimson);
    box-shadow:
        0 4px 16px var(--pais-glow),
        inset 0 -2px 4px rgba(0,0,0,0.25),
        inset 0 2px 4px rgba(255,255,255,0.25);
}
.lha-lucky-ball.is-special::before {
    content: '★';
    margin-right: 1px;
    font-size: 9px;
}

/* ────────────────────────────────────────────────
   GAMIFIED HOVER STATE — wrapper-level
─────────────────────────────────────────────────── */
.lha-wrapper--gamified .lha-tile {
    cursor: pointer;
}
.lha-wrapper--gamified .lha-content-container {
    /* Slightly increase top padding to make room for tile grids */
    padding-top: 8px;
}

/* ────────────────────────────────────────────────
   UPDATE INDICATOR — flashes when AJAX refresh hits
─────────────────────────────────────────────────── */
.lha-tile.is-refreshing::after {
    content: '';
    position: absolute;
    top: 14px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00ff41;
    box-shadow: 0 0 12px #00ff41;
    animation: lhaRefreshPulse 1.2s ease-out;
    z-index: 5;
}
@keyframes lhaRefreshPulse {
    0%   { opacity: 0;   transform: scale(0.5); }
    30%  { opacity: 1;   transform: scale(1.2); }
    100% { opacity: 0;   transform: scale(1.6); }
}

/* ────────────────────────────────────────────────
   RESPONSIVE — TILE BREAKPOINTS
─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .lha-tile { min-width: 260px; padding: 24px 24px 22px; border-width: 18px; }
    .lha-tile__jackpot { font-size: 48px; }
    .lha-tile__timer   { font-size: 22px; }
    .lha-tile-grid     { gap: 22px; }
}
@media (max-width: 768px) {
    .lha-tile { min-width: 240px; padding: 20px 20px 18px; border-width: 14px; }
    .lha-tile__jackpot { font-size: 40px; }
    .lha-tile__timer   { font-size: 20px; }
    .lha-tile__head    { font-size: 14px; }
    .lha-tile__cta     { padding: 10px 18px; font-size: 12px; }
    .lha-tile-grid     { grid-template-columns: 1fr; gap: 18px; max-width: 420px; }
    .lha-tile-grid--2,
    .lha-tile-grid--3  { grid-template-columns: 1fr; }
    .lha-lucky-ticker  { height: 44px; }
    .lha-lucky-ball    { width: 30px; height: 30px; font-size: 12px; }
}
@media (max-width: 480px) {
    .lha-tile { min-width: 100%; padding: 18px 18px 16px; border-width: 10px; }
    .lha-tile__jackpot { font-size: 34px; }
    .lha-tile__timer   { font-size: 18px; }
    .lha-tile__head    { font-size: 13px; letter-spacing: 1.5px; }
    .lha-tile__emoji   { font-size: 22px; }
    .lha-tile__cta     { padding: 9px 14px; }
    .lha-tile-grid     { padding: 0 8px; }
    .lha-lucky-ticker  { height: 40px; }
    .lha-lucky-ball    { width: 26px; height: 26px; font-size: 11px; }
}

/* ────────────────────────────────────────────────
   ACCESSIBILITY — reduced motion
─────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .lha-tile,
    .lha-tile__shimmer,
    .lha-tile.is-updating .lha-tile__jackpot,
    .lha-burst-particle,
    .lha-lucky-ticker__track {
        animation: none !important;
        transition: none !important;
    }
}

/* High-contrast focus ring for tiles */
.lha-tile:focus-visible {
    outline: 3px solid var(--pais-red-pink);
    outline-offset: 6px;
}
