/* Browse Page Specific Styles */

.table-container {
    overflow-x: auto;
    max-height: 70vh;
    overflow-y: auto;  /* 添加这行 */
}

.table-container table {
    min-width: 600px;
}

/* 添加表头固定样式 */
.table-container thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f9fafb;
}

.table-container thead th {
    background-color: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
}

.table-container tbody tr:hover {
    background-color: #f8fafc;
    transition: background-color 0.2s ease;
}

.tab-btn {
    position: relative;
    overflow: hidden;
}

.tab-btn::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;
}

.tab-btn:hover::before {
    left: 100%;
}

.tab-btn.active {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Action buttons */
.action-btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.action-btn-primary {
    background-color: #3b82f6;
    color: white;
}

.action-btn-primary:hover {
    background-color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.action-btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border-color: #d1d5db;
}

.action-btn-secondary:hover {
    background-color: #e5e7eb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Pagination styles */
.page-number {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    background-color: white;
    color: #374151;
    text-decoration: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.page-number:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.page-number.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.page-number.active:hover {
    background-color: #2563eb;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading-row {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Responsive design */
@media (max-width: 768px) {
    .table-container {
        font-size: 0.875rem;
    }
    
    .table-container th,
    .table-container td {
        padding: 0.5rem 0.75rem;
    }
    
    .tab-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    #pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    #page-numbers {
        order: -1;
    }
}

/* Custom scrollbar */
.table-container::-webkit-scrollbar {
    height: 8px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}