/* IPMap检测页面样式 */
.ipmap-container {
    width: 1200px;
    margin: 0 auto;
    /* padding: 20px 0; */
}

/* 搜索区域 */
.search-section {
    background: #fff;
    border-radius: 8px;
    padding: 20px 25px;
    margin-bottom: 15px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.search-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.search-label {
    background: linear-gradient(135deg, #1b8efc, #0d6efd);
    color: #fff;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.search-input {
    flex: 1;
    height: 40px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 15px;
    font-size: 14px;
}

.search-input::placeholder {
    color: #999;
}

.search-btn {
    background: linear-gradient(135deg, #1b8efc, #0d6efd);
    color: #fff;
    border: none;
    padding: 8px 25px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(27, 142, 252, 0.3);
    transition: all 0.3s ease;
}

.search-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 10px rgba(27, 142, 252, 0.4);
    transform: translateY(-1px);
}

.clear-btn {
    background: linear-gradient(135deg, #ff894d, #f97316);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
    transition: all 0.3s ease;
}

.clear-btn:hover {
    opacity: 0.9;
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
    transform: translateY(-1px);
}

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

.btn-copy {
    background: #fff;
    color: #1b8efc;
    border: 1px solid #1b8efc;
    box-shadow: 0 2px 6px rgba(27, 142, 252, 0.15);
}

.btn-copy:hover {
    box-shadow: 0 4px 10px rgba(27, 142, 252, 0.25);
    transform: translateY(-1px);
}

.btn-export {
    background: linear-gradient(135deg, #ff894d, #f97316);
    color: #fff;
    border: none;
    box-shadow: 0 2px 6px rgba(249, 115, 22, 0.3);
}

.btn-export:hover {
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.4);
    transform: translateY(-1px);
}

.action-buttons {
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* gap: 12px; */
    margin-top: 15px;
}

.search-tips {
    display: flex;
    gap: 30px;
    font-size: 12px;
    color: #666;
}

.search-tips span {
    color: #1b8efc;
}

.info-tips {
    display: flex;
    align-items: center;
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

.info-tips i {
    color: #ffc107;
}

/* 统计卡片区域 */
.stats-section {
    display: grid;
    /* 变成3个 */

    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin: 15px 0;
}

.stats-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stats-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.stats-card-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.stats-card-value {
    font-size: 28px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.stats-card-sub {
    font-size: 12px;
    color: #999;
}

.stats-card.blue .stats-card-value {
    color: #1b8efc;
}

.stats-card.purple .stats-card-value {
    color: #a855f7;
}

.stats-card.orange .stats-card-value {
    color: #f97316;
}

.stats-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.stats-card.blue .stats-card-icon {
    background: rgba(27, 142, 252, 0.1);
    color: #1b8efc;
}

.stats-card.purple .stats-card-icon {
    background: rgba(168, 85, 247, 0.1);
    color: #a855f7;
}

.stats-card.orange .stats-card-icon {
    background: rgba(249, 115, 22, 0.1);
    color: #f97316;
}

/* 主要内容区域 */
/* .main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 15px;
} */

/* 在线IP列表 */
.ip-list-section {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.section-title::before {
    content: '';
    width: 4px;
    height: 16px;
    background: #1b8efc;
    border-radius: 2px;
}

.view-toggle {
    display: flex;
    gap: 0;
}

.view-btn {
    padding: 6px 16px;
    border: 1px solid #dcdfe6;
    background: #fff;
    font-size: 13px;
    cursor: pointer;
}

.view-btn:first-child {
    border-radius: 4px 0 0 4px;
}

.view-btn:last-child {
    border-radius: 0 4px 4px 0;
}

.view-btn.active {
    background: #1b8efc;
    color: #fff;
    border-color: #1b8efc;
}

/* 网段标签 */
.segment-tabs {
    display: flex;
    padding: 15px 20px;
    gap: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.segment-tab {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    padding: 5px 0;
    position: relative;
}

.segment-tab.active {
    color: #1b8efc;
}

.segment-tab.active::after {
    content: '';
    position: absolute;
    bottom: -16px;
    left: 0;
    right: 0;
    height: 2px;
    background: #1b8efc;
}

.segment-tab span {
    background: rgba(27, 142, 252, 0.1);
    color: #1b8efc;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 5px;
}

/* IP列表内容 */
.ip-list-content {
    padding: 15px 20px;
    max-height: 450px;
    overflow-y: auto;
}

.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
}

.ip-item {
    padding: 10px 15px;
    /* background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px; */
    font-size: 13px;
    /* font-family: 'Courier New', monospace; */
    color: #495057;
    text-align: center;
    cursor: pointer;
    /* transition: all 0.3s ease; */
    /* border: 1px solid #e9ecef; */
    position: relative;
    overflow: hidden;
}

/* .ip-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 3px;
    height: 100%;
    background: #1b8efc;
    opacity: 0;
    transition: opacity 0.3s ease;
} */

/* .ip-item:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    color: #1b8efc;
    border-color: #90caf9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(27, 142, 252, 0.2);
} */

/* .ip-item:hover::before {
    opacity: 1;
} */

/* 右侧图表区域 */
.charts-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.chart-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chart-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.chart-container {
    height: 200px;
}

/* 网段分布统计 */
.distribution-section {
    margin-top: 15px;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.06);
}

.distribution-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.distribution-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 15px;
}

.distribution-label {
    width: 100px;
    font-size: 13px;
    color: #666;
}

.distribution-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.distribution-fill {
    height: 100%;
    border-radius: 4px;
}

.distribution-fill.blue {
    background: linear-gradient(90deg, #1b8efc, #0d6efd);
}

.distribution-fill.green {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.distribution-fill.yellow {
    background: linear-gradient(90deg, #eab308, #ca8a04);
}

.distribution-fill.purple {
    background: linear-gradient(90deg, #a855f7, #9333ea);
}

.distribution-value {
    width: 40px;
    text-align: right;
    font-size: 13px;
    color: #333;
    font-weight: 500;
}

/* 加载弹窗 */
.loading-modal {
    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;
}

.loading-content {
    background: #fff;
    border-radius: 8px;
    padding: 30px 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.loading-content .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top-color: #1b8efc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f0f0f0;
    border-top-color: #1b8efc;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 13px;
    color: #999;
}

/* 提示弹窗 */
.alert-modal {
    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;
}

.alert-content {
    background: #fff;
    border-radius: 8px;
    width: 400px;
    overflow: hidden;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.alert-icon {
    color: #ffc107;
}

.alert-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.alert-body {
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.alert-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
}

.alert-btn {
    padding: 8px 20px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
}

.alert-btn.cancel {
    background: #fff;
    border: 1px solid #dcdfe6;
    color: #666;
}

.alert-btn.confirm {
    background: #1b8efc;
    border: none;
    color: #fff;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #ddd;
}

.empty-text {
    font-size: 14px;
}

/* 隐藏状态 */
.hidden {
    display: none !important;
}

/* ipMap.css */
.ipmap-container {
    /* 确保容器有背景，防止透明导致的视觉混乱 */
    background: #fff;
    /* padding: 20px; */
    border-radius: 8px;
    /* margin-top: 15px; */
}

/* 加载占位符样式 - 确保它是居中的 */
.loading-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px; /* 给一个最小高度 */
    color: #999;
}

/* IP 网格布局优化 */
.ip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    padding: 10px 0;
    max-height: 400px; /* 限制高度，出现滚动条 */
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 10px;
}

.ip-item {
    /* background: #f8f9fa;
    border: 1px solid #dee2e6; */
    /* border-radius: 4px; */
    padding: 8px 12px;
    text-align: center;
    font-size: 14px;
    /* transition: background 0.2s; */
}

/* .ip-item:hover {
    background: #e9ecef;
    cursor: default;
} */

/* 空状态美化 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.5;
}