/* 节点列表页面特定样式 */
.node-list-container {
    padding: 20px;
}

/* 表格容器样式 */
.node-table-container {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* 表格样式优化 */
#nodeTable {
    width: 100%;
    border-collapse: collapse;
}

#nodeTable th {
    background-color: #f8f9fa;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #666;
    border-bottom: 2px solid #eee;
}

#nodeTable td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

#nodeTable tr:hover {
    background-color: #f8f9fa;
}

/* 复选框样式 */
#nodeTable input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* 操作按钮样式优化 */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

.action-buttons:hover {
    opacity: 1;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.btn-icon i {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.btn-icon:hover i {
    transform: scale(1.1);
}

/* 复制按钮特定样式 */
.btn-icon.success {
    background-color: #4CAF50;
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

.btn-icon.success:hover {
    background-color: #43A047;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
    transform: translateY(-1px);
}

.btn-icon.success:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(76, 175, 80, 0.2);
}

/* 复制成功动画 */
@keyframes copySuccess {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.btn-icon.copy-success i {
    animation: copySuccess 0.3s ease;
    color: #fff;
}

/* 按钮提示文字 */
.btn-icon::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 12px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.btn-icon:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-4px);
}

/* 状态标签样式 */
.status-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.status-online {
    background-color: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.status-offline {
    background-color: rgba(244, 67, 54, 0.1);
    color: #f44336;
}

/* 分页控件样式 */
.pagination {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 20px;
    gap: 10px;
}

.pagination button {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    background: #fff;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pagination button:hover {
    background: #f0f0f0;
}

.pagination button.active {
    background: var(--primary-color);
    color: white;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 过滤器样式 */
.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-item select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.modal-show {
    opacity: 1;
}

.modal.modal-hide {
    opacity: 0;
}

.modal .modal-content {
    position: relative;
    background: #fff;
    width: 90%;
    max-width: 600px;
    margin: 40px auto;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

.modal.modal-show .modal-content {
    transform: translateY(0);
}

.modal.modal-hide .modal-content {
    transform: translateY(-20px);
}

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

.modal .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal .modal-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.modal .close {
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal .close:hover {
    background: rgba(0,0,0,0.1);
    color: #333;
}

.modal .modal-body {
    padding: 20px;
}

.modal .form-group {
    margin-bottom: 20px;
}

.modal .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-weight: 500;
}

.modal textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.modal textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.modal .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.modal .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.modal .btn:not(.primary) {
    background: #f5f5f5;
    color: #666;
}

.modal .btn:not(.primary):hover {
    background: #eee;
}

.modal .btn.primary {
    background: var(--primary-color);
    color: white;
}

.modal .btn.primary:hover {
    background: var(--primary-color-dark, #388e3c);
}

/* 添加一些动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.modal.modal-show .modal-content {
    animation: slideUp 0.3s ease forwards;
}

/* 导入按钮样式 */
.modal .import-btn {
    margin-left: 15px;
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.modal .import-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(76, 175, 80, 0.1);
}

.modal .import-btn i {
    font-size: 16px;
}

/* 调整标题区域布局 */
.modal .modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal .modal-title h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

/* 操作面板样式 */
.action-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.left-actions, .right-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* 批量删除按钮样式 */
.batch-delete-btn {
    background-color: #ff5252 !important;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-10px);
    animation: slideIn 0.3s ease forwards;
}

.batch-delete-btn:hover {
    background-color: #ff1744 !important;
}

.batch-delete-btn.visible {
    display: inline-flex !important;
    opacity: 1;
    transform: translateX(0);
}

.batch-delete-btn i {
    margin-right: 6px;
    font-size: 18px;
}

.delete-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    margin-left: 6px;
}

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

/* 按钮通用样式优化 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.btn i {
    font-size: 18px;
}

/* 表格头统计信息样式 */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.node-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.node-stats i {
    color: var(--primary-color);
    font-size: 20px;
}

.node-stats span {
    color: var(--primary-color);
    font-weight: 600;
    margin: 0 4px;
}

/* 延迟状态样式 */
.latency-testing {
    color: #2196F3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.latency-waiting {
    color: #9E9E9E;
    font-style: italic;
}

.latency-unknown {
    color: #9E9E9E;
}

.latency-timeout {
    color: #F44336;
}

.latency-good {
    color: #4CAF50;
}

.latency-normal {
    color: #FF9800;
}

.latency-bad {
    color: #F44336;
}

/* 地区检测状态样式 */
.location-testing {
    color: #2196F3;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.location-waiting {
    color: #9E9E9E;
    font-style: italic;
}

/* 订阅导入对话框样式 */
#subscriptionDialog .form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#subscriptionDialog .form-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

#subscriptionDialog .form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #666;
}

#subscriptionDialog .form-group label i {
    color: var(--primary-color);
    font-size: 18px;
}

/* 筛选区域样式 */
.filter-section {
    display: flex;
    gap: 16px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group label {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 14px;
}

.filter-group label i {
    color: var(--primary-color);
    font-size: 18px;
}

.filter-group select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: white;
    color: #333;
    font-size: 14px;
    min-width: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:hover {
    border-color: var(--primary-color);
}

.filter-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* 重置筛选按钮样式 */
.reset-filter {
    background-color: #f5f5f5 !important;
    color: #666 !important;
    border: 1px solid #ddd !important;
    padding: 6px 12px !important;
    font-size: 13px !important;
    box-shadow: none !important;
}

.reset-filter:hover {
    background-color: #eee !important;
    border-color: #ccc !important;
    transform: none !important;
    box-shadow: none !important;
}

.reset-filter i {
    font-size: 16px !important;
}

/* 排序表头样式 */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.sortable i {
    font-size: 16px;
    margin-left: 4px;
    opacity: 0.3;
    transition: all 0.2s ease;
}

.sortable:hover i {
    opacity: 0.7;
}

.sortable.sort-asc i {
    opacity: 1;
    transform: rotate(0deg);
}

.sortable.sort-desc i {
    opacity: 1;
    transform: rotate(180deg);
}

/* 拖拽排序样式 */
.draggable {
    cursor: move;
    position: relative;
    z-index: 1;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.dragging {
    background-color: #f8f9fa !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
    transform: scale(1.01) translate3d(0, 0, 0);
    border-radius: 8px;
    opacity: 0.9;
    pointer-events: none;
}

/* 拖动时的视觉反馈 */
.drag-over-top {
    position: relative;
    transform: translateY(5px);
    transition: transform 0.2s ease;
}

.drag-over-top::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -2px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 8px var(--primary-color);
    animation: glow 1.5s ease-in-out infinite;
}

.drag-over-bottom {
    position: relative;
    transform: translateY(-5px);
    transition: transform 0.2s ease;
}

.drag-over-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    box-shadow: 0 0 8px var(--primary-color);
    animation: glow 1.5s ease-in-out infinite;
}

/* 发光动画 */
@keyframes glow {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 5px var(--primary-color);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 15px var(--primary-color);
    }
}

/* 拖动手柄悬停效果 */
.drag-handle {
    cursor: move;
    padding: 4px 8px;
    border-radius: 4px;
    color: #999;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
    position: relative;
    overflow: hidden;
}

.drag-handle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: var(--primary-color);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: all 0.3s ease;
}

.drag-handle:hover::before {
    width: 120%;
    height: 120%;
    opacity: 0.1;
}

.drag-handle:hover {
    color: var(--primary-color);
    transform: translateY(-1px);
}

.drag-handle:hover i {
    animation: wiggle 0.5s ease;
}

/* 拖动图标晃动动画 */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* 行过渡效果 */
#nodeTable tr {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backface-visibility: hidden;
}

/* 拖动时相邻行的过渡效果 */
#nodeTable tr:not(.dragging) {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 拖动时的空位指示 */
.drag-placeholder {
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    margin: 10px 0;
    border-radius: 3px;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scaleY(1);
    }
    50% {
        opacity: 1;
        transform: scaleY(1.5);
    }
}

/* 优化表格行悬停效果 */
#nodeTable tr:hover:not(.dragging) {
    background-color: #f8f9fa;
    transform: translateX(5px);
    transition: all 0.3s ease;
}

/* 拖动时的表格行样式 */
#nodeTable tr.dragging td {
    background: linear-gradient(45deg, #f8f9fa, #ffffff);
    border: none;
}

/* 拖动手柄激活状态 */
.drag-handle.active {
    background-color: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

/* 添加拖动手柄样式 */
.drag-handle {
    cursor: move;
    padding: 4px 8px;
    border-radius: 4px;
    color: #999;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 8px;
}

.drag-handle:hover {
    background-color: #f5f5f5;
    color: var(--primary-color);
}

.drag-handle i {
    font-size: 18px;
}

/* 拖动相关样式 */
.draggable {
    cursor: default;
}

.dragging {
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
}

/* 拖动时的视觉反馈 */
.drag-over-top {
    position: relative;
}

.drag-over-top::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 2px;
    background-color: var(--primary-color);
}

.drag-over-bottom {
    position: relative;
}

.drag-over-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--primary-color);
}

/* 操作按钮容器样式 */
.action-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* 添加节点名称列的样式 */
.node-name {
    cursor: pointer;
    transition: all 0.2s ease;
    background: none !important;
}

.node-name:hover {
    text-decoration: underline;
}

/* 修改拖动相关样式 */
.draggable {
    cursor: move;
}

/* 修改拖动相关样式 */
.draggable {
    cursor: move;
    position: relative;
    z-index: 1;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

.dragging {
    background-color: #f8f9fa !important;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
    transform: scale(1.01) translate3d(0, 0, 0);
    border-radius: 8px;
    opacity: 0.9;
    pointer-events: none;
}

/* 优化行过渡效果 */
#nodeTable tr {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background-color 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    backface-visibility: hidden;
}

/* 拖动时相邻行的过渡效果 */
#nodeTable tr:not(.dragging) {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 修改拖动指示器样式 */
.drag-over-top::before,
.drag-over-bottom::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
    opacity: 0;
    transform: scaleX(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.drag-over-top::before {
    top: 0;
}

.drag-over-bottom::after {
    bottom: 0;
}

.drag-over-top::before,
.drag-over-bottom::after {
    opacity: 1;
    transform: scaleX(1);
}

/* 表格容器样式优化 */
.node-table-container {
    overflow: hidden;
    transform: translate3d(0, 0, 0);
    will-change: transform;
}

/* 防止拖动文本选中 */
.dragging * {
    user-select: none;
}

/* 修改节点名称样式 */
.node-name {
    cursor: pointer;
    transition: all 0.2s ease;
    background: none !important;
}

.node-name:hover {
    text-decoration: underline;
}

/* 延迟状态样式 */
.latency-testing, .node-name.latency-testing {
    color: #2196F3;
    background: none !important;
}

.latency-waiting, .node-name.latency-waiting {
    color: #9E9E9E;
    font-style: italic;
    background: none !important;
}

.latency-unknown, .node-name.latency-unknown {
    color: #9E9E9E;
    background: none !important;
}

.latency-timeout, .node-name.latency-timeout {
    color: #F44336;
    background: none !important;
}

.latency-good, .node-name.latency-good {
    color: #4CAF50;
    background: none !important;
}

.latency-normal, .node-name.latency-normal {
    color: #FF9800;
    background: none !important;
}

.latency-bad, .node-name.latency-bad {
    color: #F44336;
    background: none !important;
}

/* 添加筛选选择器样式 */
.filter-select {
    display: inline-flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 4px 12px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.filter-select:hover {
    border-color: var(--primary-color);
    background: #fff;
}

.filter-select i {
    color: #666;
    margin-right: 8px;
    font-size: 18px;
}

.filter-select select {
    border: none;
    background: none;
    color: #333;
    font-size: 14px;
    padding: 4px 8px;
    cursor: pointer;
    outline: none;
    min-width: 120px;
}

.filter-select select:focus {
    outline: none;
}

/* 优化操作面板布局 */
.action-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.left-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.right-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

/* 响应式布局优化 */
@media (max-width: 1200px) {
    .action-panel {
        flex-wrap: wrap;
    }
    
    .right-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
    
    .filter-select {
        margin-right: 8px;
        margin-bottom: 8px;
    }
}

@media (max-width: 768px) {
    .action-panel {
        flex-direction: column;
    }
    
    .left-actions,
    .right-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .filter-select {
        flex: 1;
        min-width: 150px;
        margin-right: 0;
    }
}