/* Enhanced UI Features - Skeleton Loaders, Animations, Visual Effects */

/* ========================================
   SKELETON LOADERS
   ======================================== */

.skeleton {
    background: linear-gradient(
        90deg,
        var(--glass-bg) 0%,
        rgba(255, 255, 255, 0.08) 50%,
        var(--glass-bg) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
    border-radius: 4px;
}

.skeleton-title {
    height: 1.5em;
    width: 60%;
    margin-bottom: 0.75em;
}

.skeleton-card {
    height: 120px;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
}

.skeleton-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.skeleton-button {
    height: 48px;
    border-radius: var(--radius-md);
}

/* ========================================
   MICRO-ANIMATIONS
   ======================================== */

/* Pulse animation for notifications */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce animation for success */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.bounce {
    animation: bounce 0.6s ease-in-out;
}

/* Shake animation for errors */
@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

.shake {
    animation: shake 0.4s ease-in-out;
}

/* Slide in from bottom */
@keyframes slideInBottom {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.slide-in-bottom {
    animation: slideInBottom 0.3s ease-out;
}

/* Slide in from right */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

/* Fade in */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* Scale in */
@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.scale-in {
    animation: scaleIn 0.3s ease-out;
}

/* Shimmer effect for premium items */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Rainbow gradient animation */
@keyframes rainbow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.rainbow {
    background: linear-gradient(
        90deg,
        #00f2fe,
        #a855f7,
        #fbbf24,
        #10b981,
        #00f2fe
    );
    background-size: 200% 100%;
    animation: rainbow 3s ease infinite;
}

/* Glow pulse animation */
@keyframes glowPulse {
    0%, 100% {
        box-shadow: 0 0 20px var(--primary-glow);
    }
    50% {
        box-shadow: 0 0 40px var(--primary-glow), 0 0 60px var(--primary-glow);
    }
}

.glow-pulse {
    animation: glowPulse 2s ease-in-out infinite;
}

/* ========================================
   VISUAL EFFECTS & AURAS
   ======================================== */

/* Aura effects */
.aura {
    position: relative;
    z-index: 1;
}

.aura::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: inherit;
    padding: 2px;
    z-index: -1;
    opacity: 0.8;
    animation: glowPulse 2s ease-in-out infinite;
}

.aura-golden::before {
    background: var(--gradient-gold);
    box-shadow: 0 0 30px var(--gold-glow);
}

.aura-platinum::before {
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    box-shadow: 0 0 30px rgba(229, 231, 235, 0.5);
}

.aura-prismatic::before {
    background: linear-gradient(135deg, #00f2fe, #a855f7, #fbbf24);
    background-size: 200% 200%;
    animation: rainbow 3s ease infinite;
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5);
}

.aura-founder::before {
    background: var(--gradient-primary);
    box-shadow: 0 0 30px var(--primary-glow);
}

.aura-prosperity::before {
    background: var(--gradient-gold);
    box-shadow: 0 0 30px var(--gold-glow);
}

.aura-innovation::before {
    background: var(--gradient-secondary);
    box-shadow: 0 0 30px var(--secondary-glow);
}

/* Prestige frames */
.frame {
    position: relative;
    padding: 4px;
    border-radius: var(--radius-lg);
}

.frame-bronze {
    background: linear-gradient(135deg, #cd7f32 0%, #8b5a00 100%);
}

.frame-silver {
    background: linear-gradient(135deg, #c0c0c0 0%, #808080 100%);
}

.frame-gold {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 0 20px var(--gold-glow);
}

.frame-platinum {
    background: linear-gradient(135deg, #e5e7eb 0%, #9ca3af 100%);
    box-shadow: 0 0 20px rgba(229, 231, 235, 0.5);
}

.frame-diamond {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.frame-legendary {
    background: linear-gradient(135deg, #00f2fe, #a855f7, #fbbf24);
    background-size: 200% 200%;
    animation: rainbow 3s ease infinite;
    box-shadow: 0 0 30px var(--primary-glow);
}

/* ========================================
   PROGRESS FEEDBACK
   ======================================== */

/* Progress bar with animated gradient */
.progress-bar {
    height: 8px;
    background: var(--glass-bg);
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.progress-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 999px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmer 2s infinite;
}

/* Circular progress indicator */
.progress-circle {
    position: relative;
    width: 100px;
    height: 100px;
}

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

.progress-circle-bg {
    fill: none;
    stroke: var(--glass-bg);
    stroke-width: 8;
}

.progress-circle-fill {
    fill: none;
    stroke: url(#progressGradient);
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.5s ease;
}

/* ========================================
   CLAIM REWARD CEREMONY
   ======================================== */

.reward-ceremony {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-in;
}

.reward-ceremony-content {
    text-align: center;
    animation: scaleIn 0.5s ease-out;
}

.reward-icon {
    font-size: 120px;
    margin-bottom: 1rem;
    animation: bounce 0.6s ease-in-out;
    filter: drop-shadow(0 0 30px var(--gold-glow));
}

.reward-title {
    font-size: 2rem;
    font-weight: bold;
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.reward-items {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

.reward-item {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border-glow);
    animation: slideInBottom 0.5s ease-out;
    animation-delay: 0.3s;
    animation-fill-mode: both;
}

.reward-item:nth-child(2) {
    animation-delay: 0.4s;
}

.reward-item:nth-child(3) {
    animation-delay: 0.5s;
}

/* ========================================
   BADGE DISPLAY
   ======================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
}

.badge-rare {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(37, 99, 235, 0.2));
    border-color: rgba(59, 130, 246, 0.5);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
}

.badge-epic {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(147, 51, 234, 0.2));
    border-color: rgba(168, 85, 247, 0.5);
    box-shadow: 0 0 20px var(--secondary-glow);
}

.badge-legendary {
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.2), rgba(245, 158, 11, 0.2));
    border-color: rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 20px var(--gold-glow);
    animation: glowPulse 2s ease-in-out infinite;
}

/* ========================================
   LOCKED CONTENT VISUALIZATION
   ======================================== */

.locked-content {
    position: relative;
    filter: blur(4px) brightness(0.5);
    pointer-events: none;
}

.locked-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: inherit;
    z-index: 10;
}

.locked-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.locked-text {
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-align: center;
}

/* ========================================
   TRANSITION UTILITIES
   ======================================== */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.15s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-glow:hover {
    box-shadow: var(--shadow-glow);
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   NOTIFICATION BADGE
   ======================================== */

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: var(--danger-color);
    color: white;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.5);
    animation: pulse 2s ease-in-out infinite;
}

/* ========================================
   TOOLTIP
   ======================================== */

.tooltip {
    position: relative;
    cursor: help;
}

.tooltip-text {
    visibility: hidden;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg-solid);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    white-space: nowrap;
    border: 1px solid var(--border-glow);
    box-shadow: var(--shadow-md);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--card-bg-solid);
}
