/* === BASE RESET & BODY === */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background: #0f0a05;
    font-family: 'Lato', sans-serif;
    overflow-x: hidden;
    width: 100%;
    min-height: 100vh;
    color: #fdf6e3;
    position: relative;
}

/* === MARBLE BACKGROUND TEXTURE === */
.marble-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    background-color: #0f0a05;
    /* Marble texture via layered radial-gradients */
    background-image:
        radial-gradient(ellipse 120% 80% at 10% 20%, rgba(212,165,116,0.08) 0%, transparent 60%),
        radial-gradient(ellipse 80% 120% at 90% 80%, rgba(212,165,116,0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 50% 50%, rgba(253,246,227,0.03) 0%, transparent 70%),
        radial-gradient(ellipse 200% 30% at 30% 70%, rgba(212,165,116,0.04) 0%, transparent 40%),
        radial-gradient(ellipse 40% 200% at 70% 30%, rgba(180,140,90,0.05) 0%, transparent 45%);
}

/* Three.js canvas layer */
#three-container {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    pointer-events: none;
}

/* Dark overlay to keep text readable over 3D scene */
.overlay-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(
        ellipse at center,
        rgba(15,10,5,0.55) 0%,
        rgba(15,10,5,0.80) 100%
    );
    z-index: 2;
}

/* === MAIN CONTENT WRAPPER === */
.content {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 100vh;
    padding: 24px 16px;
}

/* === LOGO === */
.logo-container {
    margin-bottom: 24px;
    text-align: center;
    width: 100%;
}

.logo {
    width: 450px;
    max-width: 92%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 28px rgba(212,165,116,0.65));
}

/* === MARQUEE TEXT === */
.marquee-text {
    width: 100%;
    padding: 14px 0;
    border-top: 2px solid #d4a574;
    border-bottom: 2px solid #d4a574;
    margin-bottom: 32px;
    overflow: hidden;
    white-space: nowrap;
    /* Gold foil text effect */
    background: rgba(15,10,5,0.9);
    box-shadow:
        0 0 20px rgba(212,165,116,0.25),
        inset 0 1px 0 rgba(212,165,116,0.15);
}

.marquee-inner {
    display: inline-block;
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(12px, 3.5vw, 18px);
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    /* Gold foil gradient text */
    background: linear-gradient(90deg, #b8873a, #f0d080, #d4a574, #f5e0a0, #b8873a);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: scrollText 22s linear infinite, goldShimmer 4s linear infinite;
    padding-left: 100%;
}

@keyframes scrollText {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

@keyframes goldShimmer {
    0%   { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* === CTA BUTTON === */
.btn-wrapper {
    margin-bottom: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.ref-btn {
    display: inline-block;
    /* Ornate gold gradient */
    background: linear-gradient(145deg, #c8963c, #f0d060, #d4a040, #f5e090, #c8963c);
    background-size: 200% 200%;
    color: #1a1a1a;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 700;
    font-size: clamp(16px, 4.5vw, 26px);
    padding: clamp(14px, 3vw, 20px) clamp(28px, 7vw, 56px);
    border-radius: 80px;
    text-decoration: none;
    /* Ornate border via border-image gold gradient */
    border: 4px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 0 0 3px rgba(212,165,116,0.8),
        0 12px 40px rgba(212,165,116,0.55),
        inset 0 2px 6px rgba(255,255,255,0.45);
    transition: all 0.3s ease;
    letter-spacing: 2px;
    text-align: center;
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(255,255,255,0.4);
    text-transform: uppercase;
    animation: ctaPulse 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.ref-btn::before {
    content: '';
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255,255,255,0.25) 50%,
        transparent 70%
    );
    transform: translateX(-100%) rotate(45deg);
    animation: goldSweep 4s linear infinite;
}

@keyframes goldSweep {
    0%   { transform: translateX(-100%) rotate(45deg); }
    60%  { transform: translateX(100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

@keyframes ctaPulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(212,165,116,0.8), 0 12px 40px rgba(212,165,116,0.55), inset 0 2px 6px rgba(255,255,255,0.45); }
    50%       { box-shadow: 0 0 0 4px rgba(240,208,96,1),   0 16px 60px rgba(212,165,116,0.8), inset 0 2px 6px rgba(255,255,255,0.55); }
}

.ref-btn:hover {
    background-position: 100% 100%;
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 0 0 4px rgba(240,208,96,1),
        0 20px 60px rgba(212,165,116,0.85),
        inset 0 2px 8px rgba(255,255,255,0.6);
}

/* === FLAG SECTION === */
.flag-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 8px;
}

.flag-row {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.flag-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
    margin-bottom: 14px;
    cursor: pointer;
}

.flag {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    /* Ornate gold border */
    border: 4px solid transparent;
    background: linear-gradient(#0f0a05, #0f0a05) padding-box,
                linear-gradient(135deg, #c8963c, #f0d060, #b8873a, #f5e0a0) border-box;
    box-shadow:
        0 0 22px rgba(212,165,116,0.5),
        0 0 8px rgba(212,165,116,0.3);
    animation: spinLeft 12s linear infinite;
    pointer-events: none;
}

.flag-item:active { opacity: 0.8; }

@keyframes spinLeft {
    from { transform: rotate(0deg); }
    to   { transform: rotate(-360deg); }
}

.country-name {
    margin-top: 8px;
    font-family: 'Lato', sans-serif;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: 700;
    color: #fdf6e3;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
    text-align: center;
    pointer-events: none;
}

.greeting {
    font-family: 'Lato', sans-serif;
    font-size: clamp(12px, 3.5vw, 16px);
    font-weight: 400;
    /* Gold foil text */
    background: linear-gradient(90deg, #c8963c, #f0d060, #d4a574);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    margin-bottom: 2px;
    pointer-events: none;
}

/* === SEO CONTENT === */
.seo-content {
    width: 100%;
    max-width: 1200px;
    /* Dark marble surface */
    background: rgba(15,10,5,0.85);
    backdrop-filter: blur(12px);
    /* Ornate gold border-image */
    border: 1px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 0 0 1px rgba(212,165,116,0.45),
        0 0 40px rgba(212,165,116,0.12),
        inset 0 1px 0 rgba(212,165,116,0.1);
    padding: 40px 32px;
    border-radius: 40px;
    text-align: left;
    margin-top: 50px;
    color: #fdf6e3;
    position: relative;
    overflow: hidden;
}

/* Marble texture overlay inside SEO block */
.seo-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 180% 60% at 20% 30%, rgba(212,165,116,0.04) 0%, transparent 50%),
        radial-gradient(ellipse 80% 180% at 80% 70%, rgba(212,165,116,0.03) 0%, transparent 50%);
    pointer-events: none;
    border-radius: 40px;
}

.seo-content h1 {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(18px, 4vw, 24px);
    font-weight: 700;
    /* Gold foil heading */
    background: linear-gradient(90deg, #c8963c, #f0d060, #d4a574, #f5e0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 22px;
    border-left: 5px solid #d4a574;
    padding-left: 18px;
    position: relative;
}

.seo-content p {
    font-family: 'Lato', sans-serif;
    font-size: 16px;
    line-height: 1.95;
    margin-bottom: 18px;
    color: rgba(253,246,227,0.85);
    position: relative;
}

.seo-content b {
    color: #f0d060;
    font-weight: 700;
}

.security-badge {
    background: rgba(212,165,116,0.08);
    border: 1px solid rgba(212,165,116,0.45);
    padding: 16px 20px;
    border-radius: 16px;
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(11px, 2.5vw, 14px);
    font-weight: 700;
    /* Gold foil text */
    background-image: linear-gradient(135deg, rgba(212,165,116,0.1), rgba(253,246,227,0.05));
    color: #f0d060;
    text-align: center;
    margin-top: 22px;
    letter-spacing: 1px;
    box-shadow: 0 0 16px rgba(212,165,116,0.15);
    position: relative;
}

/* === JACKPOT TICKER === */
.jackpot-section {
    width: 100%;
    max-width: 1200px;
    margin: 24px auto;
    padding: 16px 22px;
    background: rgba(15,10,5,0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212,165,116,0.3);
    border-radius: 16px;
    box-shadow: 0 0 24px rgba(212,165,116,0.1);
}

.jackpot-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(13px, 3vw, 16px);
    font-weight: 700;
    background: linear-gradient(90deg, #c8963c, #f0d060);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 14px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.ticker-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(212,165,116,0.2);
    font-size: 14px;
    color: rgba(253,246,227,0.75);
}

.ticker-item:last-child { border-bottom: none; }
.ticker-time  { color: rgba(212,165,116,0.6); min-width: 45px; font-size: 13px; }
.ticker-game  { color: #fdf6e3; min-width: 100px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.ticker-user  { color: rgba(253,246,227,0.65); flex: 1; font-family: monospace; font-size: 13px; }
.ticker-amount {
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(90deg, #c8963c, #f0d060);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === REVIEW SECTION === */
.review-section {
    width: 100%;
    max-width: 1200px;
    margin: 60px auto 40px;
    padding: 40px 32px;
    background: rgba(15,10,5,0.85);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(212,165,116,0.3);
    border-radius: 40px;
    box-shadow: 0 0 36px rgba(212,165,116,0.1);
}

.review-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(18px, 4vw, 26px);
    font-weight: 700;
    background: linear-gradient(90deg, #c8963c, #f0d060, #d4a574);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

.review-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(212,165,116,0.3);
}

.rating-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stars {
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
}

.stars input { display: none; }

.stars label {
    font-size: 35px;
    color: rgba(253,246,227,0.25);
    cursor: pointer;
    transition: 0.15s;
}

.stars label:hover,
.stars label:hover ~ label,
.stars input:checked ~ label {
    color: #f0d060;
    text-shadow: 0 0 18px rgba(240,208,96,0.6);
}

.review-input {
    width: 100%;
    max-width: 600px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.review-input textarea {
    flex: 1;
    min-width: 250px;
    padding: 15px 20px;
    background: rgba(253,246,227,0.06);
    border: 2px solid rgba(212,165,116,0.45);
    border-radius: 30px;
    color: #fdf6e3;
    font-size: 16px;
    font-family: 'Lato', sans-serif;
    resize: none;
    height: 60px;
    transition: 0.3s;
}

.review-input textarea:focus {
    outline: none;
    border-color: #f0d060;
    background: rgba(253,246,227,0.1);
    box-shadow: 0 0 20px rgba(212,165,116,0.25);
}

.review-input textarea::placeholder {
    color: rgba(253,246,227,0.45);
}

.submit-btn {
    padding: 0 30px;
    background: linear-gradient(145deg, #c8963c, #f0d060, #c8963c);
    border: none;
    border-radius: 30px;
    color: #1a1a1a;
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: 0.3s;
    box-shadow: 0 4px 20px rgba(212,165,116,0.4), inset 0 1px 3px rgba(255,255,255,0.4);
    height: 60px;
    min-width: 120px;
    letter-spacing: 1px;
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 32px rgba(212,165,116,0.6);
    background: linear-gradient(145deg, #f0d060, #c8963c, #f0d060);
}

.reviews-header {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(15px, 3vw, 20px);
    font-weight: 700;
    color: #f0d060;
    margin-bottom: 20px;
    text-align: center;
}

.reviews-grid {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    align-items: stretch;
    gap: 20px;
    flex-wrap: wrap;
    min-height: 280px;
}

.review-card {
    flex: 1;
    min-width: 250px;
    max-width: 350px;
    background: rgba(20,14,8,0.75);
    border: 1px solid rgba(212,165,116,0.28);
    border-radius: 30px;
    padding: 25px 20px;
    backdrop-filter: blur(8px);
    transition: 0.3s;
    animation: fadeIn 0.35s ease;
    position: relative;
    overflow: hidden;
}

/* Subtle marble texture on each card */
.review-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(ellipse 120% 60% at 20% 20%, rgba(212,165,116,0.04) 0%, transparent 60%);
    pointer-events: none;
    border-radius: 30px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

.review-card:hover {
    background: rgba(30,20,10,0.9);
    border-color: rgba(212,165,116,0.55);
    box-shadow: 0 0 32px rgba(212,165,116,0.18);
}

.reviewer {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #c8963c, #8b6020);
    border: 2px solid rgba(212,165,116,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fdf6e3;
    font-size: 22px;
    box-shadow: 0 0 12px rgba(212,165,116,0.3);
}

.reviewer-info {
    display: flex;
    flex-direction: column;
}

.reviewer-name {
    font-family: 'Cinzel Decorative', cursive;
    font-weight: 700;
    font-size: 14px;
    background: linear-gradient(90deg, #c8963c, #f0d060);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.review-date {
    font-size: 12px;
    color: rgba(253,246,227,0.45);
    font-family: monospace;
}

.review-stars {
    color: #f0d060;
    margin-bottom: 14px;
    font-size: 16px;
}

.review-stars i { margin-right: 3px; }

.review-text {
    color: rgba(253,246,227,0.82);
    font-family: 'Lato', sans-serif;
    font-size: 14px;
    line-height: 1.65;
    word-break: break-word;
}

/* === MODAL STYLES — Treasure Chest === */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.88);
    backdrop-filter: blur(6px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    /* Dark marble panel */
    background: linear-gradient(145deg, #0f0a05, #1e1408, #0f0a05);
    border: 3px solid transparent;
    background-clip: padding-box;
    box-shadow:
        0 0 0 3px rgba(212,165,116,0.75),
        0 0 60px rgba(212,165,116,0.3),
        inset 0 1px 0 rgba(212,165,116,0.15);
    border-radius: 24px;
    padding: 40px 32px;
    width: 90%;
    max-width: 520px;
    text-align: center;
    animation: modal-pop 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

/* Marble texture inside modal */
.modal-content::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 150% 80% at 10% 20%, rgba(212,165,116,0.06) 0%, transparent 50%),
        radial-gradient(ellipse 80% 150% at 90% 80%, rgba(212,165,116,0.04) 0%, transparent 50%);
    pointer-events: none;
}

@keyframes modal-pop {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1);   opacity: 1; }
}

.modal-title {
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 900;
    background: linear-gradient(90deg, #c8963c, #f0d060, #d4a574, #f5e0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    letter-spacing: 2px;
    text-shadow: none;
    position: relative;
}

/* === TREASURE CHEST MINI-GAME === */
.minigame-container {
    margin-bottom: 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Chest wrapper */
.chest-wrapper {
    position: relative;
    width: 140px;
    height: 130px;
    margin: 0 auto 16px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Chest base */
.chest-base {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(180deg, #8b5e1a 0%, #6b4510 50%, #4a2f08 100%);
    border-radius: 6px 6px 12px 12px;
    border: 3px solid #c8963c;
    box-shadow:
        0 6px 24px rgba(0,0,0,0.5),
        inset 0 2px 6px rgba(200,150,60,0.25);
    overflow: hidden;
}

/* Iron bands on chest base */
.chest-base::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    top: 28px; height: 3px;
    background: linear-gradient(90deg, #c8963c, #f0d060, #c8963c);
    box-shadow: 0 0 6px rgba(240,208,96,0.5);
}

/* Keyhole on chest */
.chest-base::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 18px; height: 24px;
    background: #2a1a04;
    border-radius: 50% 50% 4px 4px;
    border: 2px solid #c8963c;
    box-shadow: 0 0 8px rgba(212,165,116,0.4);
}

/* Chest lid (rotates open) */
.chest-lid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: linear-gradient(180deg, #a06820 0%, #8b5e1a 60%, #7a4e14 100%);
    border-radius: 8px 8px 2px 2px;
    border: 3px solid #c8963c;
    transform-origin: bottom center;
    transform: rotateX(0deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow:
        0 -4px 16px rgba(212,165,116,0.2),
        inset 0 2px 6px rgba(200,150,60,0.25);
    /* perspective for 3D lid effect */
    backface-visibility: visible;
}

/* Iron band on lid */
.chest-lid::before {
    content: '';
    position: absolute;
    left: 0; right: 0;
    bottom: 14px; height: 3px;
    background: linear-gradient(90deg, #c8963c, #f0d060, #c8963c);
}

/* Lid hinge dots */
.chest-lid::after {
    content: '';
    position: absolute;
    left: 50%; top: 8px;
    transform: translateX(-50%);
    width: 10px; height: 10px;
    background: radial-gradient(circle, #f0d060, #c8963c);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(240,208,96,0.6);
}

/* Open state — lid flips back 110deg */
.chest-wrapper.open .chest-lid {
    transform: rotateX(-110deg);
}

/* Gold coins overflow container */
.coins-container {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 80px;
    pointer-events: none;
    display: none;
}

.chest-wrapper.open .coins-container {
    display: block;
}

/* Individual coin */
.coin {
    position: absolute;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #f5e090, #f0d060, #c8963c, #a06820);
    border: 1.5px solid #f0d060;
    box-shadow: 0 0 6px rgba(240,208,96,0.5);
    opacity: 0;
    animation: none;
}

/* Each coin gets a unique trajectory via nth-child */
.chest-wrapper.open .coin:nth-child(1)  { animation: coinFly1  0.8s 0.05s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(2)  { animation: coinFly2  0.9s 0.10s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(3)  { animation: coinFly3  0.7s 0.15s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(4)  { animation: coinFly4  1.0s 0.20s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(5)  { animation: coinFly5  0.85s 0.08s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(6)  { animation: coinFly6  0.95s 0.22s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(7)  { animation: coinFly1  0.75s 0.30s ease-out forwards; }
.chest-wrapper.open .coin:nth-child(8)  { animation: coinFly3  0.88s 0.12s ease-out forwards; }

@keyframes coinFly1 { 0% { opacity:1; transform: translate(10px, 0);   } 100% { opacity:0; transform: translate(-30px, -70px);  } }
@keyframes coinFly2 { 0% { opacity:1; transform: translate(40px, 0);   } 100% { opacity:0; transform: translate(55px,  -80px);  } }
@keyframes coinFly3 { 0% { opacity:1; transform: translate(25px, 0);   } 100% { opacity:0; transform: translate(10px,  -90px);  } }
@keyframes coinFly4 { 0% { opacity:1; transform: translate(60px, 0);   } 100% { opacity:0; transform: translate(-20px, -60px);  } }
@keyframes coinFly5 { 0% { opacity:1; transform: translate(50px, 0);   } 100% { opacity:0; transform: translate(80px,  -75px);  } }
@keyframes coinFly6 { 0% { opacity:1; transform: translate(15px, 0);   } 100% { opacity:0; transform: translate(-50px, -85px);  } }

/* Sparkle glow when open */
.chest-wrapper.open .chest-base {
    box-shadow:
        0 6px 24px rgba(0,0,0,0.5),
        0 0 30px rgba(240,208,96,0.45),
        inset 0 2px 6px rgba(200,150,60,0.4);
}

/* Click hint text under chest */
.chest-hint {
    font-family: 'Cinzel Decorative', cursive;
    font-size: 13px;
    color: rgba(212,165,116,0.7);
    letter-spacing: 1px;
    animation: hintPulse 2s ease-in-out infinite;
}

.chest-wrapper.open + .chest-hint {
    display: none;
}

@keyframes hintPulse {
    0%, 100% { opacity: 0.7; }
    50%       { opacity: 1; }
}

.modal-message {
    font-family: 'Lato', sans-serif;
    font-size: clamp(16px, 4vw, 20px);
    color: rgba(253,246,227,0.9);
    margin-bottom: 24px;
    min-height: 26px;
    position: relative;
}

.success-text {
    background: linear-gradient(90deg, #c8963c, #f5e090, #c8963c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: clamp(17px, 4vw, 22px);
}

.hidden {
    display: none !important;
}

.modal-cta-btn {
    background: linear-gradient(145deg, #c8963c, #f0d060, #c8963c);
    background-size: 200% 200%;
    color: #1a1a1a;
    font-family: 'Cinzel Decorative', cursive;
    font-size: clamp(15px, 4vw, 20px);
    font-weight: 700;
    padding: 16px 30px;
    border: 3px solid rgba(253,246,227,0.6);
    border-radius: 50px;
    cursor: pointer;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow:
        0 0 24px rgba(212,165,116,0.55),
        inset 0 0 12px rgba(255,255,255,0.3);
    transition: 0.3s;
    position: relative;
}

.modal-cta-btn:hover {
    transform: scale(1.04);
    box-shadow:
        0 0 48px rgba(240,208,96,0.8),
        inset 0 0 20px rgba(255,255,255,0.5);
    background-position: 100% 100%;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .logo  { width: 340px; }
    .flag  { width: 82px; height: 82px; }
    .flag-item { min-width: 105px; }
    .seo-content { padding: 28px 20px; }
    .review-section { padding: 28px 16px; }
}

@media (max-width: 480px) {
    .logo  { width: 275px; }
    .flag  { width: 72px; height: 72px; }
    .flag-item { min-width: 95px; }
    .marquee-inner { font-size: 11px; padding-left: 100%; }
    .ref-btn { white-space: normal; font-size: 15px; padding: 14px 24px; line-height: 1.4; word-break: keep-all; }
    .ticker-item { font-size: 12px; gap: 6px; }
    .ticker-time  { min-width: 35px; }
    .ticker-game  { min-width: 75px; }
    .chest-wrapper { width: 110px; height: 105px; }
    .chest-lid    { height: 54px; }
    .chest-base   { height: 58px; }
}

/* === REDUCED MOTION FALLBACK === */
@media (prefers-reduced-motion: reduce) {
    .marquee-inner { animation: none; padding-left: 12px; }
    .ref-btn       { animation: none; }
    .ref-btn::before { animation: none; }
    .flag          { animation: none; }
    .chest-lid     { transition: none; }
    .coin          { animation: none !important; }
    .chest-hint    { animation: none; }
}
