/* ===================================================
   DOSYA: public/css/animations.css
   YOL: C:\xampp\htdocs\averon\public\css\animations.css
   Tüm animasyonlar ve geçişler
   =================================================== */

/* ===== TEMEL ANİMASYONLAR ===== */

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg);
    }
    to {
        opacity: 1;
        transform: rotate(0);
    }
}

/* ===== MODAL ANİMASYONLARI ===== */

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0.9);
    }
}

/* ===== MESAJ ANİMASYONLARI ===== */

@keyframes messageEnter {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes messageHover {
    0% {
        background: transparent;
    }
    100% {
        background: rgba(88, 101, 242, 0.1);
    }
}

/* ===== YAZMA GÖSTERİCİSİ ===== */

@keyframes typingDot {
    0%, 60%, 100% {
        opacity: 0.5;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

@keyframes typingBounce {
    0%, 80%, 100% {
        transform: scale(1);
    }
    40% {
        transform: scale(1.2);
    }
}

/* ===== BILDIRIM ANİMASYONLARI ===== */

@keyframes notificationSlide {
    from {
        opacity: 0;
        transform: translateX(400px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes notificationExit {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== AYARLAR ANİMASYONLARI ===== */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* ===== HOVER ETKİLERİ ===== */

@keyframes buttonHover {
    to {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
    }
}

@keyframes buttonActive {
    to {
        transform: translateY(0);
    }
}

/* ===== DURUM DEĞİŞİM ANİMASYONLARI ===== */

@keyframes onlineStatus {
    0% {
        box-shadow: 0 0 0 0 rgba(67, 181, 129, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(67, 181, 129, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(67, 181, 129, 0);
    }
}

@keyframes offlineStatus {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* ===== UYGULAMA GEÇİŞLERİ ===== */

.transition-all {
    transition: all 0.3s ease;
}

.transition-fast {
    transition: all 0.1s ease;
}

.transition-slow {
    transition: all 0.5s ease;
}

/* ===== MODAL İŞLEVLERİ ===== */

.modal-enter {
    animation: modalEnter 0.3s ease-out;
}

.modal-exit {
    animation: modalExit 0.3s ease-in;
}

/* ===== MESAJ İŞLEVLERİ ===== */

.message-enter {
    animation: messageEnter 0.3s ease-out;
}

.message-hover {
    animation: messageHover 0.3s ease;
}

/* ===== YAZMA GÖSTERİCİSİ ===== */

.typing-indicator {
    display: flex;
    gap: 4px;
    align-items: center;
}

.typing-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--averon-purple);
    animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* ===== BİLDİRİM İŞLEVLERİ ===== */

.notification {
    animation: notificationSlide 0.3s ease-out;
}

.notification-exit {
    animation: notificationExit 0.3s ease-in;
}

/* ===== YÜKLENİŞ DURUMLARI ===== */

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

.loading-spinner {
    border: 3px solid var(--bg-tertiary);
    border-top: 3px solid var(--averon-purple);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

.loading-shimmer {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-secondary) 50%, var(--bg-tertiary) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== BUTON ETKİLERİ ===== */

.btn:hover {
    animation: buttonHover 0.2s ease;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(88, 101, 242, 0.4);
}

.btn:active {
    animation: buttonActive 0.1s ease;
    transform: translateY(0);
}

/* ===== İKON ETKİLERİ ===== */

.icon-btn {
    transition: all 0.2s ease;
}

.icon-btn:hover {
    transform: scale(1.1) rotate(5deg);
    color: var(--text-primary);
}

.icon-btn:active {
    transform: scale(0.95);
}

/* ===== KANAL ETKİLERİ ===== */

.channel-item {
    transition: all 0.2s ease;
    position: relative;
}

.channel-item:hover {
    background: rgba(255, 255, 255, 0.1);
    padding-left: 16px;
}

.channel-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--averson-purple);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform 0.2s ease;
}

.channel-item.active::before {
    transform: scaleY(1);
}

/* ===== DURUM GÖSTERGESİ ===== */

.status {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: onlineStatus 2s infinite;
}

.status.offline {
    animation: offlineStatus 1s ease-in-out infinite;
}

/* ===== INPUT ANİMASYONLARI ===== */

input:focus,
textarea:focus {
    animation: scaleIn 0.2s ease;
    border-color: var(--averon-purple);
    box-shadow: 0 0 8px rgba(88, 101, 242, 0.3);
}

/* ===== CONTEXT MENU ===== */

.context-menu {
    animation: scaleIn 0.1s ease-out;
}

.context-menu-item {
    transition: all 0.1s ease;
    position: relative;
    overflow: hidden;
}

.context-menu-item:hover {
    background: var(--averon-purple);
    transform: translateX(4px);
}

/* ===== TOOLTIP ANİMASYONU ===== */

.tooltip .tooltiptext {
    animation: fadeIn 0.2s ease;
    transition: opacity 0.2s ease;
}

/* ===== SAYFA GEÇİŞİ ===== */

@keyframes pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-enter {
    animation: pageEnter 0.4s ease-out;
}

/* ===== RESPONSIVE ANİMASYONLAR ===== */

@media (max-width: 768px) {
    /* Mobilde daha hızlı animasyonlar */
    @keyframes slideIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .btn:hover {
        transform: translateY(-1px);
    }
}

/* ===== PERFORMANCE OPTIMIZASYON ===== */

@media (prefers-reduced-motion: reduce) {
    /* Kullanıcı hareket animasyonlarını az tercih ediyorsa */
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}