/* ChatGPT风格黑白现代化全宽设计 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    background-color: #ffffff;
    color: #2d333a;
    line-height: 1.7;
    font-size: 14px;
    min-height: 100vh;
}

.container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* 头部样式 - ChatGPT风格 */
.header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem 0;
    text-align: center;
    width: 100%;
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
}

.header p {
    font-size: 1rem;
    color: #6b7280;
    font-weight: 400;
}

/* CDN提供商卡片 - 全宽设计 */
.cdn-providers {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 2rem;
    width: 100%;
}

.cdn-providers h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #111827;
    text-align: center;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.provider-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.provider-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.provider-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #111827;
}

.domain {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: #f9fafb;
    color: #374151;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.875rem;
    border: 1px solid #e5e7eb;
    display: inline-block;
}

/* 测试文件样式 - 紧凑布局 */
.test-files {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem 2rem;
    width: 100%;
}

.test-files h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #111827;
    text-align: center;
}

.files-grid {
    display: grid;
    gap: 0.75rem;
    max-width: 900px;
    margin: 0 auto;
}

/* 访问说明样式 - 紧凑版 */
.access-info {
    max-width: 900px;
    margin: 0 auto 1.5rem auto;
    padding: 1rem;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 6px;
    border-left: 4px solid #0284c7;
}

.access-notice {
    margin: 0 0 0.75rem 0;
    font-size: 0.8125rem;
    color: #0c4a6e;
    line-height: 1.5;
}

.access-examples {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.access-example {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.example-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #0c4a6e;
    min-width: 50px;
}

.example-url {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: #ffffff;
    color: #1e40af;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #bfdbfe;
    font-size: 0.75rem;
    word-break: break-all;
    flex: 1;
    min-width: 180px;
}

.example-url:hover {
    background: #f8fafc;
    border-color: #93c5fd;
}

.file-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: all 0.15s ease;
}

.file-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.file-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.file-name {
    font-weight: 500;
    color: #111827;
    font-size: 0.8125rem;
}

.file-size {
    font-size: 0.6875rem;
    color: #6b7280;
}

.copy-btn {
    background: #111827;
    color: #ffffff;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.75rem;
    transition: all 0.15s ease;
}

.copy-btn:hover {
    background: #374151;
}

.copy-btn:active {
    background: #4b5563;
}

/* 技术说明样式 - 紧凑布局 */
.tech-info {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 2rem 2rem;
    width: 100%;
}

.tech-info h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #111827;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.formula-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    transition: all 0.15s ease;
}

.formula-card:hover {
    border-color: #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.formula-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.formula {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    text-align: center;
}

.formula code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #1f2937;
    background: none;
}

.formula-detail {
    font-size: 0.8125rem;
    color: #6b7280;
    line-height: 1.5;
}

.formula-detail p {
    margin-bottom: 0.375rem;
}

.formula-detail code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: #f3f4f6;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    font-size: 0.75rem;
    color: #374151;
}

.cache-info {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 1rem;
    grid-column: 1 / -1;
}

.cache-info h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #111827;
}

.cache-detail {
    display: grid;
    gap: 0.75rem;
}

.cache-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 4px;
    border: 1px solid #f3f4f6;
}

.cache-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.8125rem;
}

.cache-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    color: #111827;
    font-size: 0.8125rem;
}

.cache-note {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 4px;
    border-left: 3px solid #3b82f6;
}

.cache-note p {
    font-size: 0.8125rem;
    color: #1e40af;
    line-height: 1.5;
    margin: 0;
}

.cache-note strong {
    font-weight: 600;
}

.cache-note code {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    background: #dbeafe;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
    font-size: 0.75rem;
    color: #1e3a8a;
}

/* 测试控制按钮 - 全宽居中 */
.test-controls {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    text-align: center;
    padding: 3rem 2rem;
    width: 100%;
}

.start-btn, .reset-btn {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    margin: 0 0.5rem;
    transition: all 0.15s ease;
    min-width: 120px;
}

.start-btn {
    background: #111827;
    color: #ffffff;
}

.start-btn:hover:not(:disabled) {
    background: #374151;
}

.reset-btn {
    background: #ffffff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.reset-btn:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #9ca3af;
}

.start-btn:disabled, .reset-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 测试进度 - 全宽 */
.test-progress {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 2rem;
    width: 100%;
}

.test-progress h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #111827;
    text-align: center;
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    flex: 1;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #111827;
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    font-weight: 600;
    font-size: 0.875rem;
    min-width: 50px;
    color: #111827;
    text-align: right;
}

.current-test {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    max-width: 600px;
    margin: 0 auto;
}

/* 实时结果 - 全宽 */
.live-results {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 2rem;
    width: 100%;
}

.live-results h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #111827;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.result-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.15s ease;
}

.result-card.testing {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 0 0 1px #f59e0b;
}

.result-card.completed {
    border-color: #10b981;
    background: #f0fdf4;
    box-shadow: 0 0 0 1px #10b981;
}

.result-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #111827;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.metric:last-child {
    border-bottom: none;
}

.metric-label {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.metric-value {
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.875rem;
    color: #111827;
}

.metric-value.good {
    color: #059669;
}

.metric-value.average {
    color: #d97706;
}

.metric-value.poor {
    color: #dc2626;
}

/* 协议信息样式 */
.protocol-info {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.protocol-badge, .tls-badge {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}

.protocol-label, .tls-label {
    font-weight: 500;
    color: #6b7280;
}

.protocol-value, .tls-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    border-radius: 3px;
    font-size: 0.75rem;
}

/* HTTP 协议版本颜色 */
.protocol-http3 {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.protocol-http2 {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.protocol-http1 {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
}

/* TLS 版本颜色 */
.tls-v13 {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.tls-v12 {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.tls-old {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* 表格中的协议信息 */
.protocol-cell {
    min-width: 120px;
}

.protocol-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.protocol-compact, .tls-compact {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    text-align: center;
}

.protocol-compact {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.tls-compact {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #dbeafe;
}

/* 图表样式 - 全宽 */
.charts-section {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 2rem;
    width: 100%;
}

.charts-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #111827;
    text-align: center;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.chart-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 2rem;
}

.chart-container h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: #111827;
    text-align: center;
}

.chart-container canvas {
    max-height: 350px;
    width: 100%;
}

/* 详细结果表格 - 全宽 */
.detailed-results {
    background: #f9fafb;
    padding: 3rem 2rem;
    width: 100%;
}

.detailed-results h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: #111827;
    text-align: center;
}

.table-container {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    max-width: 1400px;
    margin: 0 auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.875rem;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: #111827;
}

tr:hover {
    background: #f9fafb;
}

tr:last-child td {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header, .cdn-providers, .test-files, .tech-info, .test-controls, 
    .test-progress, .live-results, .charts-section, .detailed-results {
        padding: 1.5rem 1rem;
    }
    
    .header h1 {
        font-size: 1.75rem;
    }
    
    .providers-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .test-controls {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .start-btn, .reset-btn {
        margin: 0;
        width: 100%;
        max-width: 300px;
    }
    
    .progress-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .progress-text {
        text-align: center;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .cache-info {
        grid-column: 1;
    }
    
    /* 访问说明移动端样式 */
    .access-info {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .access-example {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
    
    .example-label {
        min-width: auto;
    }
    
    .example-url {
        width: 100%;
        min-width: auto;
        font-size: 0.6875rem;
        padding: 0.5rem;
        word-break: break-all;
    }
    
    /* 技术说明移动端优化 */
    .formula-card {
        padding: 0.75rem;
    }
    
    .formula-card h3 {
        font-size: 0.9375rem;
    }
    
    .formula {
        padding: 0.5rem;
    }
    
    .formula code {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        padding: 1rem;
    }
    
    th, td {
        padding: 0.75rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .provider-card, .file-card, .result-card {
        padding: 1rem;
    }
}