/* Animation Module Styles */
.animation-module {
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
}

/* Scroll-triggered animations - başlangıç durumu */
.has-animation {
    /* Başlangıçta animasyon çalışmaz, scroll ile trigger olacak */
    transition: opacity 0.6s ease, transform 0.6s ease;
    /* Layout'u etkilememesi için - elementler yer kaplamalı */
    will-change: opacity, transform;
    /* Transform layout'u etkilemez ama scroll hesaplamasını etkileyebilir */
    backface-visibility: hidden;
    perspective: 1000px;
    /* Element'in yer kaplamasını garanti et - transform ile kaydırılsa bile */
    position: relative;
}

/* FadeIn animasyonu için başlangıç durumu */
.has-animation.animation-fadeIn {
    opacity: 0;
}

.has-animation.animation-fadeIn.animate-on-scroll {
    opacity: 1;
    transition: opacity 0.6s ease;
}

/* SlideUp animasyonu için başlangıç durumu */
.has-animation.animation-slideUp {
    transform: translate3d(0, 30px, 0); /* 3D transform daha performanslı ve layout'u etkilemez */
    opacity: 0;
    /* Transform layout'u etkilemez, element normal yerinde durur */
}

.has-animation.animation-slideUp.animate-on-scroll {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* SlideDown animasyonu için başlangıç durumu */
.has-animation.animation-slideDown {
    transform: translate3d(0, -30px, 0); /* 3D transform daha performanslı */
    opacity: 0;
}

.has-animation.animation-slideDown.animate-on-scroll {
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* SlideLeft animasyonu için başlangıç durumu */
.has-animation.animation-slideLeft {
    transform: translate3d(30px, 0, 0); /* 3D transform daha performanslı */
    opacity: 0;
}

.has-animation.animation-slideLeft.animate-on-scroll {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* SlideRight animasyonu için başlangıç durumu */
.has-animation.animation-slideRight {
    transform: translate3d(-30px, 0, 0); /* 3D transform daha performanslı */
    opacity: 0;
}

.has-animation.animation-slideRight.animate-on-scroll {
    transform: translateX(0);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* ZoomIn animasyonu için başlangıç durumu */
.has-animation.animation-zoomIn {
    transform: scale3d(0.8, 0.8, 1); /* 3D transform daha performanslı */
    opacity: 0;
}

.has-animation.animation-zoomIn.animate-on-scroll {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* ZoomOut animasyonu için başlangıç durumu */
.has-animation.animation-zoomOut {
    transform: scale3d(1.2, 1.2, 1); /* 3D transform daha performanslı */
    opacity: 0;
}

.has-animation.animation-zoomOut.animate-on-scroll {
    transform: scale(1);
    opacity: 1;
    transition: transform 0.6s ease, opacity 0.6s ease;
}

/* Diğer animasyonlar (bounce, pulse, shake, rotate, flipX, flipY, fadeOut) için başlangıçta görünür */
.has-animation.animation-bounce,
.has-animation.animation-pulse,
.has-animation.animation-shake,
.has-animation.animation-rotate,
.has-animation.animation-flipX,
.has-animation.animation-flipY,
.has-animation.animation-fadeOut {
    opacity: 1;
}

/* Animation badge - sol altta */
.animation-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.animation-badge:hover {
    background: linear-gradient(135deg, #7b1fa2 0%, #c2185b 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.4);
}

.animation-badge i {
    font-size: 12px;
}

/* Row ve Column için animation badge */
.animation-badge-row {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

.animation-badge-column {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: linear-gradient(135deg, #9c27b0 0%, #e91e63 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 10;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.3);
}

/* Animation sürükle-bırak hedefi */
.module-item.animation-drop-target {
    outline: 2px dashed #9c27b0 !important;
    outline-offset: 2px !important;
    background: rgba(156, 39, 176, 0.05) !important;
    transition: all 0.3s ease;
}

.column-drop-zone.animation-drop-target {
    outline: 2px dotted #9c27b0 !important;
    outline-offset: 2px !important;
    background-color: rgba(156, 39, 176, 0.1) !important;
    transition: all 0.3s ease;
}

.row-drop-zone.animation-drop-target {
    outline: 2px dotted #9c27b0 !important;
    outline-offset: 2px !important;
    background-color: rgba(156, 39, 176, 0.1) !important;
    transition: all 0.3s ease;
}

.page-row.animation-drop-target {
    /* Outline yerine inset box-shadow kullan: overflow:hidden kırpmasını önler */
    box-shadow: inset 0 0 0 2px #9c27b0 !important;
    background-color: rgba(156, 39, 176, 0.08) !important;
    transition: all 0.3s ease;
}


/* Animation modülü için özel stil */
.module-type-item[data-module-type="Animation"] {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border: 2px dashed #9c27b0;
    position: relative;
    overflow: hidden;
}

.module-type-item[data-module-type="Animation"]::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(156, 39, 176, 0.1) 50%, transparent 70%);
    animation: animationShine 3s infinite;
}

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

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.module-type-item[data-module-type="Animation"]:hover {
    background: linear-gradient(135deg, #e1bee7 0%, #ce93d8 100%);
    border-color: #7b1fa2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
}

.module-type-item[data-module-type="Animation"] .module-type-icon {
    color: #7b1fa2;
}

.module-type-item[data-module-type="Animation"] .module-type-name {
    color: #7b1fa2;
    font-weight: 700;
}

.module-type-item[data-module-type="Animation"] .badge {
    animation: pulse 2s infinite;
}

/* Animation modal başlık stil */
#applyAnimationModal .modal-title {
    color: white !important;
}

#applyAnimationModal .modal-title i {
    color: white !important;
}

/* Animation preview box */
.animation-preview {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-box-animation {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.preview-content-animation {
    color: #6c757d;
}

.preview-content-animation i {
    color: #9c27b0;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

