/* Pool Stats Cards */
.pool-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.pool-stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.pool-stat-card.total {
    border-top: 3px solid #6366f1;
}

.pool-stat-card.live {
    border-top: 3px solid #10b981;
}

.pool-stat-card.dead {
    border-top: 3px solid #ef4444;
}

.pool-stat-number {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0;
}

.pool-stat-label {
    color: #6b7280;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Pool Table */
.pool-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.pool-table th {
    background: #f3f4f6;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.pool-table td {
    padding: 12px;
    border-bottom: 1px solid #e5e7eb; /* Đậm hơn từ #f3f4f6 */
}

.pool-table tr:hover {
    background: #f9fafb;
}
/* Zebra striping - màu xen kẽ cho dễ nhìn */
.pool-table tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.pool-table tbody tr:nth-child(odd) {
    background-color: white;
}

/* Hover effect */
.pool-table tbody tr:hover {
    background-color: #f3f4f6 !important;
    transition: background-color 0.2s ease;
}

/* Border cho cột */
.pool-table td:not(:last-child) {
    border-right: 1px solid #e5e7eb;
}

/* First column (checkbox) nhạt hơn */
.pool-table td:first-child {
    border-right: 1px solid #f3f4f6;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge.live {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.dead {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge i {
    font-size: 8px;
}

/* Add Proxy Form */
.add-proxy-form {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.form-tab {
    padding: 10px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.form-tab.active {
    color: #6366f1;
    border-bottom-color: #6366f1;
}

.form-content {
    display: none;
}

.form-content.active {
    display: block;
}

/* Quick Stats */
.quick-stats {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 8px;
}

.quick-stat {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quick-stat i {
    font-size: 20px;
}

.quick-stat.total i {
    color: #6366f1;
}

.quick-stat.live i {
    color: #10b981;
}

.quick-stat.dead i {
    color: #ef4444;
}

/* Back Button */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #6b7280;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s;
    margin-bottom: 20px;
}

.back-button:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.loading-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
}

.loading-content i {
    font-size: 48px;
    color: #6366f1;
    margin-bottom: 16px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 90%;
    animation: modalFadeIn 0.3s;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Duplicate Group */
.duplicate-group {
    margin-bottom: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.duplicate-group h4 {
    margin: 0 0 10px 0;
    color: #ef4444;
    font-size: 16px;
}

.duplicate-group ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.duplicate-group li {
    padding: 5px 0;
    color: #6b7280;
    font-size: 14px;
}

/* Messages */
.message {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

.message-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.message-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.message-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.message.fade-out {
    animation: fadeOut 0.5s ease forwards;
}

/* Ping Colors */
.ping-good {
    color: #10b981;
    font-weight: 600;
}

.ping-medium {
    color: #f59e0b;
    font-weight: 600;
}

.ping-bad {
    color: #ef4444;
    font-weight: 600;
}

/* Animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Dark Mode Support */
[data-theme="dark"] .pool-stat-card,
[data-theme="dark"] .pool-table,
[data-theme="dark"] .add-proxy-form,
[data-theme="dark"] .loading-content {
    background: #1f2937;
}

[data-theme="dark"] .pool-table th {
    background: #111827;
    color: #f3f4f6;
}

[data-theme="dark"] .pool-table td {
    border-bottom: 1px solid #374151;
}

[data-theme="dark"] .pool-table td:not(:last-child) {
    border-right: 1px solid #374151;
}

[data-theme="dark"] .pool-table tbody tr:nth-child(even) {
    background-color: #111827;
}

[data-theme="dark"] .pool-table tbody tr:nth-child(odd) {
    background-color: #1f2937;
}

[data-theme="dark"] .pool-table tbody tr:hover {
    background-color: #374151 !important;
}

[data-theme="dark"] .quick-stats {
    background: #111827;
}

[data-theme="dark"] .modal-content {
    background: #1f2937;
    border-color: #374151;
}

[data-theme="dark"] .modal-header {
    border-color: #374151;
}

[data-theme="dark"] .modal-header h3 {
    color: #f3f4f6;
}

[data-theme="dark"] .modal-close {
    color: #9ca3af;
}

[data-theme="dark"] .modal-close:hover {
    background: #374151;
    color: #f3f4f6;
}

[data-theme="dark"] .modal-footer {
    border-color: #374151;
}

[data-theme="dark"] .duplicate-group {
    background: #111827;
    border-color: #374151;
}

[data-theme="dark"] .duplicate-group li {
    color: #d1d5db;
}

[data-theme="dark"] .message-error {
    background: #7f1d1d;
    color: #fecaca;
    border-color: #991b1b;
}

[data-theme="dark"] .message-success {
    background: #14532d;
    color: #bbf7d0;
    border-color: #166534;
}

[data-theme="dark"] .message-info {
    background: #1e3a8a;
    color: #bfdbfe;
    border-color: #2563eb;
}

[data-theme="dark"] .form-tab {
    color: #d1d5db;
}

[data-theme="dark"] .form-tab.active {
    color: #818cf8;
    border-bottom-color: #818cf8;
}

[data-theme="dark"] .loading-content {
    background: #1f2937;
    color: #f3f4f6;
}

/* Responsive */
@media (max-width: 768px) {
    .pool-stats {
        grid-template-columns: 1fr;
    }
    
    .quick-stats {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-content {
        max-width: 95%;
        margin: 10px;
    }
    
    .pool-table {
        width: 100%;
        border-collapse: collapse;
        background: white;
        border-radius: 8px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); /* Thêm shadow nhẹ */
        border: 1px solid #e5e7eb; /* Thêm border cho toàn bảng */
    }
    
    .pool-table th,
    .pool-table td {
        padding: 8px;
    }
}
/* Auto Refresh Indicator */
.auto-refresh-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    margin: 0 16px;
}

.auto-refresh-indicator i {
    font-size: 12px;
}

#refreshCountdown {
    font-weight: 700;
    min-width: 20px;
    display: inline-block;
    text-align: center;
}

[data-theme="dark"] .auto-refresh-indicator {
    background: #312e81;
    color: #a5b4fc;
}

/* Fix section header layout */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    margin: 0;
    flex: 0 0 auto;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

@media (max-width: 768px) {
    .auto-refresh-indicator {
        order: 3;
        width: 100%;
        justify-content: center;
        margin: 0;
    }
    
    .section-header {
        justify-content: center;
    }
}
tr.updating {
    background-color: #fef3c7 !important;
    transition: background-color 0.3s ease;
}

[data-theme="dark"] tr.updating {
    background-color: #78350f !important;
}

/* STT Column Styling */
.stt-column {
    font-weight: 600;
    color: #6b7280;
    text-align: center;
    background-color: #f9fafb;
    border-right: 2px solid #e5e7eb !important;
}

.pool-table tbody tr:hover .stt-column {
    background-color: #f3f4f6;
}

/* Dark mode */
[data-theme="dark"] .stt-column {
    color: #9ca3af;
    background-color: #111827;
    border-right-color: #374151 !important;
}

[data-theme="dark"] .pool-table tbody tr:hover .stt-column {
    background-color: #374151;
}