/* ============================================
   PREMIUM ANIMATIONS & VISUAL ENHANCEMENTS
   Cihaznet - Premium Feel Animations
   ============================================ */

/* Smooth Page Load Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes glow {

    0%,
    100% {
        box-shadow: 0 0 5px rgba(93, 168, 232, 0.3);
    }

    50% {
        box-shadow: 0 0 20px rgba(93, 168, 232, 0.6);
    }
}

/* Card Animations */
.genel-device-card,
.magaza-device-card,
.promo-card {
    animation: fadeInUp 0.5s ease-out backwards;
    will-change: transform, opacity;
}

.genel-device-card:nth-child(1) {
    animation-delay: 0.05s;
}

.genel-device-card:nth-child(2) {
    animation-delay: 0.1s;
}

.genel-device-card:nth-child(3) {
    animation-delay: 0.15s;
}

.genel-device-card:nth-child(4) {
    animation-delay: 0.2s;
}

.genel-device-card:nth-child(5) {
    animation-delay: 0.25s;
}

.genel-device-card:nth-child(6) {
    animation-delay: 0.3s;
}

.magaza-device-card:nth-child(1) {
    animation-delay: 0.05s;
}

.magaza-device-card:nth-child(2) {
    animation-delay: 0.1s;
}

.magaza-device-card:nth-child(3) {
    animation-delay: 0.15s;
}

.magaza-device-card:nth-child(4) {
    animation-delay: 0.2s;
}

.promo-card:nth-child(1) {
    animation-delay: 0.1s;
}

.promo-card:nth-child(2) {
    animation-delay: 0.2s;
}

.promo-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Hover Effects - Premium Feel */
.genel-device-card,
.magaza-device-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.genel-device-card::before,
.magaza-device-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(93, 168, 232, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.genel-device-card:hover::before,
.magaza-device-card:hover::before {
    opacity: 1;
}

/* Button Animations */
.action-btn,
.login-btn,
.wp-action-btn,
.call-btn,
.status-btn,
.promo-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.action-btn::after,
.login-btn::after,
.wp-action-btn::after,
.call-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.action-btn:active::after,
.login-btn:active::after,
.wp-action-btn:active::after,
.call-btn:active::after {
    width: 300px;
    height: 300px;
}

/* Tab Animations */
.tab {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #5da8e8, transparent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.tab.active::before {
    width: 100%;
}

/* Header Animation */
header {
    animation: slideInFromTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal Animations */
.delete-modal.open .delete-modal-card,
.confirm-modal.open .confirm-modal-card,
.profile-modal.open .profile-modal-card,
.compare-modal.open .compare-modal-card {
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.delete-modal-overlay,
.confirm-modal-overlay,
.profile-modal-overlay,
.compare-modal-overlay {
    animation: fadeIn 0.3s ease;
}

/* Notification Toast Animation */
.notification-toast.notification-toast-visible {
    animation: toastSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateY(-100%) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Settings Panel Animation */
.settings-panel,
.notification-panel,
.uyarilarim-panel {
    animation: panelSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@media (max-width: 1024px) {

    .settings-panel,
    .notification-panel,
    .uyarilarim-panel {
        animation: panelSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Input Focus Animation */
.login-input:focus,
.genel-filter-control:focus,
.add-device-form input:focus,
.add-device-form select:focus,
.add-device-form textarea:focus {
    animation: inputFocusGlow 0.3s ease;
}

@keyframes inputFocusGlow {
    0% {
        box-shadow: 0 0 0 0 rgba(93, 168, 232, 0.4);
    }

    100% {
        box-shadow: 0 0 0 3px rgba(93, 168, 232, 0.25);
    }
}

/* Loading Skeleton Animation */
.loading-skeleton-wrap {
    animation: fadeIn 0.3s ease;
}

.loading-spinner {
    animation: loading-spin 0.8s linear infinite;
}

/* Stats Cards Animation */
.stat-card,
.biz-summary-card {
    animation: scaleIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Promo Badge Animation */
.reklamda-badge {
    animation: pulse 2s ease-in-out infinite;
}

.new-badge {
    animation: bounce 2s ease-in-out infinite;
}

/* Shimmer Effect for Loading States */
.loading-shimmer {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 0%,
            rgba(255, 255, 255, 0.15) 50%,
            rgba(255, 255, 255, 0.05) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* Smooth Scroll Behavior */
html {
    scroll-behavior: smooth;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Hover Lift Effect */
.promo-card,
.stat-card,
.biz-summary-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.promo-card:hover,
.stat-card:hover,
.biz-summary-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

/* Icon Animations */
.tab-icon,
.action-btn-icon,
.section-title-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tab:hover .tab-icon,
.action-btn:hover .action-btn-icon {
    transform: scale(1.1);
}

.tab.active .tab-icon {
    animation: bounce 0.6s ease;
}

/* Notification Dot Pulse */
.notification-dot {
    animation: pulse 2s ease-in-out infinite;
}

/* Compare Bar Animation */
.genel-compare-bar.compare-bar-visible {
    animation: compareBarSlideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes compareBarSlideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 100%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Photo Thumbnail Hover */
.magaza-card-foto-thumb,
.promo-card-foto,
.compare-thumb {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.magaza-card-foto-thumb:hover,
.promo-card-foto:hover,
.compare-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* Filter Bar Animation */
.filter-bar {
    animation: fadeInUp 0.5s ease-out;
}

/* Search Stats Widget Animation */
.search-stats-widget {
    animation: slideInFromLeft 0.5s ease-out;
}

/* Pagination Animation */
.genel-pagination-page {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.genel-pagination-page:hover {
    transform: translateY(-2px);
}

/* Admin Badge Glow */
.admin-badge {
    animation: glow 3s ease-in-out infinite;
}

/* Ticari Button Pulse */
.header-action-btn.ticari-btn {
    position: relative;
}

.header-action-btn.ticari-btn::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), transparent);
    opacity: 0;
    animation: pulse 2s ease-in-out infinite;
}

/* Smooth Color Transitions */
.genel-device-card,
.magaza-device-card,
.promo-card,
.action-btn,
.tab,
.status-btn,
.promo-btn {
    transition:
        background-color 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease,
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.3s ease;
}

/* Stagger Animation for Lists */
.notification-item,
.model-alert-item,
.unsold-item {
    animation: fadeInUp 0.4s ease-out backwards;
}

.notification-item:nth-child(1) {
    animation-delay: 0.05s;
}

.notification-item:nth-child(2) {
    animation-delay: 0.1s;
}

.notification-item:nth-child(3) {
    animation-delay: 0.15s;
}

.notification-item:nth-child(4) {
    animation-delay: 0.2s;
}

.notification-item:nth-child(5) {
    animation-delay: 0.25s;
}

/* Login Screen Animation */
.login-card,
.login-right {
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-logo {
    animation: fadeIn 0.8s ease-out 0.3s backwards;
}

/* Smooth Opacity Transitions */
.genel-locked-placeholder-card,
.empty-msg,
.loading-text {
    animation: fadeIn 0.5s ease;
}

/* Enhanced Focus States */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(93, 168, 232, 0.5);
    outline-offset: 2px;
    transition: outline 0.2s ease;
}

/* Micro-interactions */
.genel-favori-btn,
.genel-compare-add-btn,
.magaza-row-check,
.magaza-bulk-check {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.genel-favori-btn:active,
.genel-compare-add-btn:active {
    transform: scale(0.95);
}

/* Success Animation */
@keyframes successPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.status-btn.satildi-btn {
    animation: successPulse 0.6s ease;
}

/* Smooth Theme Transition */
body {
    transition: background-color 0.4s ease, color 0.4s ease;
}

body * {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

/* Prevent transition on page load */
body.no-transitions * {
    transition: none !important;
}