/* ==========================================================
   EarnSphere 3D - 3D Animated Effects, Perspective Tilt & Mesh
   ========================================================== */

/* 3D Perspective Card Container */
.card-3d-wrap {
    perspective: 1200px;
    transform-style: preserve-3d;
}

.card-3d {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.4s ease;
    transform-style: preserve-3d;
    position: relative;
}

.card-3d:hover {
    transform: translateY(-8px) rotateX(4deg) rotateY(-3deg);
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.6),
        0 0 30px var(--primary-glow);
}

.card-3d-inner {
    transform: translateZ(30px);
}

/* 3D Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--primary, #00f0ff), #ffffff, var(--secondary, #7928ca));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-gradient-accent {
    background: linear-gradient(135deg, var(--accent, #ff007a), #ffd700, var(--primary, #00f0ff));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* 3D Floating Coin / Icon */
.coin-3d {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ffd700, #b45309);
    box-shadow: 
        0 10px 20px rgba(0,0,0,0.5),
        inset 0 -4px 8px rgba(0,0,0,0.6),
        inset 0 4px 8px rgba(255,255,255,0.8),
        0 0 25px rgba(255, 215, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    animation: float 4s ease-in-out infinite;
}

/* 3D Earning Plan Card */
.plan-card-3d {
    background: rgba(15, 23, 42, 0.85);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 35px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
}

.plan-card-3d.featured {
    border-color: var(--primary);
    box-shadow: 0 0 35px var(--primary-glow);
    transform: scale(1.04);
}

.plan-card-3d:hover {
    transform: translateY(-12px) scale(1.03);
    border-color: var(--primary);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 35px var(--primary-glow);
}

.plan-card-3d .plan-badge {
    position: absolute;
    top: 18px;
    right: -32px;
    transform: rotate(45deg);
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 4px 35px;
    text-transform: uppercase;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.plan-card-3d .plan-price {
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    margin: 20px 0 10px;
    font-family: 'Space Grotesk', sans-serif;
}

.plan-card-3d .plan-features {
    list-style: none;
    margin: 25px 0;
    text-align: left;
}

.plan-card-3d .plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-card-3d .plan-features li i {
    color: #10b981;
}

/* 3D Wheel Spinner Container */
.wheel-container-3d {
    position: relative;
    width: 380px;
    height: 380px;
    margin: 0 auto;
    border-radius: 50%;
    padding: 15px;
    background: radial-gradient(circle, #1e293b, #0f172a);
    box-shadow: 
        0 20px 50px rgba(0,0,0,0.8),
        0 0 40px var(--primary-glow),
        inset 0 0 20px rgba(0,0,0,0.8);
    border: 4px solid var(--primary);
}

#wheel-canvas {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0,0,0,0.5);
}

.wheel-pointer-3d {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 48px;
    background: linear-gradient(135deg, #ffd700, #ff007a);
    clip-path: polygon(50% 100%, 0 0, 100% 0);
    z-index: 10;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.8));
    animation: pointerPulse 1.5s infinite;
}

.wheel-center-cap {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #fff, #0f172a);
    border: 3px solid #ffd700;
    box-shadow: 0 0 20px rgba(0,0,0,0.8);
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffd700;
    font-size: 1.3rem;
}

@keyframes pointerPulse {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(4px); }
}

/* 7-Day Streak Daily Check-In Grid */
.checkin-grid-3d {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.checkin-day-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px 12px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.checkin-day-card.claimed {
    background: rgba(16, 185, 129, 0.12);
    border-color: #10b981;
}

.checkin-day-card.active-today {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--primary);
    box-shadow: 0 0 25px var(--primary-glow);
    transform: scale(1.05);
}

.checkin-day-card.locked {
    opacity: 0.6;
}

.checkin-day-card .day-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.checkin-day-card .day-reward {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin: 8px 0;
    font-family: 'Space Grotesk', sans-serif;
}

.checkin-day-card.day-7 {
    background: linear-gradient(135deg, rgba(255, 0, 122, 0.2), rgba(121, 40, 202, 0.25));
    border-color: var(--accent);
}

/* Responsive Media Queries for 3D Effects */
@media (max-width: 1200px) {
    /* Large tablets and small laptops */
    .wheel-container-3d {
        width: 320px;
        height: 320px;
    }
    
    .plan-card-3d {
        padding: 28px 20px;
    }
    
    .plan-card-3d .plan-price {
        font-size: 2.4rem;
    }
    
    .coin-3d {
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }
}

@media (max-width: 992px) {
    /* Tablets */
    .wheel-container-3d {
        width: 280px;
        height: 280px;
    }
    
    .wheel-pointer-3d {
        width: 30px;
        height: 40px;
    }
    
    .wheel-center-cap {
        width: 55px;
        height: 55px;
        font-size: 1.1rem;
    }
    
    .plan-card-3d {
        padding: 24px 18px;
    }
    
    .plan-card-3d .plan-price {
        font-size: 2rem;
    }
    
    .plan-card-3d .plan-features li {
        font-size: 0.85rem;
    }
    
    .card-3d:hover {
        transform: translateY(-4px) rotateX(2deg) rotateY(-1deg);
    }
}

@media (max-width: 768px) {
    /* Mobile devices */
    .wheel-container-3d {
        width: 260px;
        height: 260px;
        padding: 12px;
    }
    
    .wheel-pointer-3d {
        width: 26px;
        height: 36px;
        top: -12px;
    }
    
    .wheel-center-cap {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .plan-card-3d {
        padding: 20px 16px;
        border-radius: 16px;
    }
    
    .plan-card-3d .plan-badge {
        right: -25px;
        font-size: 0.6rem;
        padding: 3px 25px;
    }
    
    .plan-card-3d .plan-price {
        font-size: 1.8rem;
        margin: 15px 0 8px;
    }
    
    .plan-card-3d .plan-features {
        margin: 20px 0;
    }
    
    .plan-card-3d .plan-features li {
        font-size: 0.8rem;
        padding: 8px 0;
    }
    
    .coin-3d {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }
    
    .card-3d {
        /* Reduce 3D effects on mobile for better performance */
        transform: none !important;
    }
    
    .card-3d:hover {
        transform: translateY(-4px) !important;
    }
    
    /* Disable 3D perspective on mobile for better performance */
    .card-3d-wrap {
        perspective: none;
    }
}

@media (max-width: 576px) {
    /* Small mobile devices */
    .wheel-container-3d {
        width: 240px;
        height: 240px;
        padding: 10px;
    }
    
    .wheel-pointer-3d {
        width: 24px;
        height: 32px;
        top: -10px;
    }
    
    .wheel-center-cap {
        width: 45px;
        height: 45px;
        font-size: 0.9rem;
    }
    
    .plan-card-3d {
        padding: 18px 14px;
        border-radius: 14px;
    }
    
    .plan-card-3d .plan-badge {
        right: -20px;
        font-size: 0.55rem;
        padding: 2px 20px;
    }
    
    .plan-card-3d .plan-price {
        font-size: 1.5rem;
        margin: 12px 0 6px;
    }
    
    .plan-card-3d .plan-features {
        margin: 16px 0;
    }
    
    .plan-card-3d .plan-features li {
        font-size: 0.75rem;
        padding: 6px 0;
    }
    
    .coin-3d {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
    
    .checkin-day-card {
        padding: 14px 10px;
    }
    
    .checkin-day-card .day-title {
        font-size: 0.7rem;
    }
    
    .checkin-day-card .day-reward {
        font-size: 1rem;
    }
}

/* Performance optimization for mobile */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .coin-3d {
        animation: none;
    }
    
    .animate-float {
        animation: none;
    }
    
    .animate-pulse-glow {
        animation: none;
    }
    
    /* Simplify 3D effects */
    .glass-panel {
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
    }
    
    .card-3d:hover {
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Disable hover effects on touch devices */
    .card-3d:hover {
        transform: none;
    }
    
    .plan-card-3d:hover {
        transform: none;
    }
    
    .coin-3d:hover {
        animation-play-state: paused;
    }
}


