/* Enhanced Animations and Effects for Compiler Dashboard */

/* Smooth page transitions */
.page-transition {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced hover effects for cards */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Pulse animation for active elements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Status indicators with glow effects */
.status-online {
    color: #10b981;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.status-warning {
    color: #f59e0b;
    text-shadow: 0 0 10px rgba(245, 158, 11, 0.3);
}

.status-error {
    color: #ef4444;
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* Progress bar animations */
.progress-bar-animated {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    0% {
        background-position-x: 1rem;
    }
}

/* Button hover effects */
.btn-enhanced {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-enhanced:hover::before {
    left: 100%;
}

/* Table row animations */
.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05) !important;
    transform: scale(1.005);
}

/* Loading spinner variations */
.spinner-grow-sm {
    width: 1rem;
    height: 1rem;
}

.spinner-dots {
    display: inline-block;
    position: relative;
    width: 80px;
    height: 80px;
}

.spinner-dots div {
    position: absolute;
    top: 33px;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: var(--primary-color);
    animation-timing-function: cubic-bezier(0, 1, 1, 0);
}

.spinner-dots div:nth-child(1) {
    left: 8px;
    animation: spinner-dots1 0.6s infinite;
}

.spinner-dots div:nth-child(2) {
    left: 8px;
    animation: spinner-dots2 0.6s infinite;
}

.spinner-dots div:nth-child(3) {
    left: 32px;
    animation: spinner-dots2 0.6s infinite;
}

.spinner-dots div:nth-child(4) {
    left: 56px;
    animation: spinner-dots3 0.6s infinite;
}

@keyframes spinner-dots1 {
    0% { transform: scale(0); }
    100% { transform: scale(1); }
}

@keyframes spinner-dots3 {
    0% { transform: scale(1); }
    100% { transform: scale(0); }
}

@keyframes spinner-dots2 {
    0% { transform: translate(0, 0); }
    100% { transform: translate(24px, 0); }
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    border: none;
    min-width: 300px;
}

.toast.show {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Enhanced data table styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Custom scrollbar for data containers */
.dataContainer::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dataContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dataContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dataContainer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Floating action button */
.fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    z-index: 1000;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
    background: var(--primary-dark);
}

/* Breadcrumb enhancements */
.breadcrumb {
    background: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--primary-color);
}

/* Modal enhancements */
.modal.fade .modal-dialog {
    transition: transform 0.3s ease-out;
    transform: translate(0, -50px);
}

.modal.show .modal-dialog {
    transform: none;
}

/* Chart container styling */
.chart-container {
    position: relative;
    background: var(--surface-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

/* Success/Error message animations */
.alert.slide-down {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Enhanced dropdown menus */
.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--primary-color);
    transform: translateX(4px);
}

/* Responsive design enhancements */
@media (max-width: 768px) {
    .fab {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
    
    .toast-container {
        top: 15px;
        right: 15px;
        left: 15px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
    }
}