/* Hide scrollbar utility */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ensure mobile bottom padding */
@media (max-width: 1023px) {
    body {
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

/* Smooth transitions */
.transition-all {
    transition: all 0.3s ease;
}

/* Better responsive text */
@media (max-width: 640px) {
    .prose {
        font-size: 0.875rem;
        line-height: 1.5;
    }
}

/* Improved card shadows */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Better focus states */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Improved mobile touch targets */
@media (max-width: 768px) {
    button,
    a {
        min-height: 44px;
    }
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Gradient animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient 3s ease infinite;
}

/* Better responsive images */
img {
    max-width: 100%;
    height: auto;
}

/* Improved truncate for mobile */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Better spacing for mobile */
@media (max-width: 640px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Modal animations */
#reviewModal,
#privateCourseModal {
    backdrop-filter: blur(4px);
}

#reviewModal > div,
#privateCourseModal > div {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Star rating hover effects */
.rating-star:hover {
    transform: scale(1.1);
}

/* Progress bar animation */
.bg-blue-600 {
    transition: width 0.5s ease-in-out;
}

/* Button press effect */
button:active {
    transform: scale(0.98);
}

/* Notification styles */
.notification-enter {
    animation: notificationSlideIn 0.3s ease-out;
}

.notification-exit {
    animation: notificationSlideOut 0.3s ease-in;
}

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

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

/* Improved form focus states */
input:focus,
textarea:focus,
select:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Better disabled state */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Skeleton loading for images */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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