/* ============================================
   HOMEPAGE - Premium Visual Effects
   Stunning aesthetics with modern appeal
   ============================================ */

/* Animated Background */
.homepage-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(236, 72, 153, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
        linear-gradient(180deg, #0a0a12 0%, #12121f 50%, #0a0a12 100%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

/* Particle Canvas Overlay */
#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    pointer-events: none;
}

/* Sweeping Light Effect */
.sweep-light {
    position: fixed;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 215, 0, 0.03) 40%,
        rgba(255, 215, 0, 0.08) 50%,
        rgba(255, 215, 0, 0.03) 60%,
        transparent 100%
    );
    z-index: -1;
    animation: sweepAcross 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sweepAcross {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ============================================
   HERO SECTION UPGRADES
   ============================================ */

.hero {
    position: relative;
    overflow: visible;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 30% 40%, rgba(245, 158, 11, 0.1) 0%, transparent 25%),
        radial-gradient(circle at 70% 60%, rgba(236, 72, 153, 0.08) 0%, transparent 25%);
    animation: heroGlow 10s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes heroGlow {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

/* Golden Title Enhancement */
.hero-title.rainbow-text {
    text-shadow:
        0 0 20px rgba(245, 158, 11, 0.5),
        0 0 40px rgba(245, 158, 11, 0.3),
        0 0 60px rgba(245, 158, 11, 0.2);
    animation: goldenPulse 3s ease-in-out infinite, rainbow-shift 4s linear infinite;
}

@keyframes goldenPulse {
    0%, 100% {
        text-shadow:
            0 0 20px rgba(245, 158, 11, 0.5),
            0 0 40px rgba(245, 158, 11, 0.3),
            0 0 60px rgba(245, 158, 11, 0.2);
    }
    50% {
        text-shadow:
            0 0 30px rgba(245, 158, 11, 0.7),
            0 0 60px rgba(245, 158, 11, 0.5),
            0 0 90px rgba(245, 158, 11, 0.3);
    }
}

/* Subtitle shimmer */
.hero-subtitle {
    position: relative;
    background: linear-gradient(90deg, #e2e8f0, #fff, #e2e8f0);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* ============================================
   CTA BUTTON - Premium Style
   ============================================ */

.cta-button {
    position: relative;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #f59e0b 100%);
    background-size: 200% 200%;
    border: none;
    padding: 18px 40px;
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000 !important;
    border-radius: 12px;
    overflow: hidden;
    animation: gradientShift 3s ease-in-out infinite;
    box-shadow:
        0 4px 15px rgba(245, 158, 11, 0.4),
        0 0 30px rgba(245, 158, 11, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

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

.cta-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow:
        0 8px 25px rgba(245, 158, 11, 0.5),
        0 0 50px rgba(245, 158, 11, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.cta-button .btn-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.4) 50%,
        transparent 70%
    );
    animation: btnSweep 2.5s ease-in-out infinite;
}

@keyframes btnSweep {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    animation: borderPulse 2s ease-in-out infinite;
}

@keyframes borderPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ============================================
   FLOATING CARDS - Enhanced
   ============================================ */

.floating-cards {
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.5));
}

.floating-card {
    position: relative;
    transform-style: preserve-3d;
}

.floating-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: calc(var(--radius-lg) + 3px);
    background: linear-gradient(
        135deg,
        var(--rarity-color, #fff) 0%,
        transparent 50%,
        var(--rarity-color, #fff) 100%
    );
    background-size: 300% 300%;
    animation: borderRotate 4s linear infinite;
    z-index: -1;
    opacity: 0.7;
}

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

.floating-card[data-rarity="mythic"] {
    --rarity-color: #ec4899;
}

.floating-card[data-rarity="legendary"] {
    --rarity-color: #f59e0b;
}

.floating-card[data-rarity="epic"] {
    --rarity-color: #8b5cf6;
}

/* Holographic sweep on cards */
.floating-card .card-inner::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 40%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0.1) 60%,
        transparent 100%
    );
    animation: cardSweep 3s ease-in-out infinite;
}

.floating-card.card-1 .card-inner::after { animation-delay: 0s; }
.floating-card.card-2 .card-inner::after { animation-delay: 1s; }
.floating-card.card-3 .card-inner::after { animation-delay: 2s; }

@keyframes cardSweep {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

/* Enhanced float with slight movement - tight fanned deck style */
@keyframes floatCard1 {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    50% { transform: rotate(0deg) translateY(-8px); }
}

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

@keyframes floatCard3 {
    0%, 100% { transform: rotate(6deg) translateY(0); }
    50% { transform: rotate(6deg) translateY(-10px); }
}

.floating-card.card-1 {
    animation: floatCard1 5s ease-in-out infinite;
}

.floating-card.card-2 {
    animation: floatCard2 6s ease-in-out infinite;
    animation-delay: -1s;
}

.floating-card.card-3 {
    animation: floatCard3 5.5s ease-in-out infinite;
    animation-delay: -2s;
}

/* ============================================
   ECONOMY SHOWCASE - Big Value Display
   ============================================ */

.economy-showcase {
    padding: 50px 20px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(245, 158, 11, 0.05) 20%,
        rgba(245, 158, 11, 0.1) 50%,
        rgba(245, 158, 11, 0.05) 80%,
        transparent 100%
    );
    overflow: hidden;
}

.economy-showcase::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
    pointer-events: none;
    animation: economyPulse 4s ease-in-out infinite;
}

@keyframes economyPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.8; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
}

.economy-value-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.economy-label {
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: #fcd34d;
    text-shadow: 0 0 20px rgba(252, 211, 77, 0.5);
}

.economy-value {
    font-family: var(--font-display);
    font-size: 5rem;
    font-weight: 900;
    line-height: 1;
    background: linear-gradient(180deg,
        #fff 0%,
        #fcd34d 30%,
        #f59e0b 60%,
        #d97706 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.6))
           drop-shadow(0 0 60px rgba(245, 158, 11, 0.4));
    animation: valueShine 3s ease-in-out infinite;
}

@keyframes valueShine {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(245, 158, 11, 0.6))
               drop-shadow(0 0 60px rgba(245, 158, 11, 0.4));
    }
    50% {
        filter: drop-shadow(0 0 40px rgba(245, 158, 11, 0.8))
               drop-shadow(0 0 80px rgba(245, 158, 11, 0.6));
    }
}

.economy-sublabel {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 1px;
}

/* Animated counter for economy value */
.economy-value::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: economySweep 4s ease-in-out infinite;
}

@keyframes economySweep {
    0% { left: -100%; }
    50%, 100% { left: 200%; }
}

@media (max-width: 768px) {
    .economy-value {
        font-size: 3rem;
    }

    .economy-label {
        font-size: 0.85rem;
        letter-spacing: 2px;
    }
}

/* ============================================
   LIVE STATS BANNER
   ============================================ */

.live-stats-banner {
    display: flex;
    justify-content: center;
    gap: 60px;
    padding: 30px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.3) 0%, transparent 100%);
    border-top: 1px solid rgba(245, 158, 11, 0.2);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    position: relative;
    overflow: hidden;
}

.live-stats-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.5), transparent);
}

.stat-item {
    text-align: center;
    position: relative;
}

.stat-value {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 50%, #d97706 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(245, 158, 11, 0.5);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-top: 5px;
}

.stat-item.live::after {
    content: '';
    position: absolute;
    top: 8px;
    right: -15px;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(34, 197, 94, 0);
    }
}

/* ============================================
   FEATURE CARDS - Premium Glass
   ============================================ */

.feature-card.glass-card {
    position: relative;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.feature-card.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        var(--rarity-legendary) 0%,
        var(--rarity-epic) 50%,
        var(--rarity-mythic) 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card.glass-card:hover::before {
    opacity: 1;
}

.feature-card.glass-card:hover {
    transform: translateY(-10px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.4),
        0 0 30px rgba(139, 92, 246, 0.2);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(0 0 10px rgba(245, 158, 11, 0.5));
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #fff 0%, #e2e8f0 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============================================
   RARITY SHOWCASE - Premium Tiers
   ============================================ */

.rarity-showcase {
    position: relative;
    padding: 60px 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.3) 50%, transparent 100%);
}

.rarity-showcase h2 {
    text-align: center;
    margin-bottom: 40px;
}

.rarity-grid {
    max-width: 900px;
    margin: 0 auto;
}

.rarity-item {
    position: relative;
    padding: 20px 30px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(20, 20, 35, 0.9) 0%, rgba(10, 10, 20, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
}

.rarity-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--rarity-color);
    box-shadow: 0 0 20px var(--rarity-color);
}

.rarity-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--rarity-color), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.rarity-item:hover::after {
    opacity: 0.05;
}

.rarity-item:hover {
    transform: translateX(10px);
    border-color: var(--rarity-color);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
}

.rarity-badge {
    position: relative;
    z-index: 1;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.rarity-rate {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-weight: 600;
}

/* Highlight for mythic rarity */
.rarity-item:last-child {
    animation: mythicGlow 3s ease-in-out infinite;
}

@keyframes mythicGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(236, 72, 153, 0.2);
    }
    50% {
        box-shadow: 0 0 40px rgba(236, 72, 153, 0.4);
    }
}

/* ============================================
   ACHIEVEMENT BANNER
   ============================================ */

.achievement-banner {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.1) 0%, rgba(139, 92, 246, 0.2) 50%, rgba(139, 92, 246, 0.1) 100%);
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 16px;
    padding: 25px 40px;
    margin: 40px auto;
    max-width: 800px;
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    overflow: hidden;
}

.achievement-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.1), transparent);
    animation: achievementSweep 4s linear infinite;
}

@keyframes achievementSweep {
    0% { left: -100%; }
    100% { left: 200%; }
}

.achievement-icon {
    font-size: 3rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.achievement-content {
    flex: 1;
}

.achievement-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.achievement-text {
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: #a78bfa;
}

/* ============================================
   COIN/STAR PARTICLES (CSS Fallback)
   ============================================ */

.sparkle-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.sparkle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #fcd34d 0%, transparent 70%);
    border-radius: 50%;
    animation: sparkleFloat 8s linear infinite;
    opacity: 0;
}

@keyframes sparkleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

/* Generate multiple sparkles */
.sparkle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 8s; }
.sparkle:nth-child(2) { left: 20%; animation-delay: 1s; animation-duration: 9s; }
.sparkle:nth-child(3) { left: 30%; animation-delay: 2s; animation-duration: 7s; }
.sparkle:nth-child(4) { left: 40%; animation-delay: 0.5s; animation-duration: 10s; }
.sparkle:nth-child(5) { left: 50%; animation-delay: 3s; animation-duration: 8s; }
.sparkle:nth-child(6) { left: 60%; animation-delay: 1.5s; animation-duration: 9s; }
.sparkle:nth-child(7) { left: 70%; animation-delay: 2.5s; animation-duration: 7s; }
.sparkle:nth-child(8) { left: 80%; animation-delay: 0.8s; animation-duration: 11s; }
.sparkle:nth-child(9) { left: 90%; animation-delay: 3.5s; animation-duration: 8s; }
.sparkle:nth-child(10) { left: 15%; animation-delay: 4s; animation-duration: 9s; }
.sparkle:nth-child(11) { left: 35%; animation-delay: 4.5s; animation-duration: 7s; }
.sparkle:nth-child(12) { left: 55%; animation-delay: 5s; animation-duration: 10s; }
.sparkle:nth-child(13) { left: 75%; animation-delay: 5.5s; animation-duration: 8s; }
.sparkle:nth-child(14) { left: 85%; animation-delay: 6s; animation-duration: 9s; }
.sparkle:nth-child(15) { left: 5%; animation-delay: 6.5s; animation-duration: 7s; }

/* ============================================
   CALL TO ACTION SECTION
   ============================================ */

.cta-section {
    padding: 80px 20px;
    text-align: center;
    position: relative;
    background: linear-gradient(180deg, transparent 0%, rgba(139, 92, 246, 0.1) 50%, transparent 100%);
}

.cta-section h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff 0%, #fcd34d 50%, #f59e0b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-section p {
    color: var(--color-text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .live-stats-banner {
        flex-wrap: wrap;
        gap: 30px 40px;
    }

    .stat-value {
        font-size: 2rem;
    }

    .winner-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .cta-button {
        padding: 15px 30px;
        font-size: 1rem;
    }
}
