/* ==========================================================================
   蓝色科技标题栏 v2 - 用于测试页面 / 结果页面
   深蓝背景 + 像素迷彩 + 红橙渐变文字 + 白色描边 + 黑色浮雕阴影 + 旗帜Logo

   v3 重写标题渲染：改用 SVG <text> 方案。
   旧方案（HTML 文本 + text-stroke/伪元素三层叠加）的问题：
   1) Chrome 对 HTML 文本不支持 paint-order:stroke fill，描边画在填充之上侵蚀渐变；
   2) 伪元素 attr(data-text) 三层叠加依赖像素级对齐，页面内联样式稍有干扰即破功；
   3) 透明填充下 text-shadow 会透过字面，标题发暗发脏。
   v3 用 SVG <text> + paint-order:stroke fill（描边在下、渐变填充在上）+
   feDropShadow 整体浮雕阴影，一份渲染全浏览器一致；随 viewBox 等比缩放，
   天然响应式，无需媒体查询调整字号与描边宽度。
   ========================================================================== */

.blue-header {
    position: relative;
    height: 120px;
    background: linear-gradient(180deg, #073b82, #06458f, #083c7d);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    padding: 0 20px;
}

/* 噪点纹理 */
.blue-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(100, 180, 255, 0.03) 1px, transparent 1px),
        radial-gradient(circle at 80% 30%, rgba(100, 180, 255, 0.02) 1px, transparent 1px),
        radial-gradient(circle at 40% 70%, rgba(100, 180, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px, 80px 80px, 100px 100px;
    pointer-events: none;
}

/* 渐变光晕 */
.blue-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 30% 20%, rgba(100, 180, 255, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(100, 180, 255, 0.04) 0%, transparent 50%);
    pointer-events: none;
}

/* 旗帜Logo */
.blue-header .header-flag {
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    width: 120px;
    height: 80px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
    z-index: 2;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

/* 像素迷彩背景 */
.pixel-camo {
    position: absolute;
    top: 55px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    height: 60px;
    opacity: 0.45;
    pointer-events: none;
}

.pixel-camo span {
    position: absolute;
    background: #41d6c3;
    animation: pixelGlow 3s infinite;
}

.pixel-camo span:nth-child(2n) { background: #159b8c; }
.pixel-camo span:nth-child(3n) { background: rgba(65, 214, 195, 0.6); }
.pixel-camo span:nth-child(5n) { background: rgba(21, 155, 140, 0.7); }
.pixel-camo span:nth-child(7n) { background: rgba(65, 214, 195, 0.4); }

@keyframes pixelGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

/* ==========================================================================
   标题文字（SVG 方案）
   SVG 内部合成：白色外描边（paint-order 在下）+ 红橙渐变填充 +
   feDropShadow 黑色浮雕阴影。页面 CSS 不会干扰 SVG 内部渲染。
   ========================================================================== */
.blue-header .header-title-svg {
    position: relative;
    z-index: 2;
    display: block;
    width: 100%;
    max-width: 1020px;
    height: auto;
    max-height: 96px;
    margin: 0 auto;
    overflow: visible;
}

.blue-header .header-title-svg text {
    font-family: 'SimHei', 'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
    font-weight: 900;
    /* viewBox 缩放比约 0.85，2.4 用户单位 ≈ 2px 实际字距 */
    letter-spacing: 2.4px;
    /* 防止页面样式继承干扰 SVG 文字渲染 */
    text-shadow: none;
    -webkit-text-stroke: 0;
}

/* 移动端适配（SVG 标题随 viewBox 自动缩放，只需调整容器与旗帜） */
@media (max-width: 768px) {
    .blue-header {
        height: 90px;
        padding: 0 10px;
    }
    .blue-header .header-flag {
        width: 70px;
        height: 47px;
        left: 15px;
    }
    .blue-header .header-title-svg {
        max-height: 64px;
    }
    .pixel-camo {
        width: 95%;
        height: 40px;
        top: 45px;
    }
}

@media (max-width: 480px) {
    .blue-header {
        height: 70px;
    }
    .blue-header .header-flag {
        width: 50px;
        height: 33px;
        left: 10px;
    }
    .blue-header .header-title-svg {
        max-height: 46px;
    }
    .pixel-camo {
        top: 38px;
        height: 30px;
    }
}

/* TS效度指标面板 */
.ts-panel {
    background: linear-gradient(135deg, #1a237e, #283593);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    color: #fff;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

.ts-panel-title {
    font-size: 18px;
    font-weight: 800;
    color: #ffd700;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: 1px;
}

.ts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 15px;
}

.ts-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ts-item-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 4px;
}

.ts-item-value {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 2px;
}

.ts-item-value.pass { color: #4caf50; }
.ts-item-value.fail { color: #f44336; }
.ts-item-value.warn { color: #ff9800; }

.ts-item-status {
    font-size: 12px;
    font-weight: 600;
}

.ts-item-status.pass { color: #4caf50; }
.ts-item-status.fail { color: #f44336; }
.ts-item-status.warn { color: #ff9800; }

.ts-verdict {
    text-align: center;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
}

.ts-verdict.pass {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.ts-verdict.fail {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

@media (max-width: 480px) {
    .ts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .ts-item {
        padding: 8px;
    }
    .ts-item-value {
        font-size: 20px;
    }
}
