.prm-update-highlight {
    animation: prmHighlight 2s ease-out;
    border-radius: 4px;
    transition: all 0.3s ease;
}

@keyframes prmHighlight {
    0% { 
        background-color: #fff3cd; 
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% { 
        background-color: #ffeaa7; 
        box-shadow: 0 0 0 10px rgba(255, 193, 7, 0.3);
    }
    100% { 
        background-color: transparent; 
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

.prm-rank-change {
    /*animation: prmRankChange 3s ease-out;*/
    font-weight: bold;
}

@keyframes prmRankChange {
    0% { 
        transform: scale(1); 
        color: inherit;
    }
    25% { 
        transform: scale(1.3); 
        color: #e74c3c; 
        text-shadow: 0 0 10px rgba(231, 76, 60, 0.5);
    }
    50% { 
        transform: scale(1.2); 
        color: #f39c12; 
        text-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
    }
    75% { 
        transform: scale(1.1); 
        color: #f1c40f; 
        text-shadow: 0 0 5px rgba(241, 196, 15, 0.3);
    }
    100% { 
        transform: scale(1); 
        color: inherit;
        text-shadow: none;
    }
}

.prm-toast {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 9999;
}

.prm-toast-success {
    background: linear-gradient(135deg, #28a745, #20c997);
    border-left: 4px solid #155724;
}

.prm-toast-warning {
    background: linear-gradient(135deg, #ffc107, #fd7e14);
    border-left: 4px solid #856404;
}

.prm-toast-info {
    background: linear-gradient(135deg, #17a2b8, #6f42c1);
    border-left: 4px solid #0c5460;
}

.prm-toast-error {
    background: linear-gradient(135deg, #dc3545, #e83e8c);
    border-left: 4px solid #721c24;
}

@keyframes slideInRight {
    from { 
        transform: translateX(100%); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

@keyframes slideOutRight {
    from { 
        transform: translateX(0); 
        opacity: 1; 
    }
    to { 
        transform: translateX(100%); 
        opacity: 0; 
    }
}

.prm-score-update {
    animation: prmScorePulse 1.5s ease-out;
}

@keyframes prmScorePulse {
    0% { 
        transform: scale(1); 
        opacity: 1;
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.8;
    }
    100% { 
        transform: scale(1); 
        opacity: 1;
    }
}

.prm-rank-glow {
    animation: prmRankGlow 2s ease-in-out infinite alternate;
}

@keyframes prmRankGlow {
    from { 
        text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
    }
    to { 
        text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor;
    }
}

.prm-realtime-loading {
    position: relative;
    overflow: hidden;
}

.prm-realtime-loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: prmLoading 1.5s infinite;
}

@keyframes prmLoading {
    0% { left: -100%; }
    100% { left: 100%; }
}

.prm-vote-success-bounce {
    animation: prmVoteBounce 0.6s ease-out;
}

@keyframes prmVoteBounce {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.prm-data-change {
    animation: prmDataFade 1s ease-out;
}

@keyframes prmDataFade {
    0% { 
        opacity: 0.5; 
        transform: translateY(-5px);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .prm-toast {
        right: 10px;
        left: 10px;
        max-width: none;
        font-size: 13px;
        padding: 10px 15px;
    }
}

@media (prefers-color-scheme: dark) {
    .prm-toast {
        background: rgba(0,0,0,0.9);
        color: #fff;
        border: 1px solid rgba(255,255,255,0.1);
    }
    
    .prm-update-highlight {
        background-color: rgba(255, 193, 7, 0.2);
    }
}

@media (prefers-contrast: high) {
    .prm-toast {
        border: 2px solid currentColor;
    }
    
    .prm-update-highlight {
        border: 2px solid #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .prm-update-highlight,
    .prm-rank-change,
    .prm-score-update,
    .prm-rank-glow,
    .prm-realtime-loading,
    .prm-vote-success-bounce,
    .prm-data-change,
    .prm-toast {
        animation: none;
    }
}