/* IPv6测试页面样式 */
.ipv6-test-page {
    max-width: 1000px;
    margin: 40px auto 60px;
    padding: 0 20px;
    position: relative;
}

/* ========================================
   右侧目录导航
   ======================================== */
.page-toc {
    position: fixed;
    top: 120px;
    right: 20px;
    width: 200px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 100;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
}

.toc-header {
    padding: 16px;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #e8e8e8;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.toc-nav {
    padding: 8px 0;
}

.toc-link {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.toc-link:hover {
    color: #2c3e50;
    background: #f8f9fa;
    text-decoration: none;
}

.toc-link.active {
    color: #2196f3;
    background: #e3f2fd;
    border-left-color: #2196f3;
    font-weight: 600;
}

/* 隐藏滚动条但保持功能 */
.page-toc::-webkit-scrollbar {
    width: 4px;
}

.page-toc::-webkit-scrollbar-track {
    background: transparent;
}

.page-toc::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 2px;
}

.page-toc::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

/* 宽屏幕隐藏目录（内容区域太窄） */
@media (max-width: 1280px) {
    .page-toc {
        display: none;
    }
}

/* 性能优化建议 - 默认单列布局，适配所有屏幕 */

/* 页面标题 */
.page-header {
    text-align: center;
    margin-bottom: 40px;
}

.header-icon {
    width: 56px;
    height: 56px;
    color: #2c3e50;
    margin-bottom: 16px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.page-header p {
    font-size: 16px;
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* 测试卡片 */
.test-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.test-status {
    text-align: center;
    padding: 40px 0;
}

.status-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    color: #3b82f6;
}

.status-icon.error {
    color: #ef4444;
}

.test-status h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
}

.test-status p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* 结果网格 */
.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.ip-card {
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
}

.ip-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.ip-card-header svg {
    width: 24px;
    height: 24px;
    color: #2c3e50;
}

.ip-card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.ip-status {
    margin-bottom: 16px;
}

.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.status-badge.loading {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.success {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.error {
    background: #fee2e2;
    color: #991b1b;
}

.ip-address {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    word-break: break-all;
    font-family: 'Courier New', Consolas, monospace;
}

.ip-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    font-size: 13px;
    gap: 12px; /* label和值之间的间距 */
}

.detail-item label {
    color: #666;
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 105px; /* 确保label最小宽度，让右侧值对齐 */
    flex-shrink: 0; /* 防止label被压缩 */
}

.detail-item span {
    color: #2c3e50;
    font-weight: 600;
    flex: 1; /* 让值占据剩余空间，但不会被推到最右边 */
}

/* 延迟帮助图标 */
.latency-help {
    display: inline-flex;
    align-items: center;
    cursor: help;
    color: #999;
    transition: color 0.2s;
    position: relative;
}

.latency-help:hover {
    color: #2c3e50;
}

.latency-help svg {
    vertical-align: middle;
}

/* 自定义tooltip */
.latency-help::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background: #2c3e50;
    color: #fff;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 1.6;
    white-space: normal;
    width: 300px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    font-weight: 400;
}

/* tooltip箭头 */
.latency-help::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(0);
    border: 6px solid transparent;
    border-top-color: #2c3e50;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.latency-help:hover::after,
.latency-help:hover::before {
    opacity: 1;
    transform: translateX(-50%) translateY(-4px);
}

.latency-help:hover::before {
    transform: translateX(-50%) translateY(2px);
}

/* 连接摘要 */
.connection-summary {
    background: #fffbf0;
    border: 1px solid #ffe9a8;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.connection-summary h4 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px 0;
}

.connection-summary p {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

/* 质量评分和图表容器 */
.metrics-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.quality-score,
.latency-chart {
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    text-align: center;
}

.quality-score h4,
.latency-chart h4 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 20px 0;
}

.score-display {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
}

.score-circle {
    transform: rotate(0deg);
}

.score-progress {
    transition: stroke-dashoffset 0.3s ease, stroke 0.3s ease;
}

.score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value #scoreNumber {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1;
}

.score-max {
    display: block;
    font-size: 18px;
    color: #666;
    margin-top: 4px;
}

.score-label {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-top: 12px;
}

/* 延迟图表 */
.latency-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#latencyCanvas {
    margin-bottom: 16px;
}

.chart-legend {
    display: flex;
    gap: 24px;
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

/* 信息部分 */
.info-section {
    margin-bottom: 40px;
}

.info-section h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
}

.info-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 24px 0 12px 0;
}

.info-content {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    padding: 32px;
}

.info-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
    margin: 0 0 16px 0;
}

.info-content ul {
    list-style: none;
    padding: 0;
    margin: 16px 0;
}

.info-content li {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
}

.info-content li::before {
    content: '•';
    position: absolute;
    left: 8px;
    color: #3b82f6;
    font-weight: bold;
}

.connection-types {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 16px 0;
}

.type-item {
    background: #f8f8f8;
    border-radius: 8px;
    padding: 16px;
}

.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

.type-badge.green {
    background: #d1fae5;
    color: #065f46;
}

.type-badge.blue {
    background: #dbeafe;
    color: #1e40af;
}

.type-badge.purple {
    background: #e9d5ff;
    color: #6b21a8;
}

.type-badge.red {
    background: #fee2e2;
    color: #991b1b;
}

.type-item p {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 诊断日志 */
.diagnostic-log {
    margin-top: 24px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #2c3e50;
    color: #fff;
}

.log-header h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
}

.log-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.log-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.log-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 12px;
    font-family: 'Courier New', Consolas, monospace;
    font-size: 12px;
    background: #1e1e1e;
}

.log-entry {
    padding: 4px 8px;
    margin-bottom: 4px;
    border-radius: 3px;
    line-height: 1.5;
}

.log-time {
    color: #888;
    margin-right: 8px;
}

.log-message {
    color: #e0e0e0;
}

.log-entry.log-info {
    background: rgba(33, 150, 243, 0.1);
    border-left: 3px solid #2196f3;
}

.log-entry.log-info .log-message {
    color: #90caf9;
}

.log-entry.log-success {
    background: rgba(76, 175, 80, 0.1);
    border-left: 3px solid #4caf50;
}

.log-entry.log-success .log-message {
    color: #81c784;
}

.log-entry.log-warning {
    background: rgba(255, 152, 0, 0.1);
    border-left: 3px solid #ff9800;
}

.log-entry.log-warning .log-message {
    color: #ffb74d;
}

.log-entry.log-error {
    background: rgba(244, 67, 54, 0.1);
    border-left: 3px solid #f44336;
}

.log-entry.log-error .log-message {
    color: #e57373;
}

/* 工具类 */
.d-none {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }

    .metrics-container {
        grid-template-columns: 1fr;
    }

    .connection-types {
        grid-template-columns: 1fr;
    }

    .test-card {
        padding: 24px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .info-section h2 {
        font-size: 22px;
    }

    #latencyCanvas {
        max-width: 100%;
        height: auto;
    }

    /* 移动端tooltip宽度调整 */
    .latency-help::after {
        width: 260px;
        font-size: 11px;
        padding: 8px 12px;
    }
}

/* 右下角悬浮导出按钮 */
.export-float-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border: none;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    color: #fff;
}

.export-float-btn svg {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

.export-float-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(44, 62, 80, 0.4);
}

.export-float-btn:hover svg {
    transform: translateY(-2px);
}

.export-float-btn:active {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
}

.export-float-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* 导出时的loading动画 */
.export-float-btn.exporting {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    animation: exportPulse 1.5s ease-in-out infinite;
}

@keyframes exportPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(44, 62, 80, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(44, 62, 80, 0.5);
    }
}

/* 移动端适配 */
@media (max-width: 768px) {
    .export-float-btn {
        right: 16px;
        bottom: 16px;
        width: 48px;
        height: 48px;
    }

    .export-float-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* ========================================
   命令行检测API区域样式
   ======================================== */

.cli-api-section {
    background: transparent;
    border: none;
}

.cli-api-section h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cli-api-section h2 svg {
    color: #495057;
    flex-shrink: 0;
}

/* API端点列表 */
.api-endpoints {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.endpoint-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.endpoint-item:hover {
    border-color: #2c3e50;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
    transform: translateY(-2px);
}

.endpoint-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.endpoint-badge.ipv4 {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    color: #fff;
}

.endpoint-badge.ipv6 {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
    color: #fff;
}

.endpoint-badge.dual {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
}

.endpoint-url {
    display: block;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    border: 1px solid #e8e8e8;
}

.endpoint-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* CLI示例区域 */
.cli-examples {
    margin: 32px 0;
}

.cli-example {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.example-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 12px;
}

.example-header h4 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.example-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
}

.example-badge.json {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.example-badge.text {
    background: linear-gradient(135deg, #9c27b0 0%, #7b1fa2 100%);
}

.example-desc {
    margin: 0 0 20px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

/* 代码块样式 */
.code-block {
    background: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #2d2d2d;
    padding: 10px 16px;
    border-bottom: 1px solid #3e3e3e;
}

.code-header span {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

.copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #4e4e4e;
    border-radius: 6px;
    color: #999;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #3e3e3e;
    border-color: #5e5e5e;
    color: #fff;
}

.copy-btn:active {
    transform: scale(0.95);
}

.copy-btn.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: #d4d4d4;
    display: block;
}

/* 代码输出区域 */
.code-output {
    background: #2d2d2d;
    padding: 12px 16px;
    border-top: 1px solid #3e3e3e;
}

.output-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    font-weight: 500;
}

.code-output code {
    color: #4caf50;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
}

/* JSON输出美化 */
.json-output {
    background: #2d2d2d;
    padding: 0;
}

.json-output .output-label {
    padding: 12px 16px 8px;
}

.json-output pre {
    margin: 0;
    padding: 0 16px 16px;
}

.json-output code {
    color: #d4d4d4;
    font-size: 13px;
}

/* 终端输出样式 */
.terminal-output {
    background: #1a1a1a;
}

.terminal-output pre code {
    color: #0f0;
    font-size: 12px;
    line-height: 1.8;
}

/* 脚本示例 */
.script-examples {
    margin: 32px 0;
}

.script-example {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.script-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.script-header h4 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
}

.script-example pre {
    margin: 0;
}

.script-example code {
    display: block;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
}

/* 技术特性列表 */
.tech-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e8e8e8;
    transition: all 0.3s ease;
}

.feature-item:hover {
    border-color: #4caf50;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.1);
}

.feature-icon {
    flex-shrink: 0;
    color: #4caf50;
}

.feature-item strong {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 6px;
}

.feature-item p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 注意事项 */
.api-notes {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 12px;
    padding: 20px;
    margin: 24px 0;
}

.api-notes h4 {
    margin: 0 0 16px 0;
    font-size: 16px;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 8px;
}

.api-notes h4 svg {
    color: #ffc107;
}

.api-notes ul {
    margin: 0;
    padding-left: 24px;
}

.api-notes li {
    margin-bottom: 12px;
    font-size: 14px;
    color: #856404;
    line-height: 1.6;
}

.api-notes li:last-child {
    margin-bottom: 0;
}

.api-notes code {
    background: rgba(255, 193, 7, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #664d03;
}

/* API文档链接 */
.api-footer {
    text-align: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 2px solid #e8e8e8;
}

.api-footer p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

.doc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid #2c3e50;
    transition: all 0.3s ease;
}

.doc-link:hover {
    background: #2c3e50;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.2);
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* CLI API 标题 */
    .cli-api-section h2 {
        font-size: 20px;
    }

    .cli-api-section h2 svg {
        width: 20px;
        height: 20px;
    }

    /* 端点卡片 - 移动端单列 */
    .api-endpoints {
        grid-template-columns: 1fr;
        gap: 16px;
        margin: 16px 0;
    }

    .endpoint-item {
        padding: 16px;
    }

    .endpoint-url {
        font-size: 13px;
        padding: 8px 10px;
        word-break: break-all;
    }

    .endpoint-item p {
        font-size: 13px;
    }

    /* CLI 示例区域 */
    .cli-example,
    .script-example {
        padding: 16px;
    }

    .example-header,
    .script-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* 代码块 */
    .code-block code,
    .script-example code {
        font-size: 12px;
        line-height: 1.5;
    }

    /* 技术特性网格 */
    .tech-features {
        grid-template-columns: 1fr;
    }

    .code-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .copy-btn {
        align-self: flex-end;
    }

    /* 端点选择器 */
    .endpoint-selector {
        flex-direction: column;
        gap: 8px;
    }

    .endpoint-select-btn {
        padding: 12px;
    }

    .endpoint-label {
        font-size: 13px;
    }

    .endpoint-select-btn code {
        font-size: 12px;
    }
}

/* 滚动条美化（仅Webkit浏览器） */
.code-block pre::-webkit-scrollbar,
.script-example code::-webkit-scrollbar {
    height: 8px;
}

.code-block pre::-webkit-scrollbar-track,
.script-example code::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.code-block pre::-webkit-scrollbar-thumb,
.script-example code::-webkit-scrollbar-thumb {
    background: #4e4e4e;
    border-radius: 4px;
}

.code-block pre::-webkit-scrollbar-thumb:hover,
.script-example code::-webkit-scrollbar-thumb:hover {
    background: #5e5e5e;
}

/* ========================================
   脚本折叠样式 (details/summary)
   ======================================== */

/* 重置details为折叠卡片 */
details.script-example {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
}

details.script-example:hover {
    border-color: #2c3e50;
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
}

details.script-example[open] {
    border-color: #4caf50;
}

/* Summary作为可点击标题 */
summary.script-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    flex-wrap: wrap;
    gap: 12px;
    background: #f8f9fa;
    transition: background 0.2s ease;
}

summary.script-header:hover {
    background: #e9ecef;
}

details[open] summary.script-header {
    background: #e8f5e9;
    border-bottom: 2px solid #e8e8e8;
}

/* 隐藏默认的三角形标记 */
summary.script-header::-webkit-details-marker {
    display: none;
}

summary.script-header::marker {
    display: none;
}

/* 移除::before伪元素箭头，使用HTML中的SVG箭头代替 */

summary.script-header h4 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

/* 脚本按钮容器 */
.script-actions {
    display: flex;
    gap: 8px;
}

/* 脚本内容区域 */
.script-content {
    padding: 0;
    animation: slideDown 0.3s ease;
}

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

.script-content pre {
    margin: 0;
}

.script-content code {
    display: block;
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 0;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    line-height: 1.8;
    overflow-x: auto;
}

/* 移动端优化 */
@media (max-width: 768px) {
    summary.script-header {
        padding: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }

    summary.script-header h4 {
        font-size: 16px;
    }

    .script-title-group {
        flex: 1 1 100%;
        min-width: 0;
    }

    .script-actions {
        flex: 0 0 auto;
        width: 100%;
        justify-content: flex-end;
    }

    .script-content code {
        font-size: 12px;
        padding: 16px;
    }
}

/* ========================================
   端点选择器样式
   ======================================== */

.endpoint-selector {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.endpoint-select-btn {
    flex: 1;
    padding: 16px;
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: center;
}

.endpoint-select-btn:hover {
    border-color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.endpoint-select-btn.active {
    border-color: #4caf50;
    background: #f1f8f4;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.endpoint-label {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.endpoint-select-btn code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #666;
    background: transparent;
    padding: 0;
    border: none;
}

.endpoint-select-btn.active code {
    color: #4caf50;
    font-weight: 600;
}

/* ========================================
   格式标签按钮样式
   ======================================== */

.format-tabs {
    display: flex;
    gap: 8px;
    margin: 20px 0;
    padding: 4px;
    background: #f8f8f8;
    border-radius: 10px;
    border: 1px solid #e8e8e8;
}

.format-tab {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #666;
    font-weight: 500;
    text-align: center;
}

.format-tab:hover {
    background: rgba(255, 255, 255, 0.5);
    color: #2c3e50;
}

.format-tab.active {
    background: #fff;
    color: #2c3e50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    font-weight: 600;
}

.tab-icon {
    display: none;
}

.tab-label {
    display: block;
    font-size: 14px;
}

.tab-desc {
    display: block;
    font-size: 11px;
    opacity: 0.6;
    margin-top: 2px;
}

.format-tab.active .tab-desc {
    opacity: 0.8;
}

/* 格式内容区域 */
.format-content {
    display: none;
}

.format-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 端点复制按钮 */
.endpoint-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.endpoint-copy-btn {
    padding: 4px 8px;
    background: transparent;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #999;
    font-size: 12px;
}

.endpoint-copy-btn:hover {
    background: #f8f8f8;
    border-color: #d0d0d0;
    color: #666;
}

.endpoint-copy-btn svg {
    width: 14px;
    height: 14px;
}

.endpoint-copy-btn.copied {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #4caf50;
}

/* 脚本标题分组 */
.script-title-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.script-title-group h4 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.click-hint {
    font-size: 13px;
    font-weight: 400;
    color: #999;
    background: #f8f9fa;
    padding: 4px 10px;
    border-radius: 6px;
}

details[open] .click-hint {
    display: none;
}

/* 脚本箭头图标 */
.script-arrow {
    flex-shrink: 0;
    color: #2c3e50;
    transition: transform 0.3s ease;
}

details[open] .script-arrow {
    transform: rotate(180deg);
}

/* 移动端响应式 */
@media (max-width: 768px) {
    /* 格式标签 - 移动端保持横向但缩小 */
    .format-tabs {
        gap: 4px;
        padding: 3px;
        margin: 16px 0;
    }

    .format-tab {
        padding: 10px 12px;
        font-size: 13px;
    }

    .tab-label {
        font-size: 13px;
    }

    .tab-desc {
        font-size: 10px;
    }

    /* 脚本标题组 */
    .script-title-group {
        gap: 8px;
    }

    .script-title-group h4 {
        font-size: 16px;
        flex-wrap: wrap;
    }

    .click-hint {
        font-size: 11px;
        padding: 3px 8px;
    }

    /* 脚本内容 */
    .script-content {
        padding: 12px;
    }

    .script-content pre {
        margin: 0;
    }

    .script-content code {
        font-size: 11px;
        line-height: 1.4;
    }
}

/* 超小屏幕优化（iPhone SE等） */
@media (max-width: 480px) {
    /* 格式标签改为竖向 */
    .format-tabs {
        flex-direction: column;
        gap: 6px;
        padding: 6px;
    }

    .format-tab {
        padding: 12px 16px;
        text-align: left;
    }

    /* 端点复制按钮调整 */
    .endpoint-header {
        gap: 8px;
    }

    .endpoint-copy-btn {
        padding: 3px 6px;
        font-size: 11px;
    }

    .endpoint-copy-btn svg {
        width: 12px;
        height: 12px;
    }

    /* 复制按钮文字简化 */
    .copy-btn {
        padding: 6px 10px;
        font-size: 11px;
    }

    /* 脚本标题更紧凑 */
    .script-title-group h4 {
        font-size: 14px;
    }

    .script-title-group svg {
        width: 18px;
        height: 18px;
    }

    .click-hint {
        font-size: 10px;
        padding: 2px 6px;
    }
}

/* 全球节点图标 */
.globe-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 4px;
    vertical-align: middle;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"><g fill="none" stroke="%232196f3" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5"><path d="M9.88 23.05c-1.23-1.724-2.147-4.633-2.487-8.058M9.88 1c-.836 1.145-1.528 2.88-1.992 4.958M14.12 23.05c1.222-1.712 2.135-4.594 2.48-7.99M14.12 1c1.047 1.434 1.868 3.794 2.298 6.592"/><path d="M2.05 6.75c8.004-1.531 12.337-1.539 19.9 0m0 10.5c-8.003 1.532-12.336 1.539-19.9 0M1 12.005h5.64a.36.36 0 0 0 .328-.205l1.717-3.485a.37.37 0 0 1 .35-.205a.36.36 0 0 1 .323.244l2.331 6.505a.37.37 0 0 0 .334.25a.36.36 0 0 0 .35-.227l2.25-5.132a.37.37 0 0 1 .326-.22a.36.36 0 0 1 .336.205l1.017 2.065a.37.37 0 0 0 .329.205H23"/><path d="M22.987 9.572C21.877 4.526 17.38.75 12 .75S2.123 4.526 1.013 9.572m21.974 4.856C21.877 19.474 17.38 23.25 12 23.25s-9.877-3.776-10.987-8.822"/></g></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* 快速使用说明 */
.cli-usage-note {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 0;
    margin: 20px 0;
}

.cli-usage-note pre {
    margin: 0;
    padding: 20px;
    overflow-x: auto;
}

.cli-usage-note code {
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.8;
    color: #e0e0e0;
    display: block;
}

/* 快速使用折叠区域 */
.cli-usage-details {
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    margin: 20px 0;
    background: #fff;
}

/* ========================================
   相关工具推荐样式
   ======================================== */

.related-tools {
    margin: 48px 0;
}

.related-tools h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-tools .section-intro {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.tool-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 16px;
    padding: 28px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2196f3, #4caf50);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

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

.tool-card:hover {
    border-color: #2196f3;
    box-shadow: 0 8px 24px rgba(33, 150, 243, 0.15);
    transform: translateY(-4px);
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e3f2fd, #f1f8e9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.tool-card:hover .tool-icon {
    transform: scale(1.1) rotate(5deg);
}

.tool-icon svg {
    width: 28px;
    height: 28px;
    color: #2196f3;
}

.tool-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    transition: color 0.3s ease;
}

.tool-card:hover h3 {
    color: #2196f3;
}

.tool-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex: 1;
}

.tool-tag {
    display: inline-block;
    padding: 6px 14px;
    background: #f1f8e9;
    color: #4caf50;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    margin-top: auto;
}

/* ========================================
   延伸阅读样式
   ======================================== */

.related-articles {
    margin: 48px 0;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 16px;
}

.related-articles h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-articles .section-intro {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

.article-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.article-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    transition: all 0.3s ease;
}

.article-card:hover {
    border-color: #2c3e50;
    box-shadow: 0 6px 20px rgba(44, 62, 80, 0.12);
    transform: translateY(-2px);
}

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

.article-category {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #2196f3, #1976d2);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-card time {
    font-size: 13px;
    color: #999;
}

.article-card h3 {
    margin: 0 0 12px 0;
}

.article-card h3 a {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.article-card:hover h3 a {
    color: #2196f3;
}

.article-card p {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .related-tools,
    .related-articles {
        margin: 32px 0;
    }

    .related-tools h2,
    .related-articles h2 {
        font-size: 22px;
    }

    .related-articles {
        padding: 24px 20px;
    }

    .tool-grid,
    .article-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tool-card {
        padding: 20px;
    }

    .tool-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 16px;
    }

    .tool-icon svg {
        width: 24px;
        height: 24px;
    }

    .article-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .related-tools h2,
    .related-articles h2 {
        font-size: 20px;
        flex-wrap: wrap;
    }

    .related-tools h2 svg,
    .related-articles h2 svg {
        width: 20px;
        height: 20px;
    }

    .tool-card h3 {
        font-size: 16px;
    }

    .article-card h3 a {
        font-size: 15px;
    }
}

/* ========================================
   IPv6配置教程样式
   ======================================== */

.ipv6-tutorials {
    margin: 48px 0;
}

.ipv6-tutorials h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 12px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ipv6-tutorials .section-intro {
    font-size: 16px;
    color: #666;
    margin: 0 0 32px 0;
    line-height: 1.6;
}

/* IPv6前缀信息区域 */
.ipv6-prefix-info {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 32px;
}

.ipv6-prefix-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 16px 0;
}

.ipv6-prefix-info ul {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
}

.ipv6-prefix-info li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
    line-height: 1.6;
}

.ipv6-prefix-info li:last-child {
    border-bottom: none;
}

.ipv6-prefix-info code {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #2196f3;
    font-weight: 600;
}

.tutorial-accordion {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tutorial-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tutorial-item:hover {
    border-color: #2196f3;
}

.tutorial-item[open] {
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}

.tutorial-item summary {
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    transition: background 0.2s ease;
    position: relative;
}

.tutorial-item summary:hover {
    background: #e9ecef;
}

.tutorial-item[open] summary {
    background: #e3f2fd;
    border-bottom: 2px solid #e8e8e8;
}

.tutorial-item summary::marker,
.tutorial-item summary::-webkit-details-marker {
    display: none;
}

.tutorial-item summary::after {
    content: '▼';
    position: absolute;
    right: 24px;
    font-size: 12px;
    color: #666;
    transition: transform 0.3s ease;
}

.tutorial-item[open] summary::after {
    transform: rotate(180deg);
}

.platform-icon {
    flex-shrink: 0;
    color: #2196f3;
}

.tutorial-title {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.difficulty {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.difficulty.easy {
    background: #e8f5e9;
    color: #4caf50;
}

.difficulty.medium {
    background: #fff3e0;
    color: #ff9800;
}

.difficulty.hard {
    background: #ffebee;
    color: #f44336;
}

.tutorial-content {
    padding: 24px;
    background: #fff;
}

.tutorial-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 24px 0 12px 0;
}

.tutorial-content h4:first-child {
    margin-top: 0;
}

.tutorial-content ol,
.tutorial-content ul {
    margin: 12px 0;
    padding-left: 24px;
    line-height: 1.8;
}

.tutorial-content li {
    margin: 8px 0;
    color: #333;
}

.tutorial-content ul ul {
    margin: 4px 0;
}

.tutorial-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 13px;
    color: #d32f2f;
}

.tutorial-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 12px 0;
}

.tutorial-content pre code {
    background: none;
    padding: 0;
    color: #f8f8f2;
    font-size: 14px;
}

/* ========================================
   性能优化建议样式
   ======================================== */

.performance-tips {
    margin: 48px 0;
}

.performance-tips h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.performance-tips .section-intro {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.tips-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tip-card {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
}

.tip-card:hover {
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}

.tip-card h3 {
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px 0;
}

.tip-card > p {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin: 0 0 12px 0;
}

.tip-details {
    border-top: 1px dashed #e8e8e8;
    padding-top: 12px;
    margin-top: 12px;
}

.tip-details h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 12px 0 8px 0;
}

.tip-details h4:first-child {
    margin-top: 0;
}

.tip-details ul {
    margin: 8px 0;
    padding-left: 20px;
    line-height: 1.6;
}

.tip-details li {
    margin: 6px 0;
    color: #333;
    font-size: 13px;
}

.tip-details code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 12px;
    color: #d32f2f;
}

.tip-details pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.tip-details pre code {
    background: none;
    padding: 0;
    color: #f8f8f2;
    font-size: 13px;
    line-height: 1.5;
}

.tip-details p {
    font-size: 13px;
    margin: 6px 0;
}

.tip-note {
    background: #fffbf0;
    border-left: 3px solid #ffc107;
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 12px;
    color: #856404;
    line-height: 1.5;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
}

.comparison-table thead {
    background: #f8f9fa;
}

.comparison-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #e8e8e8;
    font-size: 13px;
}

.comparison-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e8e8e8;
    color: #333;
    font-size: 13px;
}

.comparison-table tbody tr:hover {
    background: #f8f9fa;
}

/* 性能优化提示卡片 - 可折叠样式 */
.tip-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.tip-item:hover {
    border-color: #2196f3;
}

.tip-item[open] {
    border-color: #2196f3;
    box-shadow: 0 4px 12px rgba(33, 150, 243, 0.1);
}

.tip-item summary {
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    transition: background 0.2s ease;
    position: relative;
}

.tip-item summary:hover {
    background: #e3f2fd;
}

.tip-item[open] summary {
    background: #e3f2fd;
    border-bottom: 2px solid #e8e8e8;
}

.tip-item summary::marker,
.tip-item summary::-webkit-details-marker {
    display: none;
}

.tip-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 20px;
    font-weight: 300;
    color: #666;
    transition: transform 0.3s ease;
}

.tip-item[open] summary::after {
    content: '−';
}

.tip-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2196f3;
}

.tip-icon svg {
    display: block;
}

.tip-question {
    flex: 1;
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

.tip-item .tip-details {
    padding: 20px;
    background: #fff;
    border-top: none;
    margin-top: 0;
}

/* ========================================
   常见问题排查样式
   ======================================== */

.troubleshooting {
    margin: 48px 0;
}

.troubleshooting h2 {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 8px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.troubleshooting .section-intro {
    font-size: 15px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #ff5722;
}

.faq-item[open] {
    border-color: #ff5722;
    box-shadow: 0 4px 12px rgba(255, 87, 34, 0.1);
}

.faq-item summary {
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    transition: background 0.2s ease;
    position: relative;
}

.faq-item summary:hover {
    background: #fff3e0;
}

.faq-item[open] summary {
    background: #fff3e0;
    border-bottom: 2px solid #e8e8e8;
}

.faq-item summary::marker,
.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 20px;
    font-size: 20px;
    font-weight: 300;
    color: #666;
    transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ff5722;
}

.faq-icon svg {
    display: block;
}

.faq-question {
    flex: 1;
    font-size: 17px;
    font-weight: 600;
    color: #1a1a1a;
}

.faq-answer {
    padding: 20px;
    background: #fff;
}

.faq-answer h4 {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 16px 0 8px 0;
}

.faq-answer h4:first-child {
    margin-top: 0;
}

.faq-answer ol,
.faq-answer ul {
    margin: 8px 0;
    padding-left: 20px;
    line-height: 1.6;
}

.faq-answer li {
    margin: 6px 0;
    color: #333;
    font-size: 13px;
}

.faq-answer ul ul {
    margin: 4px 0;
}

.faq-answer p {
    margin: 6px 0;
    color: #333;
    line-height: 1.6;
    font-size: 13px;
}

.faq-answer code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 12px;
    color: #d32f2f;
}

.faq-answer pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.faq-answer pre code {
    background: none;
    padding: 0;
    color: #f8f8f2;
    font-size: 13px;
    line-height: 1.5;
}

.config-table {
    width: 100%;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 13px;
}

.config-table thead {
    background: #f8f9fa;
}

.config-table th {
    padding: 8px 10px;
    text-align: left;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #e8e8e8;
    font-size: 13px;
}

.config-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e8e8e8;
    color: #333;
    font-size: 13px;
}

.config-table tbody tr:hover {
    background: #fff3e0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ipv6-tutorials,
    .performance-tips,
    .troubleshooting {
        margin: 24px 0;
    }

    .ipv6-tutorials h2,
    .performance-tips h2,
    .troubleshooting h2 {
        font-size: 22px;
    }

    .ipv6-tutorials .section-intro,
    .performance-tips .section-intro,
    .troubleshooting .section-intro {
        font-size: 14px;
        margin: 0 0 16px 0;
    }

    /* IPv6前缀信息 */
    .ipv6-prefix-info {
        padding: 16px;
        margin-bottom: 20px;
    }

    .ipv6-prefix-info h3 {
        font-size: 16px;
        margin: 0 0 12px 0;
    }

    .ipv6-prefix-info li {
        padding: 6px 0;
        font-size: 13px;
    }

    .ipv6-prefix-info code {
        font-size: 12px;
        padding: 1px 6px;
    }

    .ipv6-prefix-info .tip-note {
        font-size: 12px;
        padding: 6px 10px;
        margin: 8px 0;
    }

    /* 性能优化建议 */
    .tips-grid {
        gap: 10px;
    }

    .tip-item {
        border-radius: 10px;
    }

    .tip-item summary {
        padding: 14px 16px;
        gap: 8px;
    }

    .tip-item summary::after {
        right: 16px;
        font-size: 18px;
    }

    .tip-question {
        font-size: 14px;
    }

    .tip-icon {
        font-size: 18px;
    }

    .tip-item .tip-details {
        padding: 16px;
    }

    .tip-card {
        padding: 16px;
    }

    .tip-card h3 {
        font-size: 16px;
        margin: 0 0 6px 0;
    }

    .tip-card > p {
        font-size: 12px;
        margin: 0 0 10px 0;
    }

    .tip-details {
        padding-top: 10px;
        margin-top: 10px;
    }

    .tip-details h4 {
        font-size: 13px;
        margin: 10px 0 6px 0;
    }

    .tip-details ul {
        margin: 6px 0;
        padding-left: 18px;
    }

    .tip-details li {
        margin: 5px 0;
        font-size: 12px;
    }

    .tip-details code {
        font-size: 11px;
    }

    .tip-details pre {
        padding: 10px;
        margin: 6px 0;
    }

    .tip-details pre code {
        font-size: 12px;
    }

    .tip-details p {
        font-size: 12px;
        margin: 5px 0;
    }

    .tip-note {
        padding: 6px 10px;
        margin: 8px 0;
        font-size: 11px;
    }

    .comparison-table {
        margin: 6px 0;
        font-size: 12px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* 移动端流畅滚动 */
    }

    .comparison-table thead,
    .comparison-table tbody,
    .comparison-table tr {
        display: table;
        width: 100%;
        table-layout: fixed;
    }

    .comparison-table th {
        padding: 6px 4px;
        font-size: 11px;
    }

    .comparison-table td {
        padding: 6px 4px;
        font-size: 11px;
    }

    /* DNS表格特殊处理 - 移动端改为竖向卡片 */
    .dns-table {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        border: none;
    }

    .dns-table thead {
        display: none; /* 隐藏表头 */
    }

    .dns-table tbody,
    .dns-table tr {
        display: block;
        width: 100%;
    }

    .dns-table tr {
        background: #f8f9fa;
        border-radius: 8px;
        padding: 10px;
        border: 1px solid #e8e8e8;
    }

    .dns-table tr:hover {
        background: #e9ecef;
    }

    .dns-table td {
        display: block;
        padding: 4px 0;
        border: none;
        font-size: 12px;
    }

    .dns-table td::before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #2c3e50;
        display: inline;
    }

    .dns-table td:first-child {
        font-weight: 600;
        font-size: 14px;
        color: #2196f3;
        margin-bottom: 6px;
        padding-bottom: 6px;
        border-bottom: 1px dashed #e8e8e8;
    }

    .dns-table td:first-child::before {
        display: none; /* 第一列不显示标签 */
    }

    /* 教程和FAQ */
    .tutorial-item,
    .faq-item {
        border-radius: 10px;
    }

    .tutorial-item summary,
    .faq-item summary {
        padding: 14px 16px;
    }

    .tutorial-content,
    .faq-answer {
        padding: 16px;
    }

    .tutorial-title,
    .faq-question {
        font-size: 15px;
    }

    .faq-icon {
        font-size: 18px;
    }

    .tutorial-content h4,
    .faq-answer h4 {
        font-size: 13px;
        margin: 14px 0 6px 0;
    }

    .tutorial-content ol,
    .tutorial-content ul,
    .faq-answer ol,
    .faq-answer ul {
        margin: 6px 0;
        padding-left: 18px;
        line-height: 1.5;
    }

    .tutorial-content li,
    .faq-answer li {
        margin: 5px 0;
        font-size: 12px;
    }

    .tutorial-content p,
    .faq-answer p {
        margin: 5px 0;
        font-size: 12px;
        line-height: 1.5;
    }

    .tutorial-content code,
    .faq-answer code {
        font-size: 11px;
        padding: 1px 5px;
    }

    .tutorial-content pre,
    .faq-answer pre {
        padding: 10px;
        margin: 6px 0;
        border-radius: 6px;
    }

    .tutorial-content pre code,
    .faq-answer pre code {
        font-size: 12px;
        line-height: 1.4;
    }

    .tutorial-content img {
        margin: 10px 0;
    }

    .config-table {
        margin: 6px 0;
        font-size: 12px;
    }

    .config-table th,
    .config-table td {
        padding: 6px 8px;
        font-size: 12px;
    }

    /* 难度标签 */
    .difficulty {
        padding: 3px 10px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .ipv6-tutorials,
    .performance-tips,
    .troubleshooting {
        margin: 20px 0;
    }

    .ipv6-tutorials h2,
    .performance-tips h2,
    .troubleshooting h2 {
        font-size: 20px;
        flex-wrap: wrap;
        margin: 0 0 6px 0;
    }

    .ipv6-tutorials h2 svg,
    .performance-tips h2 svg,
    .troubleshooting h2 svg {
        width: 20px;
        height: 20px;
    }

    .ipv6-tutorials .section-intro,
    .performance-tips .section-intro,
    .troubleshooting .section-intro {
        font-size: 13px;
        margin: 0 0 14px 0;
    }

    /* IPv6前缀信息 */
    .ipv6-prefix-info {
        padding: 14px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

    .ipv6-prefix-info h3 {
        font-size: 15px;
        margin: 0 0 10px 0;
    }

    .ipv6-prefix-info li {
        padding: 5px 0;
        font-size: 12px;
    }

    .ipv6-prefix-info code {
        font-size: 11px;
    }

    .ipv6-prefix-info .tip-note {
        font-size: 11px;
        padding: 5px 8px;
    }

    /* 性能优化建议 */
    .tips-grid {
        gap: 10px;
    }

    .tip-card {
        padding: 14px;
        border-radius: 10px;
    }

    .tip-card h3 {
        font-size: 15px;
        margin: 0 0 5px 0;
    }

    .tip-card > p {
        font-size: 11px;
    }

    .tip-details {
        padding-top: 8px;
        margin-top: 8px;
    }

    .tip-details h4 {
        font-size: 12px;
        margin: 8px 0 5px 0;
    }

    .tip-details ul {
        padding-left: 16px;
    }

    .tip-details li {
        font-size: 11px;
    }

    .tip-details code {
        font-size: 10px;
    }

    .tip-details pre {
        padding: 8px;
        border-radius: 5px;
    }

    .tip-details pre code {
        font-size: 11px;
    }

    .tip-note {
        padding: 5px 8px;
        margin: 6px 0;
        font-size: 10px;
    }

    .comparison-table,
    .config-table {
        font-size: 11px;
        display: block;
        overflow-x: auto;
    }

    .comparison-table th,
    .comparison-table td,
    .config-table th,
    .config-table td {
        padding: 5px 6px;
        font-size: 11px;
    }

    /* 教程和FAQ */
    .faq-list {
        gap: 10px;
    }

    .tutorial-item,
    .faq-item {
        border-radius: 8px;
    }

    .tutorial-item summary,
    .faq-item summary {
        padding: 12px 14px;
        gap: 8px;
    }

    .tutorial-item summary::after,
    .faq-item summary::after {
        right: 14px;
        font-size: 18px;
    }

    .tutorial-content,
    .faq-answer {
        padding: 14px;
    }

    .tutorial-title,
    .faq-question {
        font-size: 14px;
    }

    .faq-icon {
        font-size: 16px;
    }

    .tutorial-content h4,
    .faq-answer h4 {
        font-size: 12px;
        margin: 12px 0 5px 0;
    }

    .tutorial-content ol,
    .tutorial-content ul,
    .faq-answer ol,
    .faq-answer ul {
        padding-left: 16px;
    }

    .tutorial-content li,
    .faq-answer li {
        font-size: 11px;
    }

    .tutorial-content p,
    .faq-answer p {
        font-size: 11px;
    }

    .tutorial-content code,
    .faq-answer code {
        font-size: 10px;
    }

    .tutorial-content pre,
    .faq-answer pre {
        padding: 8px;
        border-radius: 5px;
    }

    .tutorial-content pre code,
    .faq-answer pre code {
        font-size: 11px;
    }

    .tutorial-content img {
        margin: 8px 0;
        border-radius: 6px;
    }

    /* 难度标签 */
    .difficulty {
        padding: 2px 8px;
        font-size: 10px;
    }

    /* 平台图标 */
    .platform-icon {
        width: 16px;
        height: 16px;
    }
}

.cli-usage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    list-style: none;
    background: #f8f9fa;
    border-radius: 10px;
    transition: background 0.2s ease;
}

.cli-usage-header:hover {
    background: #e9ecef;
}

.cli-usage-details[open] .cli-usage-header {
    background: #e8f5e9;
    border-bottom: 2px solid #e8e8e8;
    border-radius: 10px 10px 0 0;
}

.cli-usage-header::-webkit-details-marker {
    display: none;
}

.cli-usage-header::marker {
    display: none;
}

.copy-all-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #2c3e50;
    font-size: 14px;
    font-weight: 500;
}

.copy-all-btn:hover {
    background: #2c3e50;
    border-color: #2c3e50;
    color: #fff;
}

.copy-all-btn.copied {
    background: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.cli-usage-details[open] .cli-usage-note {
    border-radius: 0 0 10px 10px;
}

/* 端点选中状态 */
.endpoint-item {
    transition: all 0.3s ease;
    cursor: pointer !important;
}

.endpoint-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(44, 62, 80, 0.15);
}

.endpoint-item.endpoint-active {
    border-color: #4caf50;
    background: #f1f8f4;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.endpoint-item.endpoint-active .endpoint-badge {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
