/* Routes页面专用样式 - 页面头部和路由查询功能特有样式 */

/* 分页样式 */
.pagination-wrapper {
    margin: 2rem 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0, 102, 204, 0.08);
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.pagination-btn {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    background: white;
    color: #475569;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
}

.pagination-btn:hover:not(.disabled) {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.pagination-btn.active {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    font-weight: 600;
}

.pagination-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: #f8fafc;
    color: #cbd5e1;
}

.pagination-ellipsis {
    color: #64748b;
    padding: 0 0.5rem;
    font-weight: 500;
}

/* 分页信息样式 */
.pagination-info {
    text-align: center;
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 1rem;
}

/* 限制 Bootstrap nav-tabs 样式只影响 tab 区域 */
#resultTabs .nav-link,
#servers-tabs .nav-link {
    /* 确保只影响 tab 链接 */
    position: relative;
}

/* 确保 routes.html 页面的导航栏完全使用 styles.css 中的样式 */
body {
    /* 重置可能的 Bootstrap 影响 */
    padding-top: 0 !important;
    overflow-x: hidden; /* 防止横向滚动 */
}

html {
    overflow-x: hidden; /* 防止横向滚动 */
}

/* 确保所有容器都不会产生横向滚动 */
.route-list,
.route-card,
.route-card-header,
.route-card-body,
.route-path {
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

/* 强制应用主导航栏样式 */
.navbar {
    /* 确保与 index.html 完全一致的样式 */
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 249, 250, 0.95) 100%) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    z-index: 1000 !important;
    transition: all 0.3s ease !important;
    border-bottom: 1px solid rgba(0, 102, 204, 0.1) !important;
    box-shadow: 0 4px 30px rgba(0, 102, 204, 0.15) !important;
    padding: 0.5rem 0 !important;
}

/* 有通知栏时的导航栏位置 */
body.has-notification .navbar {
    top: 40px !important;
}

/* 路线查询结果样式 */
.route-results {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.1);
    margin-top: 2rem;
}

.route-results h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.results-summary {
    background: var(--bg-light);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-blue);
}

.results-summary p {
    margin: 0;
    color: var(--text-dark);
    font-weight: 500;
}

.route-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.route-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.route-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary-blue);
    transition: var(--transition);
}

.route-item:hover {
    box-shadow: 0 6px 25px rgba(0, 102, 204, 0.15);
    transform: translateY(-2px);
    border-color: var(--primary-blue);
}

.route-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-light);
}

.route-header h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.route-type {
    background: var(--primary-blue);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
}

.route-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.route-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.route-stat i {
    color: var(--primary-blue);
    width: 16px;
    text-align: center;
}

.route-stat strong {
    color: var(--text-dark);
    font-weight: 600;
}

.route-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* 新的美化卡片样式 */
.route-card {
    background: white;
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
    transform: translateY(30px);
    width: 100%;
}

.route-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 102, 204, 0.2);
    border-color: var(--primary-blue);
}

.route-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
}

.route-card-header {
    padding: 1.5rem 1.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.02), transparent);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.route-provider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.provider-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.2);
}

.provider-info h5 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.route-type {
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-blue);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.route-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.route-badge.excellent {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.route-badge.good {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.route-badge.fair {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.route-card-body {
    padding: 1.5rem;
}

.route-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0, 102, 204, 0.02);
    border-radius: 12px;
    position: relative;
}

.path-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    z-index: 2;
}

.node-icon {
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-blue);
    font-size: 1rem;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.15);
    overflow: hidden;
}

.node-icon img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.from-node .node-icon {
    color: var(--accent-green);
    border-color: var(--accent-green);
}

.from-node .node-icon i {
    color: var(--accent-green);
}

.to-node .node-icon {
    color: var(--secondary-blue);
    border-color: var(--secondary-blue);
}

.to-node .node-icon i {
    color: var(--secondary-blue);
}

.node-name {
    font-size: 0.8rem;
    color: var(--text-dark);
    font-weight: 500;
    text-align: center;
    max-width: 100px;
    word-wrap: break-word;
}

.path-connection {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60px;
}

.path-connection .connection-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-green), var(--primary-blue), var(--secondary-blue));
    position: relative;
    overflow: visible;
}

.path-connection .connection-pulse {
    position: absolute;
    top: -2px;
    left: -10px;
    width: 10px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: pulse 2s linear infinite;
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
    z-index: 1;
}

@keyframes pulse {
    0% { left: -10px; }
    100% { left: calc(100% + 10px); }
}

.path-connection .connection-info {
    position: absolute;
    top: -15px;
    display: flex;
    gap: 0.5rem;
}

.path-connection .connection-info .latency-info {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    white-space: nowrap;
    background: rgba(0, 102, 204, 0.1);
    color: var(--primary-blue);
}

.path-connection .connection-price-tag {
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(76, 175, 80, 0.1);
    color: rgba(76, 175, 80, 0.9);
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.path-connection .connection-type-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 102, 0, 0.1);
    color: #ff6600;
    padding: 0.2rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    text-align: center;
    line-height: 1.2;
}

.route-metrics {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

/* 确保桌面端5列布局 */
@media (min-width: 769px) {
    .route-metrics {
        grid-template-columns: repeat(5, 1fr) !important;
        gap: 0.5rem;
    }

    .route-metrics .metric-item {
        flex: 1;
        min-width: 0;
    }

    .route-metrics .metric-item.action-button {
        flex: 1;
        min-width: 0;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 0.75rem 0.5rem !important;
        background: rgba(0, 102, 204, 0.02) !important;
        border-radius: 8px !important;
        border: 1px solid rgba(0, 102, 204, 0.1) !important;
        color: var(--primary-blue) !important;
        font-size: 1.1rem !important;
        font-weight: 600 !important;
        cursor: pointer !important;
        gap: 0.5rem !important;
    }

    .route-metrics .metric-item.action-button i {
        font-size: 1rem !important;
        width: 20px !important;
        text-align: center !important;
    }
}

.metric-item {
    text-align: center;
    padding: 0.75rem 0.5rem;
    background: rgba(0, 102, 204, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(0, 102, 204, 0.1);
    transition: all 0.3s ease;
}

.metric-item:hover {
    background: rgba(0, 102, 204, 0.05);
    transform: translateY(-1px);
}

.metric-item.action-button {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    background: rgba(0, 102, 204, 0.02);
    border-radius: 8px;
    border: 1px solid rgba(0, 102, 204, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    gap: 0.5rem;
}

.metric-item.action-button:hover {
    background: rgba(0, 102, 204, 0.05);
    transform: translateY(-1px);
    color: var(--secondary-blue);
}

.metric-item.action-button:last-child {
    color: var(--primary-blue);
    font-weight: 700;
}

.metric-item.action-button:last-child:hover {
    background: rgba(0, 102, 204, 0.08);
    border-color: var(--primary-blue);
}

.metric-item.action-button i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.metric-compact {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.metric-compact i {
    color: var(--primary-blue);
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.metric-info {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
}

.metric-info .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.metric-info .unit {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}


/* 中间节点样式 */
.path-node.intermediate-node {
    position: relative;
    padding: 0.5rem;
    background: rgba(0, 102, 204, 0.05);
    border-radius: 8px;
    border: 1px dashed rgba(0, 102, 204, 0.3);
    min-width: 80px;
    text-align: center;
}

.path-node.intermediate-node .node-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-blue);
    display: block;
    margin-bottom: 0.25rem;
}


/* 路由统计摘要样式 */
.route-stats-summary {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.route-stats-summary .stat-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: var(--text-light);
    background: rgba(0, 102, 204, 0.05);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.route-stats-summary .stat-item i {
    color: var(--primary-blue);
    font-size: 0.75rem;
}

/* 多跳路径的连接线样式调整 */
.route-path {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.route-path .path-connections {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
}

/* 为多跳路径调整连接线 - 允许内容自适应 */
.route-path:has(.intermediate-node) {
    flex-wrap: wrap;
    padding: 0.5rem 0;
    align-items: center;
    justify-content: center;
}

.route-path:has(.intermediate-node) .path-connection {
    min-width: 30px;
    flex-shrink: 1;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
}

.btn-outline-primary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* 卡片中的主按钮样式 */
.route-card-footer .btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.875rem;
}

.route-card-footer .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.4);
}

/* 路线详情模态框 */
.route-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-dialog {
    position: relative;
    z-index: 10001;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    animation: slideUp 0.3s ease;
}

.route-details-modal .modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.route-details-modal .modal-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 1.5rem 2rem;
    border-bottom: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-title i {
    font-size: 1.25rem;
}

.modal-title h4 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.route-details-modal .btn-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0.5rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1rem;
}

.route-details-modal .btn-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.route-details-modal .modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
    background: #fafbfc;
}

.route-details-modal .modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--border-light);
    background: white;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* 路线概览 */
.route-overview {
    margin-bottom: 2rem;
}

.route-path {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.1);
}

.node-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.node-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.node-details h5 {
    margin: 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
}

.node-id {
    color: var(--text-light);
    font-size: 0.875rem;
}

.route-connection {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.route-connection .connection-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    position: relative;
    overflow: visible;
}

.connection-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: flow 2s linear infinite;
}

.route-stats {
    display: flex;
    gap: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(0, 102, 204, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    color: var(--primary-blue);
    font-weight: 600;
}

/* 路线规格 */
.route-specifications,
.route-pricing,
.route-performance,
.route-features {
    margin-bottom: 1.5rem;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.route-specifications h6,
.route-pricing h6,
.route-performance h6,
.route-features h6 {
    margin: 0 0 1rem 0;
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.route-specifications h6 i,
.route-pricing h6 i,
.route-performance h6 i,
.route-features h6 i {
    color: var(--primary-blue);
}

.spec-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.spec-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--primary-blue);
}

.spec-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-blue);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.spec-info label {
    display: block;
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.spec-info value {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

/* 定价信息 */
.pricing-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: var(--bg-light);
    border-radius: 8px;
}

.price-item.highlight {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 68, 153, 0.1));
    border-left: 3px solid var(--primary-blue);
}

.price-item label {
    color: var(--text-light);
    font-weight: 500;
}

.price {
    font-weight: 600;
    color: var(--text-dark);
}

.price.total {
    color: var(--primary-blue);
    font-size: 1.1rem;
}

/* 性能指标 */
.performance-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.metric label {
    min-width: 100px;
    color: var(--text-light);
    font-weight: 500;
}

.metric-bar {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary-blue);
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.bar-fill.success {
    background: var(--accent-green);
}

.metric-bar span {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-dark);
    background: white;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
}

/* 服务特性 */
.feature-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: var(--transition);
}

.feature-item:hover {
    background: var(--bg-light);
}

.feature-item i {
    font-size: 1rem;
}

.feature-item span {
    color: var(--text-dark);
    font-size: 0.9rem;
}

.text-success {
    color: var(--accent-green) !important;
}

/* 动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes flow {
    from { left: -100%; }
    to { left: 100%; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-dialog {
        width: 95%;
        margin: 1rem;
    }

    .route-path {
        flex-direction: column;
        gap: 1rem;
    }

    .path-connections {
        flex-direction: column;
        gap: 1rem;
    }

    
    .route-connection {
        width: 2px;
        height: 40px;
    }

    .connection-line {
        width: 2px;
        height: 100%;
    }

    .route-stats {
        flex-direction: column;
    }

    .spec-grid {
        grid-template-columns: 1fr;
    }

    .feature-list {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column;
    }
}


/* 美化后的页面头部样式 */
.page-header {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9) 0%, rgba(0, 68, 153, 0.85) 100%), url('../images/map.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 8rem 0 4rem;
    margin-top: 70px; /* 为导航栏留出空间 */
    margin-bottom: 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* 有通知栏时调整页面头部位置 */
body.has-notification .page-header {
    margin-top: 110px; /* 导航栏高度 + 通知栏高度 */
}

/* 面包屑导航样式 */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb a:hover {
    color: white;
    text-decoration: underline;
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="20" height="20" patternUnits="userSpaceOnUse"><path d="M 20 0 L 0 0 0 20" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.4;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.page-header::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.1); opacity: 0.1; }
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    position: relative;
    z-index: 2;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: white;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.breadcrumb span {
    margin: 0 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.page-header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, #ffffff, #e0f2ff, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: shine 3s linear infinite;
}

@keyframes shine {
    to { background-position: 200% center; }
}

.page-header p {
    font-size: 1.3rem;
    opacity: 0.95;
    max-width: 700px;
    margin: 0 auto 2rem;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.6;
    font-weight: 300;
}




.search-box {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-hover);
    margin-top: -50px;
    position: relative;
    z-index: 10;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
    overflow: visible; /* 修改为visible，允许下拉列表溢出 */
    max-width: 1200px; /* 限制最大宽度，与主内容区同宽 */
    margin-left: auto;
    margin-right: auto;
}

.search-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.search-container {
    margin-bottom: 1rem;
}

/* 自定义搜索框布局 */
.search-box .search-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    max-width: 1000px;
    margin: 0 auto;
}

.search-box .search-group {
    flex: 1;
    min-width: 150px;
}

.search-box .search-group.select-group {
    flex: 3;
    min-width: 250px;
}

.search-box .search-group.button-group {
    flex: 1;
    min-width: 120px;
    max-width: 140px;
}

/* 搜索框内容居中 */
.search-box {
    position: relative;
}

.search-box .search-row {
    justify-content: center;
}

/* 确保搜索框内的行不会溢出 */
.search-box .row {
    align-items: center;
    flex-wrap: nowrap;
}

/* 调整搜索框内各列的样式 */
.search-box .col-md-4,
.search-box .col-md-2 {
    padding: 0 0.5rem;
    display: flex;
    flex-direction: column;
}

/* 确保按钮不会溢出 */
.search-box .btn {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 搜索按钮图标颜色 */
.search-box .btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue)) !important;
    border: none !important;
    color: white !important;
}

.search-box .btn-primary i {
    color: white !important;
}

.search-box .btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-blue), var(--primary-blue)) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.3) !important;
}

/* 美化表单组件 - 增强特异性 */
.search-box .form-control,
.search-box .form-select,
.form-control,
.form-select {
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    padding: 0.75rem 1rem !important;
    transition: all 0.3s ease !important;
    background-color: #fff !important;
    font-size: 0.95rem !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
    height: auto !important;
    width: 100% !important;
}

/* 自定义下拉框箭头样式 */
.search-box .form-select {
    appearance: none !important;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23495057' d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.75rem center !important;
    background-size: 16px 12px !important;
    padding-right: 2.5rem !important;
}

.search-box .form-control:focus,
.search-box .form-select:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
    transform: translateY(-2px) !important;
    outline: none !important;
}

.search-box .form-control:hover,
.search-box .form-select:hover,
.form-control:hover,
.form-select:hover {
    border-color: #86b7fe !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

/* 表单标签样式 */
.form-label {
    font-weight: 600 !important;
    color: var(--text-dark) !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

/* 表单组样式 */
.mb-3 {
    margin-bottom: 1rem !important;
}

/* 错误信息样式 */
.invalid-feedback {
    color: #dc3545 !important;
    font-size: 0.875rem !important;
    margin-top: 0.25rem !important;
    display: block !important;
}

/* 卡片样式 */
.card {
    border: none !important;
    border-radius: 15px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
    background: white !important;
    margin-bottom: 2rem !important;
}

.card-body {
    padding: 2rem !important;
}

.card-title {
    font-weight: 700 !important;
    color: var(--text-dark) !important;
    margin-bottom: 1.5rem !important;
}

/* Select2下拉框美化 */
.select2-container--default .select2-selection--single {
    border-radius: 12px !important;
    border: 2px solid #e9ecef !important;
    padding: 0.5rem 1rem !important;
    height: auto !important;
    min-height: 42px !important;
    transition: all 0.3s ease !important;
    background-color: #fff !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

.select2-container--default .select2-selection--single:hover {
    border-color: #86b7fe !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
    outline: none !important;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 28px !important;
    padding-left: 8px !important;
    color: #495057 !important;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px !important;
    right: 8px !important;
}

.select2-dropdown {
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    overflow: hidden !important;
    margin-top: 4px !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 2px solid #e9ecef !important;
    border-radius: 12px !important;
    padding: 8px 12px !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--primary-blue) !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15) !important;
}

.select2-results__option {
    padding: 10px 12px !important;
    transition: all 0.2s ease !important;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #e7f1ff !important;
    color: #0d6efd !important;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #0d6efd !important;
    color: #fff !important;
}

/* 美化标签 */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.results-section {
    margin-top: 3rem;
    max-width: 1200px; /* 限制最大宽度，与主内容区同宽 */
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    color: var(--text-dark);
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.select2-container {
    width: 100% !important;
}

.select2-container .select2-selection--single {
    height: 38px;
    border: 1px solid #ced4da;
    border-radius: 12px;
    background-color: #fff;
    transition: all 0.2s ease;
    padding: 0 8px;
}

.select2-container--default .select2-selection--single:hover,
.select2-container--default.select2-container--focus .select2-selection--single {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 36px;
    padding-left: 8px;
    color: #495057;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 36px;
    right: 8px;
}

.select2-container--default .select2-selection--single .select2-selection__placeholder {
    color: #6c757d;
}

.select2-dropdown {
    border: 1px solid #ced4da;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.select2-search--dropdown {
    padding: 8px;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    border: 1px solid #ced4da;
    border-radius: 12px;
    padding: 6px 12px;
    outline: none;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

.select2-results__option {
    padding: 8px 12px;
    transition: all 0.2s ease;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #0d6efd;
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] .select2-node-icon {
    border-color: rgba(255, 255, 255, 0.5);
}

.select2-results__option:hover {
    background-color: #e7f1ff;
    color: #0d6efd;
}

.result-card {
    background: var(--bg-white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: var(--transition);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    transform: scaleX(0);
    transition: var(--transition);
}

.result-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.result-card:hover::before {
    transform: scaleX(1);
}

.route-info {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.route-arrow {
    margin: 0 15px;
    color: #6c757d;
    font-size: 20px;
}

.route-stats {
    display: flex;
    justify-content: space-between;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #0d6efd;
}

.stat-label {
    font-size: 12px;
    color: #6c757d;
}

/* 美化标签页 - 现代化设计 */
.nav-tabs {
    border: none;
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.9), rgba(240, 242, 245, 0.9));
    padding: 1rem 1.25rem;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    min-height: 80px;
    align-items: center;
    list-style: none;
    padding-left: 0;
    margin-left: 0;
}

.nav-tabs ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-tabs li {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-tabs li::before {
    content: none;
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-dark);
    padding: 0.875rem 1.5rem;
    border-radius: 16px;
    margin-right: 0;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: transparent;
    border: 2px solid transparent;
    font-size: 0.9rem;
    min-width: 120px;
    text-align: center;
    z-index: 1;
    white-space: nowrap;
    flex-shrink: 0;
    text-decoration: none;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus,
.nav-tabs .nav-link:visited {
    text-decoration: none;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-blue);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
    background: rgba(0, 102, 204, 0.05);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-white);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(0, 123, 255, 0.35);
    border: 2px solid transparent;
}

/* 添加图标的动画效果 */
.nav-tabs .nav-link i {
    transition: transform 0.3s ease;
    margin-right: 0.5rem;
}

.nav-tabs .nav-link:hover i {
    transform: scale(1.1);
}

.nav-tabs .nav-link.active i {
    transform: scale(1.1);
}

/* Tab内容区域样式 */
.tab-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    height: auto;
    min-height: 0;
    margin-bottom: 2rem;
}

/* 为空tab内容移除多余的空白 */
.tab-pane:empty {
    display: none;
}

/* 确保结果容器在有内容时正确显示 */
#delayResults:empty,
#priceResults:empty,
#nodeResults:empty {
    padding: 0;
    min-height: 0;
}

#delayResults:not(:empty),
#priceResults:not(:empty),
#nodeResults:not(:empty) {
    padding: 0;
}

/* 移除空内容时的占位高度，避免不必要的空白 */

.tab-pane {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    transform: translateY(5px);
    height: auto;
    min-height: 0;
}

.tab-pane.show,
.tab-pane.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    height: auto;
}

/* 结果展示样式 */
.route-results {
    animation: fadeInUp 0.5s ease;
}

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

/* 加载状态样式 */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--primary-blue);
    font-size: 1.1rem;
}

.loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
}

/* 错误信息样式 */
.error-message {
    text-align: center;
    padding: 2rem;
    color: #dc3545;
    background: rgba(220, 53, 69, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.search-btn {
    height: 48px;
    padding: 0 2rem;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-white);
    transition: var(--transition);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.search-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;
}

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

.search-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.node-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-bottom: 8px;
    padding: 4px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
}

.route-path {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 100px;
}

.route-segment {
    flex: 1;
    padding: 0 10px;
}

.segment-info {
    position: relative;
    height: 2px;
    background: #e9ecef;
}

.route-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #007bff;
}

.route-type {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
    z-index: 1;
}

.route-price {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #495057;
    white-space: nowrap;
}

.route-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.route-providers {
    display: flex;
    align-items: center;
    gap: 8px;
}

.provider-label {
    color: #6c757d;
    font-size: 0.9rem;
}

.provider-value {
    color: #0d6efd;
    font-weight: 500;
    font-size: 0.9rem;
}

.route-totals {
    display: flex;
    gap: 20px;
}

.total-info {
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 6px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.total-info.highlight {
    background: transparent;
    box-shadow: none;
}

.total-info strong {
    font-size: 1.1rem;
    font-weight: 600;
}

.total-info strong.highlight {
    font-size: 1.2rem;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.delay-info.highlight strong {
    color: #198754;  /* 绿色，表示延迟优先 */
}

.price-info.highlight strong {
    color: #dc3545;  /* 红色，表示价格优先 */
}

.server-specs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 10px 0;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #495057;
    font-size: 0.9rem;
}

.spec-item i {
    color: #6c757d;
    width: 16px;
    text-align: center;
}

.server-price {
    font-size: 1.25rem;
    font-weight: 600;
    color: #dc3545;
    text-align: center;
    margin: 5px 0;
    padding: 0;
    line-height: 1.2;
}

.card {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: var(--bg-white);
    margin-bottom: 2rem;
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.card-body {
    padding: 20px 20px 5px;
}

.card-title {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
    padding: 10px 15px;
    border-radius: 8px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.card-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #007bff;
    border-radius: 2px;
}

.card-footer {
    background: none;
    border-top: 1px solid #e9ecef;
    padding: 8px 15px;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    color: var(--text-white);
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}


/* 节点图标样式 */
.select2-node {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
}

.select2-node-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e9ecef;
    flex-shrink: 0;
}

/* 自定义搜索下拉框样式 */
.custom-select-container,
.search-box .custom-select-container {
    position: relative !important;
    width: 100% !important;
    z-index: 9998 !important;
}

.node-search-input,
.search-box .node-search-input {
    width: 100% !important;
    padding-right: 2.5rem !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
}

/* 使用更高的特异性来确保样式生效，覆盖FontAwesome默认样式 */
.custom-select-container .select-arrow.fas,
.custom-select-container .select-arrow.fa-chevron-down,
.search-box .custom-select-container .select-arrow.fas,
.search-box .custom-select-container .select-arrow.fa-chevron-down {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #6c757d !important;
    transition: transform 0.3s ease !important;
    z-index: 3 !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    width: 16px !important;
    height: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    left: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12px !important;
    line-height: 1 !important;
    text-align: center !important;
    font-weight: 900 !important;
    font-family: "Font Awesome 6 Free" !important;
    -webkit-font-smoothing: antialiased !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
}

/* 额外的覆盖规则确保箭头位置正确 */
.custom-select-container > .select-arrow,
.search-box .custom-select-container > .select-arrow {
    position: absolute !important;
    right: 0.75rem !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    left: auto !important;
    margin: 0 !important;
    float: none !important;
}

.custom-select-container.open .select-arrow,
.search-box .custom-select-container.open .select-arrow {
    transform: translateY(-50%) rotate(180deg) !important;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    max-height: 300px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
}

.select-dropdown.show {
    display: block;
}

.select-dropdown-item {
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.select-dropdown-item:hover {
    background-color: #f8f9fa;
    border-left-color: var(--primary-blue);
}

.select-dropdown-item:hover .node-format {
    color: var(--primary-blue);
}

.select-dropdown-item.selected {
    background-color: #e7f1ff;
    border-left-color: var(--primary-blue);
}

.select-dropdown-item.selected .node-format {
    color: var(--primary-blue);
    font-weight: 600;
}

.select-dropdown-item.no-results {
    color: #6c757d;
    font-style: italic;
    cursor: default;
    padding: 1rem;
    text-align: center;
}

.select-dropdown-item.no-results:hover {
    background-color: transparent;
    border-left-color: transparent;
    color: #6c757d;
}

/* 下拉选项内容结构 */
.dropdown-item-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    width: 100%;
}

.dropdown-item-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-item-icon img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e9ecef;
    transition: var(--transition);
}

.select-dropdown-item:hover .dropdown-item-icon img {
    border-color: var(--primary-blue);
    transform: scale(1.1);
}

.dropdown-item-text {
    flex: 1;
    min-width: 0;
}

.node-format {
    font-size: 0.9rem;
    color: var(--text-dark);
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 响应式样式 */
@media (max-width: 768px) {
    .select-dropdown {
        max-height: 200px;
    }

    .dropdown-item-content {
        padding: 0.6rem 0.8rem;
        gap: 0.5rem;
    }

    .dropdown-item-icon {
        width: 20px;
        height: 20px;
    }

    .dropdown-item-icon img {
        width: 16px;
        height: 16px;
    }

    .node-format {
        font-size: 0.85rem;
    }

    /* 卡片响应式 */
    .route-list {
        gap: 1rem;
    }

    
    .route-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .route-path {
        flex-direction: column;
        gap: 1rem;
        height: auto;
    }

    .path-connection {
        width: 2px;
        height: 40px;
    }

    .connection-line {
        width: 2px;
        height: 100%;
        background: linear-gradient(180deg, var(--accent-green), var(--primary-blue), var(--secondary-blue));
    }

    .path-connection .connection-pulse {
        top: -10px;
        left: -3px;
        width: 6px;
        height: 6px;
        animation: pulse-vertical 2s linear infinite;
    }

    @keyframes pulse-vertical {
        0% { top: -10px; }
        100% { top: calc(100% + 10px); }
    }

    .path-connection .connection-info {
        top: auto;
        left: -60px;
        top: 50%;
        transform: translateY(-50%);
        flex-direction: column;
        gap: 0.25rem;
        width: auto;
    }

    .path-connection .connection-info .latency-info {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }

    .path-connection .connection-price-tag {
        bottom: auto;
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        margin-top: 0.5rem;
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
    }

    .path-connection .connection-type-label {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        font-weight: 600;
        background: rgba(255, 102, 0, 0.1);
        color: #ff6600;
        border-radius: 8px;
        white-space: nowrap;
        text-align: center;
        line-height: 1.2;
        z-index: 100;
    }

    .route-metrics {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .metric-item.action-button {
        padding: 0.75rem 0.5rem;
        text-align: center;
        justify-content: center;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .metric-item.action-button i {
        font-size: 1rem;
        width: 20px;
        text-align: center;
    }

    .route-card-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
}


.servers-section {
    display: none;
    background: var(--bg-white);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    margin-top: 3rem;
    border: 1px solid var(--border-light);
}

.servers-section h3 {
    color: var(--text-dark);
    font-size: 2rem;
    margin-bottom: 2.5rem;
    font-weight: 700;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.routes-wrapper {
    margin-bottom: 20px;
}

.result-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}


/* 云主机套餐卡片样式 */
.servers-section .card {
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.servers-section .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.servers-section .card-title {
    background: linear-gradient(135deg, #f1f3f5 0%, #e9ecef 100%);
}

.servers-section .server-specs {
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin: 15px 0;
}

.servers-section .spec-item {
    padding: 4px 8px;
    border-radius: 4px;
    background: #ffffff;
    margin-bottom: 5px;
}

.servers-section .server-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #dc3545;
    text-align: center;
    margin: 15px 0 10px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.servers-section .card-footer {
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
    padding: 15px;
}


/* 中转次数选择器样式 */
.hop-limit-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hop-limit-container label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0;
    white-space: nowrap;
}

.hop-limit-container select {
    flex: 1;
    min-width: 80px;
}

/* 确保所有下拉框样式统一 */
.form-select {
    border-radius: 0.375rem;
    border: 1px solid #ced4da;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    background-color: #fff;
    height: calc(1.5em + 0.75rem + 2px);
}

/* 调整搜索区块的间距 */
.search-container .row > div {
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .search-container .row > div {
        margin-bottom: 0;
    }
}

/* 添加手机端响应式样式 */
@media (max-width: 768px) {
    .nav-tabs {
        min-height: auto;
        padding: 1rem;
        gap: 0.5rem;
    }

    .tab-content {
        margin-bottom: 2rem;
    }

    .nav-tabs .nav-link {
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
        min-width: 110px;
    }

    .node-icon {
        width: 32px;
        height: 32px;
        margin-bottom: 4px;
    }

    .node-name {
        font-size: 0.85rem;
    }

    .node .node-price,
    .route-type,
    .route-price {
        display: none;
    }

    .route-providers {
        display: none;
    }
    
    .route-segment {
        padding: 0 5px;
    }
    
    .segment-info {
        height: 1px;
    }
    .route-line {
        height: 1px;
    }
    
    .route-path {
        margin-bottom: 10px;
    }
    
    .node {
        min-width: 60px;
    }

    /* 隐藏备案号和技术支持信息 */
    .footer-links {
        display: none;
    }

    /* 调整版权信息样式 */
    .footer-content {
        justify-content: center;
    }

    /* 总时延和总价格换行显示 */
    .route-totals {
        display: flex;
        justify-content: space-between;
        width: 100%;
        gap: 0;
    }

    .total-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 4px 10px;
        width: 50%;
    }

    .total-info strong {
        display: block;
        margin-top: 2px;
    }
    
    /* 搜索框响应式样式 */
    .search-box {
        padding: 1.5rem;
        margin-top: -30px;
    }

    .search-box .search-row {
        flex-direction: column;
        gap: 1.2rem;
        align-items: center;
        text-align: center;
    }

    .search-box .search-group {
        width: 100%;
        min-width: auto;
        max-width: none;
        max-width: 400px;
    }

    .search-box .row {
        flex-wrap: wrap;
    }

    .search-box .col-md-4,
    .search-box .col-md-2 {
        width: 100%;
        margin-bottom: 1rem;
        padding: 0 0.25rem;
    }

    .search-box .btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}

/* 平板设备响应式样式 */
@media (max-width: 992px) and (min-width: 769px) {
    .nav-tabs {
        min-height: 70px;
        padding: 0.875rem 1rem;
        gap: 0.625rem;
    }

    .tab-content {
        margin-bottom: 2.5rem;
    }

    .nav-tabs .nav-link {
        padding: 0.825rem 1.375rem;
        font-size: 0.875rem;
        min-width: 115px;
    }

    .search-box {
        padding: 2rem;
    }

    .search-box .search-row {
        justify-content: center;
        max-width: 800px;
        margin: 0 auto;
        gap: 1.2rem;
    }

    .search-box .search-group.select-group {
        flex: 2;
        min-width: 200px;
    }

    .search-box .search-group.button-group {
        flex: 1;
        min-width: 100px;
        max-width: 120px;
    }

    .search-box .col-md-4 {
        flex: 0 0 auto;
        width: 35%;
    }

    .search-box .col-md-2 {
        flex: 0 0 auto;
        width: 15%;
    }
}

/* 节点价格表格样式 */
#nodeTab .card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
}

#nodeTab .table {
    margin-bottom: 0;
}

#nodeTab .table th {
    font-weight: 600;
    color: #495057;
    border-bottom-width: 1px;
}

#nodeTab .table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

#nodeTab .badge {
    font-weight: 500;
    font-size: 0.875rem;
}

#nodeTab .table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.03);
}

/* 美化分页控件 */
.pagination {
    margin-top: 2rem;
}

.pagination .page-link {
    border: none;
    margin: 0 2px;
    border-radius: 8px;
    color: var(--primary-blue);
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,123,255,0.2);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    border: none;
    box-shadow: var(--shadow);
}

.pagination .page-item.disabled .page-link {
    background-color: #f8f9fa;
    color: #6c757d;
    border: none;
}








/* 无结果提示样式 */
.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.1);
    border: 1px solid rgba(0, 102, 204, 0.1);
    margin: 2rem 0;
}

.no-results-icon {
    font-size: 4rem;
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    opacity: 0.7;
}

.no-results h3 {
    color: var(--text-dark);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.no-results p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

.suggestions {
    background: rgba(0, 102, 204, 0.05);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.suggestions h4 {
    color: var(--primary-blue);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.suggestions li {
    padding: 0.5rem 0;
    color: var(--text-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.suggestions li i {
    color: var(--primary-blue);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

/* 错误消息样式 */
.error-message {
    text-align: center;
    padding: 2rem;
    background: rgba(220, 53, 69, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(220, 53, 69, 0.2);
    margin: 2rem 0;
}

.error-message i {
    font-size: 3rem;
    color: #dc3545;
    margin-bottom: 1rem;
    display: block;
}

.error-message h3 {
    color: #dc3545;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.error-message p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0;
}
