* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a0a;
    color: #fff;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.header {
    text-align: center;
    padding: 40px 20px;
}

.logo {
    font-size: 48px;
    color: #FFD700;
    text-shadow: 0 0 20px #FFD700;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 24px;
    color: #00FFFF;
    margin-bottom: 5px;
}

.tagline {
    color: #888;
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #FFD700;
}

.stat-label {
    color: #888;
    font-size: 14px;
    margin-top: 5px;
}

.sponsor-banner {
    background: linear-gradient(135deg, #2d2d0a, #1a1a00);
    border: 2px solid #FFD700;
    border-radius: 15px;
    padding: 20px;
    margin: 30px 0;
    text-align: center;
}

.sponsor-header { }
.sponsor-header {
    color: #FFD700;
}
    color: #6B0000 !important;
    font-size: 18px;
    margin-bottom: 15px;
}

.sponsor-content {
    min-height: 60px;
}

.sponsor-text {
    color: #FFD700;
    font-size: 24px;
    font-weight: bold;
}

.sponsor-message { font-family: Georgia, serif; font-size: 22px; font-weight: bold; background: linear-gradient(90deg, #FFD700, #FFA500, #FF6347, #FFD700); background-size: 300% 100%; -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; animation: sponsor-shimmer 3s ease infinite; filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5));
    
    margin-top: 5px;
}

.claim-section {
    background: linear-gradient(135deg, #1a1a2e, #0f0f1a);
    border: 2px solid #00FFFF;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.claim-title {
    color: #00FFFF;
    margin-bottom: 20px;
}

.wallet-input {
    width: 100%;
    padding: 15px;
    font-size: 16px;
    border: 2px solid #333;
    border-radius: 10px;
    background: #0a0a0a;
    color: #fff;
    margin-bottom: 15px;
}

.wallet-input:focus {
    border-color: #00FFFF;
    outline: none;
}

.captcha-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 24px;
    color: #FFD700;
}

.captcha-input {
    width: 80px;
    padding: 10px;
    font-size: 20px;
    text-align: center;
    border: 2px solid #FFD700;
    border-radius: 10px;
    background: #0a0a0a;
    color: #fff;
}

.claim-btn {
    width: 100%;
    padding: 20px;
    font-size: 24px;
    font-weight: bold;
    border: none;
    border-radius: 15px;
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #000;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.claim-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 30px #FFD700;
}

.claim-btn:disabled {
    background: #333;
    color: #666;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.status-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 10px;
    font-size: 16px;
}

.status-message.success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid #0f0;
    color: #0f0;
}

.status-message.error {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid #f00;
    color: #f00;
}

.status-message.info {
    background: rgba(0, 255, 255, 0.2);
    border: 1px solid #0ff;
    color: #0ff;
}

.cooldown-timer {
    margin-top: 20px;
    font-size: 18px;
    color: #FF6B6B;
}

.cooldown-timer span {
    color: #FFD700;
    font-weight: bold;
}

.hidden {
    display: none;
}

.prediction-game {
    background: linear-gradient(135deg, #1a0a2e, #2d1a4a);
    border: 2px solid #FF00FF;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.game-title {
    color: #FF00FF;
    margin-bottom: 10px;
}

.game-subtitle {
    
    margin-bottom: 20px;
}

.streak-display {
    background: rgba(0,0,0,0.5);
    border: 2px solid #FFD700;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 25px;
}

.streak-label {
    color: #FFD700;
}

.streak-value {
    font-size: 32px;
    font-weight: bold;
    color: #FF6B6B;
}

.streak-bonus {
    color: #0f0;
    font-size: 18px;
    margin-top: 5px;
}

.color-orbs {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 25px 0;
}

.color-orb {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 3px solid #fff;
}

.color-orb:hover {
    transform: scale(1.15);
}

.color-orb.red { background: radial-gradient(circle at 30% 30%, #ff6b6b, #cc0000); }
.color-orb.blue { background: radial-gradient(circle at 30% 30%, #6b9bff, #0000cc); }
.color-orb.green { background: radial-gradient(circle at 30% 30%, #6bff6b, #00cc00); }
.color-orb.yellow { background: radial-gradient(circle at 30% 30%, #ffff6b, #cccc00); }

.color-orb:hover {
    box-shadow: 0 0 30px currentColor;
}

.prediction-result {
    font-size: 20px;
    margin-top: 20px;
    min-height: 30px;
}

.sponsor-info {
    background: linear-gradient(135deg, #0a2e1a, #1a4a2d);
    border: 2px solid #00FF00;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    margin: 30px 0;
}

.sponsor-info h3 {
    color: #00FF00;
    margin-bottom: 15px;
}

.sponsor-address {
    display: block;
    background: #000;
    padding: 15px;
    border-radius: 10px;
    font-size: 12px;
    word-break: break-all;
    margin: 15px 0;
    color: #0ff;
}

.sponsor-rate {
    color: #FFD700;
    font-size: 18px;
}

.footer {
    text-align: center;
    padding: 30px;
    color: #666;
}

@media (max-width: 600px) {
    .logo { font-size: 32px; }
    .stats-grid { grid-template-columns: 1fr; }
    .color-orb { width: 55px; height: 55px; }
}
body.minimal-mode .sponsor-header { color: #6B0000 !important; }

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

/* Marquee sponsor text - PREMIUM styling */
.marquee-text {
    font-family: Georgia, serif !important;
    font-size: 20px !important;
    font-weight: bold !important;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6347, #FFD700) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: sponsor-shimmer 3s ease infinite, marquee 15s linear infinite !important;
    filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.5)) !important;
}

/* Marquee container */
.marquee-container {
    overflow: hidden !important;
    width: 100% !important;
    position: relative !important;
}

.marquee-text {
    display: inline-block !important;
    white-space: nowrap !important;
    padding-left: 100% !important;
    animation: marquee-scroll 20s linear infinite !important;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Slower marquee with pause */
.marquee-text {
    animation: marquee-scroll 40s linear infinite !important;
}

@keyframes marquee-scroll {
    0% { transform: translateX(0); }
    15% { transform: translateX(-15%); }
    20% { transform: translateX(-15%); }
    35% { transform: translateX(-35%); }
    40% { transform: translateX(-35%); }
    55% { transform: translateX(-55%); }
    60% { transform: translateX(-55%); }
    75% { transform: translateX(-75%); }
    80% { transform: translateX(-75%); }
    100% { transform: translateX(-100%); }
}

/* Star flicker effect for sponsor name */
.sponsor-name-highlight {
    color: #FFD700 !important;
    -webkit-text-fill-color: #FFD700 !important;
    font-size: 24px !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    animation: star-flicker 2s ease-in-out infinite !important;
    text-shadow: 
        0 0 5px #fff,
        0 0 10px #FFD700,
        0 0 20px #FFA500,
        0 0 30px #FF6347 !important;
}

@keyframes star-flicker {
    0%, 100% { 
        opacity: 1; 
        text-shadow: 0 0 5px #fff, 0 0 10px #FFD700, 0 0 20px #FFA500;
    }
    25% { 
        opacity: 0.8; 
        text-shadow: 0 0 10px #fff, 0 0 20px #FFD700, 0 0 40px #FFA500;
    }
    50% { 
        opacity: 1; 
        text-shadow: 0 0 3px #fff, 0 0 8px #FFD700, 0 0 15px #FFA500;
    }
    75% { 
        opacity: 0.9; 
        text-shadow: 0 0 15px #fff, 0 0 25px #FFD700, 0 0 50px #FFA500;
    }
}

/* ========== MAGNIFICENT SPONSOR DISPLAY ========== */

/* Smooth infinite marquee */
.marquee-container {
    overflow: hidden !important;
    width: 100% !important;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent) !important;
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent) !important;
}

.marquee-track {
    display: flex !important;
    width: max-content !important;
    animation: smooth-scroll 15s linear infinite !important;
}

.marquee-content {
    flex-shrink: 0 !important;
    padding-right: 50px !important;
    font-family: Georgia, serif !important;
    font-size: 18px !important;
    font-weight: bold !important;
    background: linear-gradient(90deg, #FFD700, #FFA500, #FF6347, #FFD700, #FFA500) !important;
    background-size: 200% 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    animation: color-shift 4s ease infinite !important;
}

@keyframes smooth-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes color-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ========== COMIC POPUP EFFECT ========== */

#sponsor-popup-effect {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) scale(0) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    opacity: 0 !important;
    transition: none !important;
}

#sponsor-popup-effect.active {
    animation: comic-popup 2.5s ease-out forwards !important;
}

#sponsor-popup-effect .popup-text {
    font-family: 'Impact', 'Arial Black', sans-serif !important;
    font-size: 60px !important;
    font-weight: 900 !important;
    text-transform: uppercase !important;
    color: #FFD700 !important;
    text-shadow: 
        3px 3px 0 #FF6347,
        6px 6px 0 #c41e3a,
        0 0 30px #FFD700,
        0 0 60px #FFA500,
        0 0 90px #FF6347 !important;
    letter-spacing: 4px !important;
    white-space: nowrap !important;
    -webkit-text-stroke: 2px #fff !important;
}

#sponsor-popup-effect .popup-burst {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    width: 300px !important;
    height: 300px !important;
    transform: translate(-50%, -50%) !important;
    background: radial-gradient(circle, rgba(255,215,0,0.8) 0%, rgba(255,165,0,0.4) 40%, transparent 70%) !important;
    border-radius: 50% !important;
    z-index: -1 !important;
    animation: burst-effect 2.5s ease-out forwards !important;
}

#sponsor-popup-effect .popup-stars {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 400px !important;
    height: 200px !important;
}

#sponsor-popup-effect .popup-stars span {
    position: absolute !important;
    font-size: 30px !important;
    animation: star-fly 2.5s ease-out forwards !important;
}

#sponsor-popup-effect .popup-stars span:nth-child(1) { top: 0; left: 20%; animation-delay: 0.1s; }
#sponsor-popup-effect .popup-stars span:nth-child(2) { top: 10%; left: 80%; animation-delay: 0.2s; }
#sponsor-popup-effect .popup-stars span:nth-child(3) { top: 80%; left: 10%; animation-delay: 0.15s; }
#sponsor-popup-effect .popup-stars span:nth-child(4) { top: 70%; left: 90%; animation-delay: 0.25s; }
#sponsor-popup-effect .popup-stars span:nth-child(5) { top: 50%; left: 50%; animation-delay: 0.05s; }

@keyframes comic-popup {
    0% { 
        transform: translate(-50%, -50%) scale(0) rotate(-10deg); 
        opacity: 0;
    }
    20% { 
        transform: translate(-50%, -50%) scale(1.3) rotate(5deg); 
        opacity: 1;
    }
    30% { 
        transform: translate(-50%, -50%) scale(1) rotate(-3deg); 
        opacity: 1;
    }
    40% { 
        transform: translate(-50%, -50%) scale(1.1) rotate(2deg); 
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 1;
    }
    80% { 
        transform: translate(-50%, -50%) scale(1) rotate(0deg); 
        opacity: 1;
    }
    100% { 
        transform: translate(-50%, -50%) scale(2) rotate(10deg); 
        opacity: 0;
    }
}

@keyframes burst-effect {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(2); opacity: 0.8; }
    100% { transform: translate(-50%, -50%) scale(4); opacity: 0; }
}

@keyframes star-fly {
    0% { transform: translate(0, 0) scale(0); opacity: 0; }
    20% { transform: translate(0, 0) scale(1); opacity: 1; }
    100% { transform: translate(var(--tx, 50px), var(--ty, -50px)) scale(0); opacity: 0; }
}

#sponsor-popup-effect .popup-stars span:nth-child(1) { --tx: -100px; --ty: -80px; }
#sponsor-popup-effect .popup-stars span:nth-child(2) { --tx: 100px; --ty: -60px; }
#sponsor-popup-effect .popup-stars span:nth-child(3) { --tx: -80px; --ty: 80px; }
#sponsor-popup-effect .popup-stars span:nth-child(4) { --tx: 90px; --ty: 70px; }
#sponsor-popup-effect .popup-stars span:nth-child(5) { --tx: 0px; --ty: -100px; }

/* Mode-specific popup colors */
body.calm-mode #sponsor-popup-effect .popup-text {
    color: #7ab8e0 !important;
    text-shadow: 3px 3px 0 #4a80b0, 6px 6px 0 #2a5080, 0 0 30px #7ab8e0, 0 0 60px #4a80b0 !important;
}

body.minimal-mode #sponsor-popup-effect .popup-text {
    color: #8B0000 !important;
    text-shadow: 3px 3px 0 #6B0000, 6px 6px 0 #400000, 0 0 30px #8B0000 !important;
    -webkit-text-stroke: 2px #4a0000 !important;
}

body.christmas-mode #sponsor-popup-effect .popup-text {
    color: #228b22 !important;
    text-shadow: 3px 3px 0 #c41e3a, 6px 6px 0 #FFD700, 0 0 30px #228b22, 0 0 60px #c41e3a !important;
}

body.chaos-mode #sponsor-popup-effect .popup-text {
    animation: chaos-colors 0.3s ease infinite !important;
    text-shadow: 3px 3px 0 #ff00ff, 6px 6px 0 #00ffff, 0 0 30px #ffff00, 0 0 60px #ff00ff !important;
}

@keyframes chaos-colors {
    0% { color: #ff00ff; }
    25% { color: #00ffff; }
    50% { color: #ffff00; }
    75% { color: #00ff00; }
    100% { color: #ff00ff; }
}

/* Sampler recording pulse */
@keyframes pulse-record {
    0%, 100% { box-shadow: 0 0 10px #ff0000; }
    50% { box-shadow: 0 0 30px #ff0000, 0 0 50px #ff0000; }
}

/* ═══════════════════════════════════════ */
/* REFERRAL SECTION - MODE STYLES          */
/* ═══════════════════════════════════════ */

/* Calm Mode - Serene Blue */
body.calm-mode #referral-section {
    background: linear-gradient(135deg, #0a1a2e, #152535) !important;
    border-color: #7ab8e0 !important;
    box-shadow: 0 0 30px rgba(122, 184, 224, 0.2) !important;
}
body.calm-mode #referral-section h3 { color: #7ab8e0 !important; }
body.calm-mode #referral-section button { background: linear-gradient(135deg, #7ab8e0, #4a90b8) !important; color: #000 !important; }
body.calm-mode #referral-section input { border-color: #7ab8e0 !important; }
body.calm-mode #ref-link, body.calm-mode #ref-code-display { color: #7ab8e0 !important; }
body.calm-mode #ref-count { color: #7ab8e0 !important; }
body.calm-mode #referral-ticker { background: #051525 !important; }
body.calm-mode #ticker-content { color: #7ab8e0 !important; }
body.calm-mode #milestone-box { background: linear-gradient(90deg, #0a1520, #152530) !important; }
body.calm-mode #milestone-bar { background: linear-gradient(90deg, #7ab8e0, #4a90b8) !important; }

/* Minimal/Developer Mode - Dark Red */
body.minimal-mode #referral-section {
    background: linear-gradient(135deg, #1a0a0a, #251515) !important;
    border-color: #8B0000 !important;
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.3) !important;
}
body.minimal-mode #referral-section h3 { color: #8B0000 !important; }
body.minimal-mode #referral-section button { background: linear-gradient(135deg, #8B0000, #6B0000) !important; }
body.minimal-mode #referral-section input { border-color: #8B0000 !important; background: #0a0505 !important; }
body.minimal-mode #ref-link, body.minimal-mode #ref-code-display { color: #a02020 !important; }
body.minimal-mode #ref-count { color: #a02020 !important; }
body.minimal-mode #referral-ticker { background: #0a0505 !important; }
body.minimal-mode #ticker-content { color: #8B0000 !important; }
body.minimal-mode #milestone-box { background: linear-gradient(90deg, #150505, #200a0a) !important; }
body.minimal-mode #milestone-bar { background: linear-gradient(90deg, #8B0000, #a02020) !important; }

/* Chaos Mode - Disco Glitter! */
body.chaos-mode #referral-section {
    animation: disco-border 2s ease infinite !important;
    box-shadow: 0 0 20px #ff00ff, 0 0 40px #00ffff, 0 0 60px #ffff00 !important;
}
@keyframes disco-border {
    0%, 100% { border-color: #ff00ff; }
    33% { border-color: #00ffff; }
    66% { border-color: #ffff00; }
}
body.chaos-mode #referral-section h3 {
    animation: rainbow-text 2s linear infinite !important;
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
@keyframes rainbow-text {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}
body.chaos-mode #referral-section button {
    animation: button-disco 0.5s ease infinite alternate !important;
    background: linear-gradient(135deg, #ff00ff, #00ffff) !important;
}
@keyframes button-disco {
    0% { transform: scale(1); box-shadow: 0 0 10px #ff00ff; }
    100% { transform: scale(1.02); box-shadow: 0 0 25px #00ffff; }
}
body.chaos-mode #ticker-content { 
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
}
body.chaos-mode #milestone-bar { 
    background: linear-gradient(90deg, #ff00ff, #00ffff, #ffff00, #ff00ff) !important;
    background-size: 300% 100% !important;
    animation: rainbow-bar 2s linear infinite !important;
}
@keyframes rainbow-bar {
    0% { background-position: 0% 50%; }
    100% { background-position: 300% 50%; }
}

/* Christmas Mode - Festive! */
body.christmas-mode #referral-section {
    background: linear-gradient(135deg, #0a1a0a, #1a0a0a) !important;
    border: 3px solid #228b22 !important;
    box-shadow: 0 0 20px rgba(34, 139, 34, 0.4), 0 0 40px rgba(196, 30, 58, 0.3) !important;
}
body.christmas-mode #referral-section h3 {
    background: linear-gradient(90deg, #c41e3a, #228b22, #FFD700, #c41e3a) !important;
    background-size: 300% 100% !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    animation: xmas-text 4s ease infinite !important;
}
@keyframes xmas-text {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
body.christmas-mode #referral-section button {
    background: linear-gradient(135deg, #c41e3a, #228b22) !important;
    animation: xmas-glow 2s ease infinite !important;
}
@keyframes xmas-glow {
    0%, 100% { box-shadow: 0 0 10px #c41e3a; }
    50% { box-shadow: 0 0 20px #228b22; }
}
body.christmas-mode #referral-section input { border-color: #c41e3a !important; }
body.christmas-mode #ref-link { color: #228b22 !important; }
body.christmas-mode #ref-count { color: #c41e3a !important; }
body.christmas-mode #ref-earned { color: #FFD700 !important; }
body.christmas-mode #ticker-content { color: #228b22 !important; }
body.christmas-mode #milestone-bar { background: linear-gradient(90deg, #c41e3a, #228b22, #FFD700) !important; }

/* ═══════════════════════════════════════ */
/* REFERRAL GEM BUTTON - Sophisticated!    */
/* ═══════════════════════════════════════ */

.referral-gem-btn {
    position: relative;
    display: block;
    margin: 15px auto;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    background: linear-gradient(135deg, #ff00ff, #8800ff, #00ffff);
    background-size: 300% 300%;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    overflow: hidden;
    animation: gem-gradient 4s ease infinite;
    box-shadow: 
        0 0 20px rgba(255, 0, 255, 0.5),
        0 0 40px rgba(0, 255, 255, 0.3),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.referral-gem-btn:hover {
    transform: scale(1.05);
    box-shadow: 
        0 0 30px rgba(255, 0, 255, 0.8),
        0 0 60px rgba(0, 255, 255, 0.5),
        inset 0 0 30px rgba(255, 255, 255, 0.2);
}

@keyframes gem-gradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Text switching animation */
.referral-gem-btn .gem-text-1,
.referral-gem-btn .gem-text-2 {
    display: block;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.referral-gem-btn .gem-text-2 {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, 100%);
    opacity: 0;
    white-space: nowrap;
}

.referral-gem-btn.has-code .gem-text-1 {
    transform: translateY(-100%);
    opacity: 0;
}

.referral-gem-btn.has-code .gem-text-2 {
    transform: translate(-50%, -50%);
    opacity: 1;
}

/* Shine effect */
.gem-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: gem-shine 3s ease-in-out infinite;
}

@keyframes gem-shine {
    0% { left: -100%; }
    50%, 100% { left: 100%; }
}

/* Sparkle particles */
.referral-gem-btn::before,
.referral-gem-btn::after {
    content: '✨';
    position: absolute;
    font-size: 12px;
    animation: sparkle 2s ease-in-out infinite;
    pointer-events: none;
}

.referral-gem-btn::before {
    top: 5px;
    right: 10px;
    animation-delay: 0s;
}

.referral-gem-btn::after {
    bottom: 5px;
    left: 10px;
    animation-delay: 1s;
}

@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(180deg); }
}

/* Pulse ring on hover */
.referral-gem-btn:hover::before {
    animation: sparkle-fast 0.5s ease-in-out infinite;
}

@keyframes sparkle-fast {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.5); }
}

/* Mode variations */
body.calm-mode .referral-gem-btn {
    background: linear-gradient(135deg, #4a90b8, #7ab8e0, #4a90b8);
    box-shadow: 0 0 20px rgba(122, 184, 224, 0.5);
}

body.minimal-mode .referral-gem-btn {
    background: linear-gradient(135deg, #6B0000, #8B0000, #a02020);
    box-shadow: 0 0 20px rgba(139, 0, 0, 0.5);
}

body.christmas-mode .referral-gem-btn {
    background: linear-gradient(135deg, #c41e3a, #228b22, #FFD700, #c41e3a);
    background-size: 400% 400%;
    box-shadow: 0 0 20px rgba(34, 139, 34, 0.5), 0 0 30px rgba(196, 30, 58, 0.3);
}

/* ═══════════════════════════════════════ */
/* ENTRANCE SUBTLE SPONSOR PARTICLES       */
/* ═══════════════════════════════════════ */

/* Subtle floating particles for entrance */
.entrance-particle {
    position: fixed;
    pointer-events: none;
    z-index: 9000;
    font-size: 10px;
    opacity: 0;
    animation: entrance-float 8s ease-in-out forwards;
    text-shadow: 0 0 10px currentColor;
    filter: blur(0.5px);
}

@keyframes entrance-float {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.5);
    }
    10% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
        transform: translateY(-50vh) scale(0.8);
    }
    90% {
        opacity: 0.2;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) scale(0.3);
    }
}

/* Glowing orb effect */
.entrance-orb {
    position: fixed;
    pointer-events: none;
    z-index: 8999;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: orb-drift 12s ease-in-out forwards;
    box-shadow: 
        0 0 10px 3px currentColor,
        0 0 20px 6px currentColor,
        0 0 30px 10px transparent;
}

@keyframes orb-drift {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 0.6;
        transform: translate(10px, -20px) scale(1);
    }
    40% {
        transform: translate(-15px, -80px) scale(1.2);
    }
    60% {
        transform: translate(20px, -150px) scale(0.8);
    }
    80% {
        opacity: 0.3;
        transform: translate(-10px, -250px) scale(0.5);
    }
    100% {
        opacity: 0;
        transform: translate(0, -350px) scale(0);
    }
}

/* Stardust trail */
.entrance-stardust {
    position: fixed;
    pointer-events: none;
    z-index: 8998;
    width: 2px;
    height: 2px;
    background: white;
    border-radius: 50%;
    animation: stardust-twinkle 4s ease-in-out forwards;
}

@keyframes stardust-twinkle {
    0%, 100% { opacity: 0; transform: scale(0); }
    25% { opacity: 0.8; transform: scale(1.5); }
    50% { opacity: 0.3; transform: scale(0.5); }
    75% { opacity: 0.6; transform: scale(1); }
}

/* ═══════════════════════════════════════ */
/* SMOOTH REFERRAL TICKER                   */
/* ═══════════════════════════════════════ */

#referral-ticker {
    overflow: hidden;
    position: relative;
}

#ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: smooth-ticker 25s linear infinite;
    padding-left: 100%;
}

@keyframes smooth-ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

#referral-ticker:hover #ticker-content {
    animation-play-state: paused;
}
