/* Base */
* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

[x-cloak] {
    display: none !important;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background-color: #f3f4f6;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background-color: #9ca3af;
    border-radius: 9999px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background-color: #6b7280;
}

/* Animated Gradient Background */
.animated-gradient {
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

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

/* Pulse Animation */
.pulse-slow {
    animation: pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Floating Animation */
.float {
    animation: float 3s ease-in-out infinite;
}

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

/* Card Hover Effect */
.card-hover {
    transition: all 300ms;
}
.card-hover:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(-0.5rem);
}

/* Gradient Text */
.gradient-text {
    background-image: linear-gradient(to right, #2a44ff, #1033cc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Glass Morphism Effect */
.glass {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

/* Status Badge Animations */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 200ms;
}

.status-running {
    background-color: #dcfce7;
    color: #166534;
    box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.5);
}

.status-stopped {
    background-color: #fee2e2;
    color: #991b1b;
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.5);
}

.status-starting {
    background-color: #fef9c3;
    color: #854d0e;
    box-shadow: 0 0 0 2px rgba(250, 204, 21, 0.5);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Button Styles */
.btn-primary {
    padding: 0.75rem 1.5rem;
    background-image: linear-gradient(to right, #1540ff, #1033cc);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 200ms;
}
.btn-primary:hover {
    background-image: linear-gradient(to right, #1033cc, #0c2699);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background-color: white;
    color: #374151;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 200ms;
}
.btn-secondary:hover {
    background-color: #f9fafb;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.btn-danger {
    padding: 0.75rem 1.5rem;
    background-image: linear-gradient(to right, #dc2626, #b91c1c);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: all 200ms;
}
.btn-danger:hover {
    background-image: linear-gradient(to right, #b91c1c, #991b1b);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    border: 4px solid #e5e7eb;
    border-top-color: #1540ff;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
}

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

/* Shimmer Loading Effect */
.shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

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

/* Text Shadows */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Smooth Scroll */
.smooth-scroll {
    scroll-behavior: smooth;
}

/* Slide Down Animation */
@keyframes slide-down {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-slide-down {
    animation: slide-down 0.3s ease-out;
}

/* Mobile Responsive Tables */
@media (max-width: 768px) {
    .mobile-table-card {
        display: block;
    }

    .mobile-table-card thead {
        display: none;
    }

    .mobile-table-card tbody,
    .mobile-table-card tr {
        display: block;
        margin-bottom: 1rem;
    }

    .mobile-table-card tr {
        background-color: white;
        border-radius: 0.5rem;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        padding: 1rem;
    }

    .mobile-table-card td {
        display: block;
        text-align: right;
        padding: 0.5rem 0;
        border: 0;
    }

    .mobile-table-card td:before {
        content: attr(data-label);
        float: left;
        font-weight: 600;
        color: #374151;
    }
}

/* Hide scrollbar for mobile */
@media (max-width: 640px) {
    .hide-scrollbar-mobile {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .hide-scrollbar-mobile::-webkit-scrollbar {
        display: none;
    }
}
