/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 页面基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* 标题样式 */
h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 2rem;
    font-weight: 400;
}

/* 加载动画样式 */
.loading {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e3e3e3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 主内容区域 */
.content {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #e1e8ed;
}

/* 信息表格样式 */
.info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.info-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.info-table tr:last-child {
    border-bottom: none;
}

.info-table tr:nth-child(even) {
    background-color: #fafbfc;
}

.info-table tr:hover {
    background-color: #f8f9fa;
}

.info-table td {
    padding: 12px 16px;
    vertical-align: top;
}

/* 标签列样式 */
.label {
    font-weight: 600;
    color: #586069;
    width: 120px;
    background-color: #f6f8fa;
    border-right: 1px solid #e1e8ed;
    text-align: left;
    white-space: nowrap;
}

/* 值列样式 */
.value {
    color: #24292e;
    word-break: break-all;
    line-height: 1.5;
}

.value a {
    color: #0366d6;
    text-decoration: none;
}

.value a:hover {
    text-decoration: underline;
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 2px 6px;
    margin: 1px 2px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
    color: white;
    text-align: center;
    white-space: nowrap;
}

/* 不同颜色的标签 */
.tag.baidu { 
    background-color: #2196F3; 
}

.tag.maxmind { 
    background-color: #4CAF50; 
}

.tag.纯真 { 
    background-color: #FF9800; 
}

.tag.ip2c { 
    background-color: #9C27B0; 
}

.tag.maxmind-country { 
    background-color: #607D8B; 
}

.tag.netstack { 
    background-color: #795548; 
}

.tag.ipip { 
    background-color: #E91E63; 
}

.tag.cloudflare { 
    background-color: #F44336; 
}

.tag.ip2location { 
    background-color: #3F51B5; 
}

.tag.直连 { 
    background-color: #2196F3; 
}

/* 国旗图标 */
.flag-emoji {
    margin-right: 6px;
    font-size: 16px;
}

/* IP情报网格布局 */
.intelligence-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
    font-size: 12px;
    color: #666;
}

.intelligence-item {
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #e1e8ed;
}

/* 延迟测试网格 */
.latency-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
}

.latency-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    background-color: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #e1e8ed;
}

.latency-value {
    font-weight: 600;
    color: #28a745;
}

/* CDN节点网格 */
.cdn-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
}

.cdn-item {
    padding: 4px 8px;
    background-color: #f8f9fa;
    border-radius: 3px;
    border: 1px solid #e1e8ed;
}

/* 工具区域样式 */
.tools-section {
    padding: 16px 20px;
    background-color: #f6f8fa;
    border-top: 1px solid #e1e8ed;
}

.tools-section h3 {
    margin-bottom: 10px;
    color: #586069;
    font-size: 14px;
    font-weight: 600;
}

.tools-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-link {
    color: #0366d6;
    text-decoration: none;
    font-size: 13px;
}

.tool-link:hover {
    text-decoration: underline;
}

.separator {
    color: #d1d5da;
    font-size: 13px;
}

/* 错误提示样式 */
.error {
    text-align: center;
    padding: 3rem;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin-top: 2rem;
}

.error button {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 1rem;
}

.error button:hover {
    background-color: #c82333;
}

/* TLS指纹信息样式 */
.tls-info {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 11px;
    line-height: 1.4;
    color: #586069;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    .info-table td {
        padding: 10px 12px;
    }
    
    .label {
        width: 90px;
        font-size: 13px;
    }
    
    .value {
        font-size: 13px;
    }
    
    .intelligence-grid {
        grid-template-columns: 1fr;
    }
    
    .latency-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cdn-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .info-table td {
        padding: 8px 10px;
    }
    
    .label {
        width: 80px;
        font-size: 12px;
    }
    
    .value {
        font-size: 12px;
    }
    
    .tag {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .latency-grid {
        grid-template-columns: 1fr;
    }
}