@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

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

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

.watercolor-bg {
    background: linear-gradient(135deg, #fef7ed 0%, #f0f9ff 25%, #fef3f2 50%, #f0fdf4 75%, #fef7ed 100%);
    background-size: 400% 400%;
    animation: gradient 8s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.artwork-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.artwork-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.brush-stroke {
    position: relative;
    overflow: hidden;
}

.brush-stroke::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.brush-stroke:hover::before {
    left: 100%;
}

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Modal improvements for mobile */
@media (max-width: 768px) {
    .modal-content {
        max-height: 85vh;
        display: flex;
        flex-direction: column;
    }

    .modal-grid {
        display: flex !important;
        flex-direction: column !important;
        grid-template-columns: none !important;
        flex: 1;
        overflow: hidden;
    }

    .modal-image-section {
        flex-shrink: 0;
        max-height: 40vh;
        order: 1;
    }

    .modal-content-section {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
        order: 2;
        min-height: 0;
        /* Ensure the content area has proper height for scrolling */
        height: 0;
    }

    .modal-image-section img {
        max-height: 35vh !important;
    }
}

/* Prevent touch scrolling on modal overlay */
.modal-overlay {
    touch-action: none;
    overscroll-behavior: contain;
}

/* Smooth scrolling for modal content */
.modal-scrollable {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Ensure momentum scrolling works on iOS */
    scroll-behavior: smooth;
}

/* Additional mobile scrolling fixes */
@media (max-width: 768px) {
    .modal-content-section {
        /* Force GPU acceleration for smoother scrolling */
        transform: translateZ(0);
        will-change: scroll-position;
    }
}

/* Image protection styles */
img {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: auto;
}