/* ============================================
   BOYKAP - PROFESYÖNEL ANİMASYON KÜTÜPHANESİ
   Modern, performanslı ve yeniden kullanılabilir animasyonlar
   ============================================ */

/* FADE ANIMASYONLARI */
@@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* SCALE ANIMASYONLARI */
@@keyframes scaleIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@@keyframes scaleOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0.8);
        opacity: 0;
    }
}

@@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    14%, 42% {
        transform: scale(1.1);
    }
    28%, 70% {
        transform: scale(1.05);
    }
}

/* ROTATION ANIMASYONLARI */
@@keyframes rotateIn {
    from {
        transform: rotate(-180deg) scale(0.8);
        opacity: 0;
    }
    to {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
}

@@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@@keyframes wiggle {
    0%, 100% {
        transform: rotate(0deg);
    }
    25% {
        transform: rotate(-5deg);
    }
    75% {
        transform: rotate(5deg);
    }
}

/* SLIDE ANIMASYONLARI */
@@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@@keyframes slideInDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

@@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* BOUNCE ANIMASYONLARI */
@@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    25% {
        transform: translateY(-15px);
    }
    50% {
        transform: translateY(0);
    }
    75% {
        transform: translateY(-7px);
    }
}

@@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* SHAKE ANIMASYONLARI */
@@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(10px);
    }
}

@@keyframes shakeVertical {
    0%, 100% {
        transform: translateY(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateY(-10px);
    }
    20%, 40%, 60%, 80% {
        transform: translateY(10px);
    }
}

/* SKELETON LOADER ANIMASYONLARI */
@@keyframes skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@@keyframes skeleton-wave {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* GLOW EFEKTLERI */
@@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8), 0 0 30px rgba(59, 130, 246, 0.4);
    }
}

@@keyframes glow-text {
    0%, 100% {
        text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
    }
    50% {
        text-shadow: 0 0 20px rgba(255, 255, 255, 0.8), 0 0 30px rgba(255, 255, 255, 0.4);
    }
}

/* PROGRESS ANIMASYONLARI */
@@keyframes progress-bar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

@@keyframes loading-dots {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

/* FLIP ANIMASYONLARI */
@@keyframes flip {
    from {
        transform: perspective(400px) rotateY(0);
    }
    to {
        transform: perspective(400px) rotateY(360deg);
    }
}

@@keyframes flipInX {
    from {
        transform: perspective(400px) rotateX(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateX(0);
        opacity: 1;
    }
}

@@keyframes flipInY {
    from {
        transform: perspective(400px) rotateY(90deg);
        opacity: 0;
    }
    to {
        transform: perspective(400px) rotateY(0);
        opacity: 1;
    }
}

/* ZOOM ANIMASYONLARI */
@@keyframes zoomIn {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@@keyframes zoomOut {
    from {
        transform: scale(1);
        opacity: 1;
    }
    to {
        transform: scale(0);
        opacity: 0;
    }
}

/* YARDIMCI SINIFLAR */
.animate {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-fast {
    animation-duration: 0.4s;
}

.animate-slow {
    animation-duration: 1.2s;
}

/* Delay Sınıfları */
.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

.delay-3 {
    animation-delay: 0.6s;
}

.delay-4 {
    animation-delay: 0.8s;
}

.delay-5 {
    animation-delay: 1s;
}

/* Animasyon Uygulama Sınıfları */
.fade-in {
    animation-name: fadeIn;
}

.fade-in-up {
    animation-name: fadeInUp;
}

.fade-in-down {
    animation-name: fadeInDown;
}

.fade-in-left {
    animation-name: fadeInLeft;
}

.fade-in-right {
    animation-name: fadeInRight;
}

.fade-out {
    animation-name: fadeOut;
}

.scale-in {
    animation-name: scaleIn;
}

.scale-out {
    animation-name: scaleOut;
}

.pulse {
    animation-name: pulse;
    animation-duration: 2s;
    animation-iteration-count: infinite;
}

.heartbeat {
    animation-name: heartbeat;
    animation-duration: 1.5s;
    animation-iteration-count: infinite;
}

.rotate-in {
    animation-name: rotateIn;
}

.spin {
    animation-name: spin;
    animation-duration: 1s;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
}

.wiggle {
    animation-name: wiggle;
    animation-duration: 0.5s;
}

.slide-in-up {
    animation-name: slideInUp;
}

.slide-in-down {
    animation-name: slideInDown;
}

.slide-in-left {
    animation-name: slideInLeft;
}

.slide-in-right {
    animation-name: slideInRight;
}

.bounce {
    animation-name: bounce;
    animation-duration: 1s;
    animation-iteration-count: infinite;
}

.bounce-in {
    animation-name: bounceIn;
}

.shake {
    animation-name: shake;
    animation-duration: 0.5s;
}

.shake-vertical {
    animation-name: shakeVertical;
    animation-duration: 0.5s;
}

.flip {
    animation-name: flip;
    animation-duration: 1s;
}

.flip-in-x {
    animation-name: flipInX;
}

.flip-in-y {
    animation-name: flipInY;
}

.zoom-in {
    animation-name: zoomIn;
}

.zoom-out {
    animation-name: zoomOut;
}

/* HOVER MICRO-INTERACTIONS */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.hover-glow {
    transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-glow:hover {
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.hover-tilt {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-tilt:hover {
    transform: rotate(2deg) scale(1.02);
}

.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-scale:hover {
    transform: scale(1.05);
}

/* SKELETON LOADER */
.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.5s infinite;
    border-radius: 4px;
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
}

.skeleton-title {
    height: 24px;
    margin-bottom: 12px;
}

.skeleton-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.skeleton-image {
    width: 100%;
    height: 200px;
}

/* PARALLAX İÇİN YARDIMCI */
.parallax {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* SMOOTH SCROLL */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* BACKDROP BLUR */
.backdrop-blur {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.backdrop-blur-strong {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* LOADING SPINNER VARYANTLARI */
.spinner-ring {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.spinner-dots {
    display: flex;
    gap: 8px;
}

.spinner-dots span {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    animation: loading-dots 1.4s infinite ease-in-out both;
}

.spinner-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.spinner-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

/* PERFORMANS OPTİMİZASYONU */
.will-animate {
    will-change: transform, opacity;
}

/* DARK MODE SUPPORT */
@@media (prefers-color-scheme: dark) {
    .skeleton {
        background: linear-gradient(
            90deg,
            #1a1a1a 25%,
            #2a2a2a 50%,
            #1a1a1a 75%
        );
    }
}

/* REDUCED MOTION ACCESSIBILITY */
@@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
