/* Paidia Frontend Styles */
.paidia-achievement-badge {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50px;
    color: white;
    font-weight: bold;
}

.paidia-level-display {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

.paidia-xp-bar {
    width: 100%;
    height: 20px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.paidia-xp-progress {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50 0%, #8BC34A 100%);
    transition: width 0.3s ease;
}

.paidia-leaderboard-entry {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.paidia-leaderboard-rank {
    font-size: 24px;
    font-weight: bold;
    margin-right: 20px;
    color: #666;
}

/* XP Notification - DISABLED (using header notification instead) */
.paidia-xp-notification {
    display: none !important; /* Hide Paidia notification, use header notification instead */
}

.paidia-xp-notification-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); /* Default to Explorer green */
    border-radius: 16px;
    padding: 16px 24px;
    box-shadow: 0 10px 40px rgba(72, 187, 120, 0.4);
    min-width: 280px;
    backdrop-filter: blur(10px);
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

/* Track-specific notification colors */
.paidia-xp-notification-content.track-explorer {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%); /* Green for Explorer */
    box-shadow: 0 10px 40px rgba(72, 187, 120, 0.4);
}

.paidia-xp-notification-content.track-pioneer {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%); /* Orange for Pioneer */
    box-shadow: 0 10px 40px rgba(237, 137, 54, 0.4);
}

.paidia-xp-notification-content.track-host {
    background: linear-gradient(135deg, #9f7aea 0%, #805ad5 100%); /* Purple for Host */
    box-shadow: 0 10px 40px rgba(159, 122, 234, 0.4);
}

/* Single row layout: +{X} <icon> XP {total} */
.paidia-xp-single-row {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.paidia-xp-gained {
    font-size: 20px;
    font-weight: 700;
    color: #FFD700;
    animation: paidia-bounce 0.5s ease-out;
}

.paidia-xp-gained-value {
    font-size: 20px;
}

.paidia-xp-icon {
    font-size: 28px;
    color: #FFD700;
    animation: paidia-pulse 2s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.paidia-xp-label {
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.paidia-xp-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Animations */
@keyframes paidia-pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@keyframes paidia-bounce {
    0% {
        transform: translateY(10px);
        opacity: 0;
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Action Descriptor Section */
.paidia-xp-action-descriptor {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, margin-top 0.3s ease-out;
    margin-top: 0;
}

.paidia-xp-action-descriptor.show {
    max-height: 60px;
    margin-top: 12px;
}

.paidia-xp-action-detail {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.paidia-xp-action-detail i {
    font-size: 20px;
    color: #FFD700;
}

.paidia-xp-action-detail .action-text {
    flex: 1;
}

.paidia-xp-action-detail .action-target {
    font-weight: 400;
    opacity: 0.9;
}

@keyframes slideDown {
    from {
        max-height: 0;
        opacity: 0;
    }
    to {
        max-height: 60px;
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .paidia-xp-notification {
        right: -350px;
        top: 70px;
    }
    
    .paidia-xp-notification-show {
        right: 10px;
    }
    
    .paidia-xp-notification-content {
        min-width: 240px;
        padding: 12px 20px;
    }
    
    .paidia-xp-single-row {
        gap: 8px;
    }
    
    .paidia-xp-gained {
        font-size: 18px;
    }
    
    .paidia-xp-gained-value {
        font-size: 18px;
    }
    
    .paidia-xp-icon {
        font-size: 24px;
    }
    
    .paidia-xp-label {
        font-size: 16px;
    }
    
    .paidia-xp-value {
        font-size: 24px;
    }
}

/* Level-Up Notification - Celebration Style */
.paidia-levelup-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    z-index: 300010;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.paidia-levelup-show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.paidia-levelup-content {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border-radius: 24px;
    padding: 40px 60px;
    box-shadow: 0 20px 60px rgba(240, 147, 251, 0.5);
    min-width: 350px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.paidia-levelup-icon {
    font-size: 64px;
    color: #FFD700;
    margin-bottom: 16px;
    animation: paidia-trophy-bounce 0.8s ease-out;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.paidia-levelup-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    text-align: center;
}

.paidia-levelup-title {
    font-size: 24px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 900;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: paidia-text-glow 2s ease-in-out infinite;
}

.paidia-levelup-level {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    color: white;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 8px;
}

.paidia-levelup-level-number {
    color: #FFD700;
}

.paidia-levelup-rank {
    font-size: 20px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.paidia-levelup-rank-name {
    color: #FFD700;
}

/* Confetti Animation */
.paidia-levelup-confetti {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.paidia-levelup-confetti .confetti {
    position: absolute;
    width: 10px;
    height: 10px;
    background: #FFD700;
    top: -10px;
    animation: paidia-confetti-fall 3s ease-out forwards;
}

.paidia-levelup-confetti .confetti:nth-child(1) {
    left: 10%;
    background: #FFD700;
    animation-delay: 0s;
}

.paidia-levelup-confetti .confetti:nth-child(2) {
    left: 30%;
    background: #FF69B4;
    animation-delay: 0.2s;
}

.paidia-levelup-confetti .confetti:nth-child(3) {
    left: 50%;
    background: #00CED1;
    animation-delay: 0.4s;
}

.paidia-levelup-confetti .confetti:nth-child(4) {
    left: 70%;
    background: #FFD700;
    animation-delay: 0.1s;
}

.paidia-levelup-confetti .confetti:nth-child(5) {
    left: 90%;
    background: #FF69B4;
    animation-delay: 0.3s;
}

.paidia-levelup-confetti .confetti:nth-child(6) {
    left: 20%;
    background: #00CED1;
    animation-delay: 0.5s;
}

/* Level-Up Animations */
@keyframes paidia-trophy-bounce {
    0% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
    50% {
        transform: translateY(10px) scale(1.1);
    }
    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

@keyframes paidia-text-glow {
    0%, 100% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 10px rgba(255, 215, 0, 0.3);
    }
    50% {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 0 20px rgba(255, 215, 0, 0.6);
    }
}

@keyframes paidia-confetti-fall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) translateX(var(--confetti-x, 0px)) rotate(720deg);
        opacity: 0;
    }
}

/* Responsive - Level-Up */
@media (max-width: 768px) {
    .paidia-levelup-content {
        min-width: 280px;
        padding: 30px 40px;
    }
    
    .paidia-levelup-icon {
        font-size: 48px;
    }
    
    .paidia-levelup-title {
        font-size: 20px;
        letter-spacing: 2px;
    }
    
    .paidia-levelup-level {
        font-size: 36px;
    }
    
    .paidia-levelup-rank {
        font-size: 16px;
    }
}

