/* EXP Gain Modal - Responsive */
#exp-modal-overlay.exp-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.exp-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.exp-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    color: white;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.7) translateY(50px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    max-width: 90vw;
    max-height: 90vh;
}

.exp-modal-overlay.show .exp-modal {
    transform: scale(1) translateY(0);
}

/* Responsive sizes */
@media (min-width: 768px) {
    .exp-modal {
        width: 400px;
        padding: 40px;
    }
}

@media (max-width: 767px) {
    .exp-modal {
        width: 280px;
        padding: 25px;
        border-radius: 15px;
    }
}

/* Background shimmer effect */
.exp-modal::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* EXP Icon */
.exp-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    display: block;
    animation: bounce 0.6s ease-out;
}

@media (max-width: 767px) {
    .exp-icon {
        font-size: 3rem;
        margin-bottom: 10px;
    }
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0);
    }
    40%, 43% {
        transform: translate3d(0, -20px, 0);
    }
    70% {
        transform: translate3d(0, -10px, 0);
    }
    90% {
        transform: translate3d(0, -4px, 0);
    }
}

/* Title */
.exp-title {
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
    .exp-title {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
}

/* EXP Value */
.exp-value {
    font-size: 3rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    margin-bottom: 15px;
    animation: glow 1.5s ease-in-out infinite alternate;
}

@media (max-width: 767px) {
    .exp-value {
        font-size: 2.2rem;
        margin-bottom: 10px;
    }
}

@keyframes glow {
    from {
        text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    }
    to {
        text-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 0 0 40px rgba(255, 215, 0, 0.3);
    }
}

/* Action description */
.exp-action {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 20px;
}

@media (max-width: 767px) {
    .exp-action {
        font-size: 1rem;
        margin-bottom: 15px;
    }
}

/* Level progress bar */
.level-progress {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    height: 8px;
    margin: 15px 0;
    overflow: hidden;
    position: relative;
}

.level-progress-bar {
    background: linear-gradient(90deg, #FFD700, #FFA500);
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease-out;
    position: relative;
}

.level-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Level information */
.level-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 5px;
}

@media (max-width: 767px) {
    .level-info {
        font-size: 0.8rem;
    }
}

/* Floating particles */
.exp-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: #FFD700;
    border-radius: 50%;
    animation: float-up 3s ease-out forwards;
}

@keyframes float-up {
    0% {
        opacity: 1;
        transform: translateY(0) scale(0);
    }
    10% {
        transform: translateY(-10px) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(-100px) scale(0);
    }
}

/* Modal entry animation */
.exp-modal-enter {
    animation: modalEnter 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalEnter {
    0% {
        transform: scale(0.3) rotate(-10deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.05) rotate(2deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

/* Modal exit animation */
.exp-modal-exit {
    animation: modalExit 0.3s ease-in;
}

@keyframes modalExit {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: scale(0.8) rotate(5deg);
        opacity: 0;
    }
}

/* Special effects for level up */
.level-up-modal {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.level-up-modal .exp-icon {
    animation: levelUpBounce 1s ease-out;
}

@keyframes levelUpBounce {
    0%, 20%, 53%, 80%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    40%, 43% {
        transform: translate3d(0, -30px, 0) scale(1.1);
    }
    70% {
        transform: translate3d(0, -15px, 0) scale(1.05);
    }
    90% {
        transform: translate3d(0, -5px, 0) scale(1.02);
    }
}

/* Additional responsiveness for very small screens */
@media (max-width: 320px) {
    .exp-modal {
        width: 260px;
        padding: 20px;
    }
    
    .exp-icon {
        font-size: 2.5rem;
    }
    
    .exp-title {
        font-size: 1.2rem;
    }
    
    .exp-value {
        font-size: 2rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .exp-modal,
    .exp-icon,
    .exp-value,
    .level-progress-bar,
    .particle {
        animation: none;
        transition: none;
    }
    
    .exp-modal-overlay.show .exp-modal {
        transform: scale(1) translateY(0);
    }
}
