/* ===== TAB-SPECIFIC ANIMATIONS & EFFECTS ===== */

/* Achievement Hunt Card */
.achievement-hunt-card {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 8px 25px rgba(255, 216, 155, 0.4);
    animation: slideInDown 0.6s ease;
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hunt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.hunt-header h3 {
    margin: 0;
    font-size: 20px;
}

.hunt-streak {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px 16px;
    border-radius: 20px;
}

.streak-icon {
    font-size: 24px;
    animation: fireFlicker 1s infinite;
}

@keyframes fireFlicker {
    0%, 100% { transform: scale(1); filter: brightness(1); }
    50% { transform: scale(1.1); filter: brightness(1.2); }
}

.streak-count {
    font-size: 18px;
    font-weight: 700;
}

.hunt-description {
    margin: 12px 0;
    opacity: 0.9;
}

.hunt-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.hunt-stat {
    background: rgba(255, 255, 255, 0.15);
    padding: 16px;
    border-radius: 12px;
    text-align: center;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    opacity: 0.8;
}

/* Floating Bonus */
.floating-bonus {
    position: fixed;
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
    pointer-events: none;
    z-index: 10000;
    animation: floatUp 1s ease-out forwards;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

@keyframes floatUp {
    to {
        transform: translateY(-100px);
        opacity: 0;
    }
}

/* Particle Effects */
.particle {
    position: fixed;
    font-size: 20px;
    pointer-events: none;
    z-index: 10000;
    animation: particleBurst 1s ease-out forwards;
}

@keyframes particleBurst {
    to {
        transform: translate(var(--tx), var(--ty));
        opacity: 0;
    }
}

/* Progress Wheel */
.progress-wheel-card {
    background: var(--bg-primary);
    border: 3px solid var(--accent-primary);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    text-align: center;
    animation: zoomIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wheel-container {
    position: relative;
    display: inline-block;
    margin-bottom: 16px;
}

.progress-ring {
    transform: rotate(-90deg);
}

.progress-ring-circle-bg {
    fill: none;
    stroke: var(--border-color);
    stroke-width: 10;
}

.progress-ring-circle {
    fill: none;
    stroke: url(#gradient);
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 534;
    transition: stroke-dashoffset 1s ease;
    animation: ringPulse 2s ease infinite;
}

@keyframes ringPulse {
    0%, 100% { stroke-width: 12; }
    50% { stroke-width: 14; }
}

.wheel-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.wheel-percentage {
    font-size: 48px;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.wheel-label {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 600;
}

.wheel-message {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    animation: messageBounce 1s ease infinite;
}

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

/* Activity Radar */
.activity-radar-card {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 24px;
    color: white;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.5);
}

.radar-header h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
}

.radar-display {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.radar-circle {
    position: relative;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(42, 82, 152, 0.4) 0%, rgba(30, 60, 114, 0.8) 100%);
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.radar-sweep {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(16, 185, 129, 0.5) 45deg,
        transparent 90deg
    );
    animation: radarSweep 4s linear infinite;
}

@keyframes radarSweep {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.radar-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

.user-dot {
    font-size: 32px;
    animation: userPulse 2s ease infinite;
}

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

.radar-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.ring-1 { width: 33%; height: 33%; }
.ring-2 { width: 66%; height: 66%; }
.ring-3 { width: 100%; height: 100%; }

.radar-blip {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: blipPulse 2s ease infinite;
    box-shadow: 0 0 10px currentColor;
}

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

.radar-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 20px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.legend-dot {
    font-size: 20px;
}

/* Distance Simulator */
.distance-simulator-card {
    background: var(--bg-primary);
    border: 2px solid var(--accent-primary);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    animation: slideInRight 0.6s ease;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sim-header h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
    font-size: 20px;
}

.sim-slider-container {
    text-align: center;
    margin-bottom: 24px;
}

.sim-slider {
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: var(--border-color);
    outline: none;
    margin-bottom: 12px;
}

.sim-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--accent-gradient);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(14, 165, 233, 0.4);
}

.sim-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-primary);
}

.sim-visualization {
    position: relative;
    height: 80px;
    background: linear-gradient(to right, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-radius: 12px;
    margin: 24px 0;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.sim-user {
    font-size: 32px;
    animation: walking 1s ease infinite;
}

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

.sim-path {
    position: absolute;
    left: 40px;
    height: 4px;
    background: var(--accent-gradient);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.sim-target {
    position: absolute;
    font-size: 32px;
    transition: left 0.3s ease;
    animation: targetBounce 1s ease infinite;
}

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

.sim-info {
    text-align: center;
    margin-top: 16px;
}

.travel-time {
    display: flex;
    justify-content: space-around;
    font-size: 18px;
    color: var(--text-primary);
    font-weight: 600;
}

/* Referral Fireworks */
.referral-fireworks-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 24px;
    color: white;
    text-align: center;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    position: relative;
    overflow: hidden;
}

.fireworks-header h3 {
    margin: 0 0 24px 0;
    font-size: 24px;
}

.fireworks-display {
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.firework-container {
    position: absolute;
    width: 100%;
    height: 100%;
}

.firework {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: explode 1.5s ease-out;
}

@keyframes explode {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    50% {
        transform: scale(20);
        opacity: 1;
    }
    100% {
        transform: scale(30);
        opacity: 0;
    }
}

.referral-count-big {
    font-size: 80px;
    font-weight: 700;
    margin: 20px 0;
    animation: countPulse 1.5s ease infinite;
}

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

.referral-label {
    font-size: 18px;
    opacity: 0.9;
}

.celebrate-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 30px;
    padding: 14px 32px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 24px;
    transition: all 0.3s ease;
}

.celebrate-btn:hover {
    background: white;
    color: #667eea;
    transform: scale(1.05);
}

/* Invite Challenge */
.invite-challenge-card {
    background: var(--bg-primary);
    border: 2px solid var(--accent-secondary);
    border-radius: 16px;
    padding: 24px;
    margin: 24px 0;
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.challenge-header h3 {
    margin: 0 0 20px 0;
    color: var(--text-primary);
}

.challenge-milestones {
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.milestone {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.milestone.completed {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-color: #10b981;
    animation: milestoneComplete 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes milestoneComplete {
    0% { transform: scale(0.8); opacity: 0; }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); opacity: 1; }
}

.milestone-icon {
    font-size: 32px;
    animation: iconSpin 3s ease infinite;
}

@keyframes iconSpin {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(10deg); }
}

.milestone-info {
    flex: 1;
}

.milestone-count {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
}

.milestone-reward {
    color: var(--accent-primary);
    font-weight: 700;
    font-size: 14px;
}

.milestone-check {
    font-size: 24px;
    color: #10b981;
    animation: checkPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes checkPop {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.challenge-progress {
    position: relative;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent-gradient);
    transition: width 0.8s ease;
    border-radius: 12px;
    animation: progressShine 2s ease infinite;
}

@keyframes progressShine {
    0% { box-shadow: inset 0 0 0 rgba(255, 255, 255, 0); }
    50% { box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.3); }
    100% { box-shadow: inset 0 0 0 rgba(255, 255, 255, 0); }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Confetti */
.confetti {
    position: fixed;
    top: -10%;
    font-size: 24px;
    animation: confettiFall 4s linear forwards;
    pointer-events: none;
    z-index: 10000;
}

@keyframes confettiFall {
    to {
        transform: translateY(110vh) rotate(720deg);
        opacity: 0;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hunt-stats {
        gap: 8px;
    }
    
    .stat-value {
        font-size: 24px;
    }
    
    .radar-circle {
        width: 200px;
        height: 200px;
    }
    
    .referral-count-big {
        font-size: 60px;
    }
    
    .travel-time {
        flex-direction: column;
        gap: 8px;
    }
}
