/* ============================================
   Profile Frame Cosmetics - Animated Frames
   ============================================ */

/* Base frame style - applies to profile picture container */
.profile-frame {
    position: relative;
    border-radius: 9999px;
    padding: 4px;
}

/* Fire Frame - Animated flickering flames */
.frame-fire {
    background: linear-gradient(45deg, #ff4500, #ff8c00, #ffd700, #ff4500);
    background-size: 400% 400%;
    animation: fire-glow 2s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(255, 69, 0, 0.6),
                0 0 30px rgba(255, 140, 0, 0.4),
                0 0 45px rgba(255, 69, 0, 0.2);
}

.frame-fire::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 9999px;
    background: linear-gradient(45deg, #ff4500, #ff8c00, #ffd700, #ff4500);
    background-size: 400% 400%;
    animation: fire-glow 1.5s ease-in-out infinite reverse;
    z-index: -1;
    filter: blur(8px);
    opacity: 0.7;
}

@keyframes fire-glow {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(255, 69, 0, 0.6),
                    0 0 30px rgba(255, 140, 0, 0.4);
    }
    25% {
        background-position: 50% 100%;
        box-shadow: 0 0 20px rgba(255, 69, 0, 0.8),
                    0 0 40px rgba(255, 140, 0, 0.5);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 25px rgba(255, 69, 0, 0.7),
                    0 0 35px rgba(255, 140, 0, 0.4);
    }
    75% {
        background-position: 50% 0%;
        box-shadow: 0 0 18px rgba(255, 69, 0, 0.6),
                    0 0 32px rgba(255, 140, 0, 0.5);
    }
}

/* Ice Frame - Crystalline frost shimmer */
.frame-ice {
    background: linear-gradient(135deg, #00d4ff, #7dd3fc, #e0f2fe, #00d4ff);
    background-size: 400% 400%;
    animation: ice-shimmer 3s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.5),
                0 0 30px rgba(125, 211, 252, 0.3),
                inset 0 0 10px rgba(255, 255, 255, 0.3);
}

.frame-ice::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 9999px;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.4), rgba(125, 211, 252, 0.2), rgba(224, 242, 254, 0.3));
    animation: ice-pulse 2s ease-in-out infinite;
    z-index: -1;
    filter: blur(6px);
}

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

@keyframes ice-pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

/* Gold Frame - Metallic shine with sparkle */
.frame-gold {
    background: linear-gradient(135deg, #ffd700, #ffec8b, #daa520, #ffd700);
    background-size: 200% 200%;
    animation: gold-shine 3s linear infinite;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                0 0 20px rgba(218, 165, 32, 0.3);
    position: relative;
    overflow: visible;
}


.frame-gold::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 9999px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 8%),
                radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.6) 0%, transparent 6%),
                radial-gradient(circle at 80% 70%, rgba(255, 255, 255, 0.7) 0%, transparent 7%),
                radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.5) 0%, transparent 5%);
    animation: sparkle 1.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 10;
}

@keyframes gold-shine {
    0% {
        background-position: 200% 50%;
    }
    100% {
        background-position: -200% 50%;
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1) rotate(0deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) rotate(5deg);
    }
}

/* Emerald Frame - Rich green with glow */
.frame-emerald {
    background: linear-gradient(135deg, #10b981, #34d399, #6ee7b7, #10b981);
    background-size: 400% 400%;
    animation: emerald-pulse 4s ease-in-out infinite;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.5),
                0 0 30px rgba(52, 211, 153, 0.3);
}

@keyframes emerald-pulse {
    0%, 100% {
        background-position: 0% 50%;
        box-shadow: 0 0 15px rgba(16, 185, 129, 0.5),
                    0 0 30px rgba(52, 211, 153, 0.3);
    }
    50% {
        background-position: 100% 50%;
        box-shadow: 0 0 25px rgba(16, 185, 129, 0.7),
                    0 0 40px rgba(52, 211, 153, 0.4);
    }
}

/* Legendary Frame - Mystical purple aura */
.frame-legendary {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa, #c4b5fd, #8b5cf6);
    background-size: 400% 400%;
    animation: legendary-aura 3s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.6),
                0 0 40px rgba(167, 139, 250, 0.4),
                0 0 60px rgba(139, 92, 246, 0.2);
}

.frame-legendary::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 9999px;
    background: conic-gradient(from 0deg, #8b5cf6, #a78bfa, #c4b5fd, #8b5cf6);
    animation: legendary-rotate 4s linear infinite;
    z-index: -1;
    filter: blur(10px);
    opacity: 0.6;
}

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

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

/* ============================================
   Profile Name Color Cosmetics
   ============================================ */

.name-color-gold {
    background: linear-gradient(90deg, #ffd700, #ffec8b, #daa520);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.name-color-fire {
    background: linear-gradient(90deg, #ff4500, #ff8c00, #ffd700);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.name-color-ice {
    background: linear-gradient(90deg, #00d4ff, #7dd3fc, #e0f2fe);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.name-color-emerald {
    background: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
}

.name-color-legendary {
    background: linear-gradient(90deg, #8b5cf6, #a78bfa, #c4b5fd);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: bold;
    animation: name-shimmer 2s ease-in-out infinite;
    background-size: 200% 100%;
}

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

/* ============================================
   Profile Title Cosmetics
   ============================================ */

.title-style-default {
    font-size: 0.875rem;
    color: #6b7280;
}

.dark .title-style-default {
    color: #9ca3af;
}

.title-style-gold {
    font-size: 0.875rem;
    font-weight: 600;
    color: #daa520;
    text-shadow: 0 0 5px rgba(218, 165, 32, 0.3);
}

.title-style-legendary {
    font-size: 0.875rem;
    font-weight: 700;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================
   Profile Badge Cosmetics
   ============================================ */

.badge-glow-gold {
    filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.6));
}

.badge-glow-fire {
    filter: drop-shadow(0 0 4px rgba(255, 69, 0, 0.6));
}

.badge-glow-ice {
    filter: drop-shadow(0 0 4px rgba(0, 212, 255, 0.6));
}

.badge-glow-emerald {
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.6));
}

.badge-glow-legendary {
    filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.7));
    animation: badge-pulse 2s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 6px rgba(139, 92, 246, 0.7));
    }
    50% {
        filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.9));
    }
}

/* ============================================
   Neon Theme - Card and Cover Glow Effects
   ============================================ */

/* Subtle neon glow for profile cards */
.profile-theme-neon .profile-card {
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.3),
                0 0 30px rgba(236, 72, 153, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.3);
    transition: box-shadow 0.3s ease;
}

.profile-theme-neon .profile-card:hover {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4),
                0 0 40px rgba(236, 72, 153, 0.2);
}

/* Neon glow for cover photo container */
.profile-theme-neon .profile-card .rounded-t-lg {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.4),
                0 0 40px rgba(236, 72, 153, 0.2),
                0 15px 50px -10px rgba(168, 85, 247, 0.5);
}

/* All Games modal styling for all themes */
[class*="profile-theme-"] #allGamesModal > div:last-child {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px);
}

/* Neon theme specific modal styling */
.profile-theme-neon #allGamesModal > div:last-child {
    box-shadow: 0 0 30px rgba(168, 85, 247, 0.5),
                0 0 60px rgba(236, 72, 153, 0.3);
    border: 1px solid rgba(168, 85, 247, 0.5);
    background: rgba(30, 27, 75, 0.9) !important;
}

.profile-theme-neon #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #6b21a8, #a855f7, #ec4899) !important;
}

/* Golden Crown theme modal styling */
.profile-theme-golden-crown #allGamesModal > div:last-child {
    background: rgba(146, 64, 14, 0.95) !important;
    border: 1px solid rgba(251, 191, 36, 0.5);
    box-shadow: 0 0 30px rgba(251, 191, 36, 0.3);
}

.profile-theme-golden-crown #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #92400e, #b45309, #d97706) !important;
}

/* Ice King theme modal styling */
.profile-theme-ice-king #allGamesModal > div:last-child {
    background: rgba(12, 74, 110, 0.95) !important;
    border: 1px solid rgba(125, 211, 252, 0.5);
    box-shadow: 0 0 30px rgba(125, 211, 252, 0.3);
}

.profile-theme-ice-king #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #0c4a6e, #0369a1, #0ea5e9) !important;
}

/* Dark Knight theme modal styling */
.profile-theme-dark-knight #allGamesModal > div:last-child {
    background: rgba(26, 26, 46, 0.95) !important;
    border: 1px solid rgba(79, 70, 229, 0.5);
    box-shadow: 0 0 30px rgba(79, 70, 229, 0.3);
}

.profile-theme-dark-knight #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #1a1a2e, #16213e, #0f3460) !important;
}

/* Forest theme modal styling */
.profile-theme-forest #allGamesModal > div:last-child {
    background: rgba(20, 83, 45, 0.95) !important;
    border: 1px solid rgba(74, 222, 128, 0.5);
    box-shadow: 0 0 30px rgba(74, 222, 128, 0.3);
}

.profile-theme-forest #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #14532d, #166534, #15803d) !important;
}

/* Blood Moon theme modal styling */
.profile-theme-blood-moon #allGamesModal > div:last-child {
    background: rgba(69, 10, 10, 0.95) !important;
    border: 1px solid rgba(220, 38, 38, 0.5);
    box-shadow: 0 0 30px rgba(220, 38, 38, 0.4);
}

.profile-theme-blood-moon #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #450a0a, #7f1d1d, #991b1b) !important;
}

/* Ocean Depth theme modal styling */
.profile-theme-ocean-depth #allGamesModal > div:last-child {
    background: rgba(4, 47, 46, 0.95) !important;
    border: 1px solid rgba(20, 184, 166, 0.5);
    box-shadow: 0 0 30px rgba(20, 184, 166, 0.3);
}

.profile-theme-ocean-depth #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #042f2e, #134e4a, #0f766e) !important;
}

/* Galaxy theme modal styling */
.profile-theme-galaxy #allGamesModal > div:last-child {
    background: rgba(30, 27, 75, 0.9) !important;
    border: 1px solid rgba(192, 132, 252, 0.5);
    box-shadow: 0 0 30px rgba(192, 132, 252, 0.4), 0 0 60px rgba(236, 72, 153, 0.2);
}

.profile-theme-galaxy #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #1e1b4b, #581c87, #831843) !important;
}

/* Toxic theme modal styling */
.profile-theme-toxic #allGamesModal > div:last-child {
    background: rgba(26, 46, 5, 0.95) !important;
    border: 1px solid rgba(132, 204, 22, 0.5);
    box-shadow: 0 0 30px rgba(132, 204, 22, 0.4);
}

.profile-theme-toxic #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #1a2e05, #365314, #3f6212) !important;
}

/* Sunset theme modal styling */
.profile-theme-sunset #allGamesModal > div:last-child {
    background: rgba(124, 45, 18, 0.95) !important;
    border: 1px solid rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.4);
}

.profile-theme-sunset #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #7c2d12, #c2410c, #db2777) !important;
}

/* Aurora theme modal styling */
.profile-theme-aurora #allGamesModal > div:last-child {
    background: rgba(6, 78, 59, 0.9) !important;
    border: 1px solid rgba(52, 211, 153, 0.5);
    box-shadow: 0 0 30px rgba(52, 211, 153, 0.3), 0 0 60px rgba(139, 92, 246, 0.2);
}

.profile-theme-aurora #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #064e3b, #0c4a6e, #312e81, #581c87) !important;
}

/* ============================================
   Fire Storm Theme - Canvas Fire Particle Effects
   ============================================ */

/* Fire animation for cards */
.profile-theme-fire-storm .profile-card {
    position: relative;
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.4),
                0 0 40px rgba(220, 38, 38, 0.3);
}

.profile-theme-fire-storm .profile-card:hover {
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.6),
                0 0 60px rgba(220, 38, 38, 0.4);
}

/* Canvas container for fire particles */
.profile-theme-fire-storm .fire-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: block;
}

/* Ensure card content is above canvas - don't make them relatively positioned */
.profile-theme-fire-storm .profile-card > *:not(.fire-canvas) {
    position: relative;
    z-index: 1;
}

/* Fire Storm modal styling */
.profile-theme-fire-storm #allGamesModal > div:last-child {
    position: relative;
    background: rgba(127, 29, 29, 0.95) !important;
    border: 1px solid rgba(249, 115, 22, 0.5);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.5),
                0 0 60px rgba(220, 38, 38, 0.3);
}

.profile-theme-fire-storm #allGamesModal .bg-gradient-to-r {
    background: linear-gradient(to right, #7f1d1d, #b91c1c, #dc2626) !important;
}

/* Fire canvas for modal */
.profile-theme-fire-storm #allGamesModal .fire-canvas-modal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    display: block;
}

.profile-theme-fire-storm #allGamesModal > div:last-child > *:not(.fire-canvas-modal) {
    position: relative;
    z-index: 1;
}
