/* Modern Components CSS untuk Frontend */

/* Card Modern */
.card-modern {
    @apply bg-white rounded-2xl shadow-lg border border-gray-100 overflow-hidden transition-all duration-300 hover:shadow-xl hover:scale-105;
}

/* Button Modern */
.btn-modern {
    @apply inline-flex items-center justify-center px-6 py-3 rounded-xl font-semibold text-sm transition-all duration-300 transform hover:scale-105 shadow-lg hover:shadow-xl;
}

.btn-modern-primary {
    @apply bg-gradient-to-r from-blue-600 to-indigo-600 text-white hover:from-blue-700 hover:to-indigo-700;
}

.btn-modern-secondary {
    @apply bg-gradient-to-r from-gray-600 to-gray-700 text-white hover:from-gray-700 hover:to-gray-800;
}

/* Badge Modern */
.badge-modern {
    @apply inline-flex items-center px-3 py-1 rounded-full text-xs font-medium;
}

.badge-modern-success {
    @apply bg-green-100 text-green-800 border border-green-200;
}

.badge-modern-warning {
    @apply bg-yellow-100 text-yellow-800 border border-yellow-200;
}

.badge-modern-info {
    @apply bg-blue-100 text-blue-800 border border-blue-200;
}

.badge-modern-error {
    @apply bg-red-100 text-red-800 border border-red-200;
}

.badge-modern-primary {
    @apply bg-blue-100 text-blue-800 border border-blue-200;
}

.badge-modern-secondary {
    @apply bg-gray-100 text-gray-600 border border-gray-200;
}

.badge-modern-danger {
    @apply bg-red-100 text-red-800 border border-red-200;
}

/* Form Input Modern */
.form-input-modern {
    @apply w-full px-4 py-3 border border-gray-300 rounded-xl focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition-all duration-300;
}

/* Line Clamp Utilities */
.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;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hover Effects */
.hover-scale-105:hover {
    transform: scale(1.05);
}

.hover-scale-110:hover {
    transform: scale(1.1);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(-45deg, #667eea, #764ba2, #f093fb, #f5576c);
    background-size: 400% 400%;
    animation: gradient 3s ease infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Floating Animation */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Slide In Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out;
}

/* Responsive Utilities */
@media (max-width: 640px) {
    .card-modern {
        @apply rounded-xl;
    }
    
    .btn-modern {
        @apply px-4 py-2 text-xs;
    }
    
    .badge-modern {
        @apply px-2 py-1 text-xs;
    }
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* Loading Skeleton */
.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;
    }
}

/* Glass Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Shadow Effects */
.shadow-soft {
    box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04);
}

.shadow-medium {
    box-shadow: 0 4px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-strong {
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.2), 0 2px 10px -2px rgba(0, 0, 0, 0.1);
}

/* Border Radius Utilities */
.rounded-soft {
    border-radius: 12px;
}

.rounded-medium {
    border-radius: 16px;
}

.rounded-strong {
    border-radius: 24px;
}

/* Text Utilities */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Interactive Elements */
.interactive {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Focus States */
.focus-ring {
    @apply focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2;
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .card-modern {
        @apply bg-gray-800 border-gray-700;
    }
    
    .form-input-modern {
        @apply bg-gray-800 border-gray-600 text-white;
    }
    
    .badge-modern-success {
        @apply bg-green-900 text-green-200 border-green-700;
    }
    
    .badge-modern-warning {
        @apply bg-yellow-900 text-yellow-200 border-yellow-700;
    }
    
    .badge-modern-info {
        @apply bg-blue-900 text-blue-200 border-blue-700;
    }
    
    .badge-modern-error {
        @apply bg-red-900 text-red-200 border-red-700;
    }
}
