/**
 * Gamification System - Neon Signs Aesthetic
 * Badges, Levels, XP Progress, and Leaderboard
 */

/* ============================================================
   BADGE STYLES
   ============================================================ */

.neo-badge {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 2px 4px;
    display: inline-block;
    animation: neon-flicker 3s ease-in-out infinite;
    white-space: nowrap;
}

/* Badge-specific animations */
.neo-badge-founder {
    animation: neon-pulse-gold 2s ease-in-out infinite;
}

.neo-badge-admin {
    animation: neon-pulse-red 2s ease-in-out infinite;
}

.neo-badge-mod {
    animation: neon-pulse-green 2s ease-in-out infinite;
}

.neo-badge-verified {
    animation: neon-pulse-cyan 2.5s ease-in-out infinite;
}

.neo-badge-wallet {
    animation: neon-pulse-purple 2.5s ease-in-out infinite;
}

.neo-badge-og {
    animation: neon-pulse-orange 2s ease-in-out infinite;
}

/* Keyframes for Neon Glow Effects */
@keyframes neon-flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.95; }
    52% { opacity: 1; }
    53% { opacity: 0.9; }
    55% { opacity: 1; }
}

@keyframes neon-pulse-gold {
    0%, 100% { text-shadow: 0 0 8px #FFD700, 0 0 12px #FFD700, 0 0 20px #FFD700; }
    50% { text-shadow: 0 0 4px #FFD700, 0 0 8px #FFD700, 0 0 12px #FFD700; }
}

@keyframes neon-pulse-red {
    0%, 100% { text-shadow: 0 0 8px #FF4444, 0 0 12px #FF4444, 0 0 20px #FF4444; }
    50% { text-shadow: 0 0 4px #FF4444, 0 0 8px #FF4444, 0 0 12px #FF4444; }
}

@keyframes neon-pulse-green {
    0%, 100% { text-shadow: 0 0 8px #00FF88, 0 0 12px #00FF88, 0 0 20px #00FF88; }
    50% { text-shadow: 0 0 4px #00FF88, 0 0 8px #00FF88, 0 0 12px #00FF88; }
}

@keyframes neon-pulse-cyan {
    0%, 100% { text-shadow: 0 0 8px #00FFFF, 0 0 12px #00FFFF, 0 0 20px #00FFFF; }
    50% { text-shadow: 0 0 4px #00FFFF, 0 0 8px #00FFFF, 0 0 12px #00FFFF; }
}

@keyframes neon-pulse-purple {
    0%, 100% { text-shadow: 0 0 8px #9945FF, 0 0 12px #9945FF, 0 0 20px #9945FF; }
    50% { text-shadow: 0 0 4px #9945FF, 0 0 8px #9945FF, 0 0 12px #9945FF; }
}

@keyframes neon-pulse-orange {
    0%, 100% { text-shadow: 0 0 8px #FF6600, 0 0 12px #FF6600, 0 0 20px #FF6600; }
    50% { text-shadow: 0 0 4px #FF6600, 0 0 8px #FF6600, 0 0 12px #FF6600; }
}

/* ============================================================
   LEVEL DISPLAY
   ============================================================ */

.neo-level {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: 600;
    color: #00FFFF;
    letter-spacing: 2px;
    text-shadow: 0 0 6px #00FFFF, 0 0 10px #00FFFF;
    display: inline-block;
    padding: 2px 8px;
    border-left: 1px solid rgba(0, 255, 255, 0.3);
    border-right: 1px solid rgba(0, 255, 255, 0.3);
}

/* ============================================================
   USER FLAIR (Combined Badges + Level)
   ============================================================ */

.neo-user-flair {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: flex-start;
}

.neo-user-flair .neo-badges-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.neo-user-flair .neo-username {
    font-family: 'Space Mono', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Compact Mode (for chat) */
.neo-user-flair.compact {
    flex-direction: row;
    gap: 8px;
    align-items: center;
}

.neo-user-flair.compact .neo-level {
    font-size: 0.6rem;
    padding: 1px 4px;
}

.neo-user-flair.compact .neo-badge {
    font-size: 0.65rem;
}

/* ============================================================
   XP PROGRESS BAR
   ============================================================ */

.neo-xp-container {
    width: 100%;
    max-width: 300px;
    margin: 8px 0;
}

.neo-xp-bar {
    height: 8px;
    background: rgba(0, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid rgba(0, 255, 255, 0.3);
    position: relative;
}

.neo-xp-fill {
    height: 100%;
    background: linear-gradient(90deg, #00FFFF, #00FF88);
    border-radius: 3px;
    transition: width 0.5s ease-out;
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.neo-xp-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.65rem;
    color: #888;
    margin-top: 4px;
    display: flex;
    justify-content: space-between;
}

/* ============================================================
   LEVEL UP NOTIFICATION
   ============================================================ */

.neo-level-up-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: linear-gradient(135deg, rgba(0, 255, 255, 0.15), rgba(0, 0, 0, 0.9));
    border: 2px solid #00FFFF;
    border-radius: 16px;
    padding: 40px 60px;
    text-align: center;
    z-index: 10000;
    opacity: 0;
    animation: level-up-appear 0.5s ease-out forwards;
    box-shadow: 0 0 40px rgba(0, 255, 255, 0.4), 0 0 80px rgba(0, 255, 255, 0.2);
}

.neo-level-up-notification.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.neo-level-up-notification h2 {
    font-family: 'Space Mono', monospace;
    font-size: 2rem;
    color: #00FFFF;
    text-shadow: 0 0 20px #00FFFF;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    letter-spacing: 4px;
}

.neo-level-up-notification .level-number {
    font-size: 4rem;
    font-weight: 800;
    color: #FFD700;
    text-shadow: 0 0 30px #FFD700, 0 0 60px #FFD700;
    display: block;
    margin: 15px 0;
}

.neo-level-up-notification .new-title {
    font-size: 1.2rem;
    color: #00FF88;
    text-transform: uppercase;
    letter-spacing: 2px;
}

@keyframes level-up-appear {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

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

.neo-badge-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.95);
    border: 1px solid #00FFFF;
    border-radius: 12px;
    padding: 20px 30px;
    z-index: 9999;
    animation: slide-in-right 0.4s ease-out;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.neo-badge-notification .badge-label {
    font-family: 'Space Mono', monospace;
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.neo-badge-notification .badge-display {
    font-size: 2rem;
    margin: 10px 0;
}

.neo-badge-notification .badge-name {
    font-size: 1rem;
    color: #fff;
    font-weight: 600;
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ============================================================
   XP POPUP (Floating +XP)
   ============================================================ */

.neo-xp-popup {
    position: fixed;
    pointer-events: none;
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    color: #00FF88;
    text-shadow: 0 0 10px #00FF88;
    animation: xp-float 1.5s ease-out forwards;
    z-index: 9998;
}

@keyframes xp-float {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(-50px);
    }
}

/* ============================================================
   LEADERBOARD
   ============================================================ */

.neo-leaderboard {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
}

.neo-leaderboard-header {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    color: #00FFFF;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0, 255, 255, 0.2);
    text-align: center;
}

.neo-leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.neo-leaderboard-entry:hover {
    background: rgba(0, 255, 255, 0.1);
}

.neo-leaderboard-rank {
    font-family: 'Space Mono', monospace;
    font-size: 1.2rem;
    font-weight: 700;
    width: 30px;
    text-align: center;
}

.neo-leaderboard-rank.rank-1 { color: #FFD700; text-shadow: 0 0 10px #FFD700; }
.neo-leaderboard-rank.rank-2 { color: #C0C0C0; text-shadow: 0 0 8px #C0C0C0; }
.neo-leaderboard-rank.rank-3 { color: #CD7F32; text-shadow: 0 0 8px #CD7F32; }
.neo-leaderboard-rank.rank-other { color: #666; }

.neo-leaderboard-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid rgba(0, 255, 255, 0.3);
}

.neo-leaderboard-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.neo-leaderboard-username {
    font-weight: 600;
    color: #fff;
    font-size: 0.9rem;
}

.neo-leaderboard-badges {
    font-size: 0.75rem;
}

.neo-leaderboard-xp {
    font-family: 'Space Mono', monospace;
    font-size: 0.85rem;
    color: #00FF88;
    text-align: right;
}

.neo-leaderboard-xp span {
    font-size: 0.65rem;
    color: #666;
}

/* ============================================================
   PROFILE CARD INTEGRATION
   ============================================================ */

.neo-profile-gamification {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(0, 255, 255, 0.2);
}

.neo-profile-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.neo-profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    text-align: center;
}

.neo-profile-stat {
    background: rgba(0, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
}

.neo-profile-stat .stat-value {
    font-family: 'Space Mono', monospace;
    font-size: 1.4rem;
    font-weight: 700;
    color: #00FFFF;
}

.neo-profile-stat .stat-label {
    font-size: 0.7rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ============================================================
   CHAT MESSAGE INTEGRATION
   ============================================================ */

.chat-message .neo-user-flair {
    margin-bottom: 4px;
}

.chat-message .neo-badge {
    font-size: 0.6rem;
}

.chat-message .neo-level {
    font-size: 0.55rem;
    padding: 1px 3px;
}

/* Inline flair for chat bubbles */
.chat-user-flair {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 6px;
    vertical-align: middle;
}

.chat-user-flair .neo-badge {
    font-size: 0.55rem;
    padding: 1px 3px;
}

.chat-user-flair .neo-level {
    font-size: 0.5rem;
    padding: 1px 4px;
    border-left: none;
    border-right: none;
}

/* Ensure flair wraps nicely on small screens */
.chat-message-content .sender {
    display: inline;
}

.chat-message-content .chat-user-flair {
    display: inline-flex;
    flex-wrap: wrap;
}

/* ============================================================
   HEADER LEVEL INDICATOR
   ============================================================ */

.header-level-indicator {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(24, 24, 27, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-accent-cyan);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.header-level-indicator:hover {
    background: rgba(45, 212, 191, 0.1);
    border-color: rgba(45, 212, 191, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 212, 191, 0.1);
}

.header-xp-sep {
    margin: 0 3px;
    color: #00FF88;
}

/* XP Progress Popup */
.xp-progress-popup {
    position: fixed;
    top: 72px;
    right: 32px;
    width: 320px;
    background: transparent;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    z-index: 10000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
    animation: fadeSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.xp-progress-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.xp-progress-popup-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--color-accent-cyan);
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* .xp-progress-popup-close styles handled by universal .close-btn rule in style.css */

.xp-progress-level {
    text-align: center;
    margin-bottom: 15px;
}

.xp-progress-level-number {
    font-size: 32px;
    font-weight: 800;
    color: #fff;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.xp-progress-level-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-accent-cyan);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-family: 'Inter', sans-serif;
}

.xp-progress-bar-container {
    margin-bottom: 10px;
}

.xp-progress-bar {
    height: 12px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 100px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.xp-progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #2dd4bf, #10b981);
    border-radius: 100px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
}

.xp-progress-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #888;
    font-family: 'Space Mono', monospace;
}

.xp-progress-next {
    text-align: center;
    font-size: 0.75rem;
    color: #666;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Space Mono', monospace;
}

/* ============================================================
   SHOP COSMETICS - AVATAR FRAMES
   ============================================================ */

/* Ensure post sidebar author pic is circular and clips frames correctly */
.post-sidebar-pic {
    border-radius: 50%;
    box-sizing: border-box;
    width: 48px;
    height: 48px;
    object-fit: cover;
    display: block;
}

/* Base avatar frame styling — applies in chat, profile modal, account dashboard, and post detail */
.chat-avatar.neo-frame-white,      .account-profile-pic.neo-frame-white,      .public-profile-pic.neo-frame-white,      .post-sidebar-pic.neo-frame-white,
.chat-avatar.neo-frame-cyan,       .account-profile-pic.neo-frame-cyan,       .public-profile-pic.neo-frame-cyan,       .post-sidebar-pic.neo-frame-cyan,
.chat-avatar.neo-frame-purple,     .account-profile-pic.neo-frame-purple,     .public-profile-pic.neo-frame-purple,     .post-sidebar-pic.neo-frame-purple,
.chat-avatar.neo-frame-red,        .account-profile-pic.neo-frame-red,        .public-profile-pic.neo-frame-red,        .post-sidebar-pic.neo-frame-red,
.chat-avatar.neo-frame-gold,       .account-profile-pic.neo-frame-gold,       .public-profile-pic.neo-frame-gold,       .post-sidebar-pic.neo-frame-gold,
.chat-avatar.neo-frame-rainbow,    .account-profile-pic.neo-frame-rainbow,    .public-profile-pic.neo-frame-rainbow,    .post-sidebar-pic.neo-frame-rainbow {
    border-width: 3px;
    border-style: solid;
}

/* White Frame */
.chat-avatar.neo-frame-white, .account-profile-pic.neo-frame-white, .public-profile-pic.neo-frame-white, .post-sidebar-pic.neo-frame-white {
    border-color: #FFFFFF;
    box-shadow: 0 0 8px #FFFFFF, 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Cyan Frame */
.chat-avatar.neo-frame-cyan, .account-profile-pic.neo-frame-cyan, .public-profile-pic.neo-frame-cyan, .post-sidebar-pic.neo-frame-cyan {
    border-color: #00FFFF;
    box-shadow: 0 0 8px #00FFFF, 0 0 12px rgba(0, 255, 255, 0.5);
}

/* Purple Frame */
.chat-avatar.neo-frame-purple, .account-profile-pic.neo-frame-purple, .public-profile-pic.neo-frame-purple, .post-sidebar-pic.neo-frame-purple {
    border-color: #9945FF;
    box-shadow: 0 0 8px #9945FF, 0 0 12px rgba(153, 69, 255, 0.5);
}

/* Red Frame */
.chat-avatar.neo-frame-red, .account-profile-pic.neo-frame-red, .public-profile-pic.neo-frame-red, .post-sidebar-pic.neo-frame-red {
    border-color: #FF4444;
    box-shadow: 0 0 8px #FF4444, 0 0 12px rgba(255, 68, 68, 0.5);
}

/* Gold Frame */
.chat-avatar.neo-frame-gold, .account-profile-pic.neo-frame-gold, .public-profile-pic.neo-frame-gold, .post-sidebar-pic.neo-frame-gold {
    border-color: #FFD700;
    box-shadow: 0 0 8px #FFD700, 0 0 12px rgba(255, 215, 0, 0.5);
    animation: frame-pulse-gold 2s ease-in-out infinite;
}

/* Rainbow Frame - Animated gradient */
.chat-avatar.neo-frame-rainbow, .account-profile-pic.neo-frame-rainbow, .public-profile-pic.neo-frame-rainbow, .post-sidebar-pic.neo-frame-rainbow {
    border-color: transparent;
    background-clip: padding-box;
    position: relative;
}

.chat-avatar.neo-frame-rainbow::before,
.account-profile-pic.neo-frame-rainbow::before,
.public-profile-pic.neo-frame-rainbow::before,
.post-sidebar-pic.neo-frame-rainbow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #ff0000, #ff7700, #ffdd00, #00ff00, #00ffff, #0077ff, #9945ff, #ff0077);
    background-size: 400% 400%;
    border-radius: 50%;
    z-index: -1;
    animation: rainbow-rotate 3s linear infinite;
}

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

@keyframes frame-pulse-gold {
    0%, 100% { box-shadow: 0 0 8px #FFD700, 0 0 12px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 12px #FFD700, 0 0 20px rgba(255, 215, 0, 0.7); }
}

/* ============================================================
   SHOP COSMETICS - CHAT EFFECTS
   ============================================================ */

/* Glitch Effect (formerly sparkles) */
.chat-message-bubble.neo-effect-sparkles {
    position: relative;
}

.chat-message-bubble.neo-effect-sparkles .message-text {
    animation: glitch-text 2s infinite;
}

.chat-message-bubble.neo-effect-sparkles::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.03), transparent);
    animation: glitch-scan 2s linear infinite;
    pointer-events: none;
}

@keyframes glitch-text {
    0%, 98%, 100% { text-shadow: none; }
    99% { text-shadow: 2px 0 #00ffff, -2px 0 #ff00ff; }
}

@keyframes glitch-scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Neon Glow Effect */
.chat-message-bubble.neo-effect-glow {
    position: relative;
}

.chat-message-bubble.neo-effect-glow .message-text {
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.5);
}

.chat-message-bubble.neo-effect-glow::after {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border-radius: inherit;
    background: transparent;
    border: 1px solid rgba(0, 255, 255, 0.3);
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.2), inset 0 0 10px rgba(0, 255, 255, 0.05);
    pointer-events: none;
    animation: glow-pulse 3s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* ============================================================
   SHOP COSMETICS - NAME COLORS
   ============================================================ */

/* Name colors apply in chat (.sender), profile modals (.public-username), and post detail (.post-sidebar-author-name) */
.sender.neo-name-color_cyan, .public-username.neo-name-color_cyan, .post-sidebar-author-name.neo-name-color_cyan {
    color: #00FFFF !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.6);
}
.sender.neo-name-color_green, .public-username.neo-name-color_green, .post-sidebar-author-name.neo-name-color_green {
    color: #00FF88 !important;
    text-shadow: 0 0 8px rgba(0, 255, 136, 0.6);
}
.sender.neo-name-color_orange, .public-username.neo-name-color_orange, .post-sidebar-author-name.neo-name-color_orange {
    color: #FF8C00 !important;
    text-shadow: 0 0 8px rgba(255, 140, 0, 0.6);
}
.sender.neo-name-color_pink, .public-username.neo-name-color_pink, .post-sidebar-author-name.neo-name-color_pink {
    color: #FF69B4 !important;
    text-shadow: 0 0 8px rgba(255, 105, 180, 0.6);
}
.sender.neo-name-color_gold, .public-username.neo-name-color_gold, .post-sidebar-author-name.neo-name-color_gold {
    color: #FFD700 !important;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.7);
    animation: name-pulse-gold 2.5s ease-in-out infinite;
}

@keyframes name-pulse-gold {
    0%, 100% { text-shadow: 0 0 8px rgba(255, 215, 0, 0.7); }
    50%       { text-shadow: 0 0 14px rgba(255, 215, 0, 1); }
}

/* ============================================================
   SHOP COSMETICS - NEW CHAT EFFECTS
   ============================================================ */

/* Glitch Effect */
.chat-message-bubble.neo-effect-glitch .message-text {
    animation: glitch-text 2s infinite;
}
.chat-message-bubble.neo-effect-glitch::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 68, 68, 0.03), transparent);
    animation: glitch-scan 1.5s linear infinite;
    pointer-events: none;
}

/* Fire Effect */
.chat-message-bubble.neo-effect-fire {
    position: relative;
}
.chat-message-bubble.neo-effect-fire .message-text {
    color: #FF6600;
    text-shadow: 0 0 6px rgba(255, 102, 0, 0.8), 0 0 12px rgba(255, 200, 0, 0.4);
    animation: fire-flicker 1.8s ease-in-out infinite;
}
.chat-message-bubble.neo-effect-fire::after {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 102, 0, 0.3);
    box-shadow: 0 0 8px rgba(255, 102, 0, 0.2), inset 0 0 8px rgba(255, 102, 0, 0.05);
    pointer-events: none;
    animation: fire-glow 1.8s ease-in-out infinite;
}

@keyframes fire-flicker {
    0%, 100% { text-shadow: 0 0 6px rgba(255, 102, 0, 0.8), 0 0 12px rgba(255, 200, 0, 0.4); }
    50%       { text-shadow: 0 0 10px rgba(255, 150, 0, 1), 0 0 20px rgba(255, 200, 0, 0.6); }
}
@keyframes fire-glow {
    0%, 100% { opacity: 0.6; }
    50%       { opacity: 1; }
}

/* ============================================================
   SHOP COSMETICS - PROFILE THEMES
   ============================================================ */

/* Dark Cyber Theme */
.neo-theme-dark-cyber {
    --profile-bg: linear-gradient(135deg, #0a0f1a, #1a0f2e);
    --profile-accent: #9945FF;
    --profile-accent-alt: #00FFFF;
}

/* Neon City Theme */
.neo-theme-neon-city {
    --profile-bg: linear-gradient(135deg, #0f0a1a, #1a0a2e);
    --profile-accent: #FF00FF;
    --profile-accent-alt: #00FF88;
}

/* Matrix Terminal Theme */
.neo-theme-matrix {
    --profile-bg: linear-gradient(135deg, #000000, #001a00);
    --profile-accent: #00FF00;
    --profile-accent-alt: #00FF00;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
    .neo-level-up-notification {
        padding: 30px 40px;
        width: 90%;
        max-width: 350px;
    }

    .neo-level-up-notification h2 {
        font-size: 1.5rem;
    }

    .neo-level-up-notification .level-number {
        font-size: 3rem;
    }

    .neo-badge-notification {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }

    .neo-leaderboard-entry {
        padding: 8px;
    }

    .neo-leaderboard-avatar {
        width: 32px;
        height: 32px;
    }

    /* ============================================================
       MOBILE: Avatar Frames
       ============================================================ */

    /* Ensure frames display properly on smaller avatars */
    .chat-avatar.neo-frame-cyan,
    .chat-avatar.neo-frame-purple,
    .chat-avatar.neo-frame-gold,
    .chat-avatar.neo-frame-rainbow {
        border-width: 2px;
    }

    /* Rainbow frame pseudo-element fix for mobile */
    .chat-avatar.neo-frame-rainbow::before {
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
    }

    /* ============================================================
       MOBILE: Chat Effects - Reduce animation intensity
       ============================================================ */

    /* Reduce glitch effect for performance */
    .chat-message-bubble.neo-effect-sparkles::before {
        animation-duration: 3s;
    }

    /* Reduce glow intensity for readability */
    .chat-message-bubble.neo-effect-glow::after {
        box-shadow: 0 0 6px rgba(0, 255, 255, 0.15);
    }

    /* ============================================================
       MOBILE: Shop UI
       ============================================================ */

    /* Shop category filters - horizontal scroll on mobile */
    #pane-shop [style*="display: flex"][style*="gap: 10px"][style*="flex-wrap: wrap"] {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    #pane-shop [style*="display: flex"][style*="gap: 10px"][style*="flex-wrap: wrap"]::-webkit-scrollbar {
        display: none;
    }

    /* Shop items grid - single column on mobile */
    #shopItemsGrid {
        grid-template-columns: 1fr !important;
    }

    /* Shop item cards - more compact */
    .shop-item {
        padding: 12px !important;
    }

    /* Avatar frame preview - smaller on mobile */
    .shop-item [style*="width: 80px"][style*="height: 80px"] {
        width: 60px !important;
        height: 60px !important;
    }

    /* ============================================================
       MOBILE: XP Progress Popup
       ============================================================ */

    .xp-progress-popup {
        top: auto !important;
        bottom: 70px !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        z-index: 10000 !important;
    }

    /* ============================================================
       MOBILE: Chat User Flair
       ============================================================ */

    .chat-user-flair {
        gap: 2px;
        margin-left: 4px;
    }

    .chat-user-flair .neo-badge {
        font-size: 0.5rem;
        padding: 1px 2px;
    }

    .chat-user-flair .neo-level {
        font-size: 0.45rem;
        padding: 0 2px;
    }

    /* Name colors - ensure visibility on mobile */
    .chat-message-bubble .sender[style*="text-shadow"] {
        text-shadow: none !important;
    }


}
