/* 屏幕检测工具页面样式 - 与 svg-preview.css 保持一致的视觉风格 */
.screen-test-page {
    max-width: 1400px;
    margin: 40px auto 60px;
    padding: 0 20px;
}

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

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

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

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

/* 设备信息卡片 */
.screen-test-page .device-info-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 32px;
}

.screen-test-page .device-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #e8e8e8;
}

.screen-test-page .device-info-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.screen-test-page .device-info-header h3 svg {
    width: 20px;
    height: 20px;
}

.screen-test-page .device-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: #e8e8e8;
}

.screen-test-page .device-info-item {
    background: #fff;
    padding: 16px 20px;
}

.screen-test-page .device-info-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.screen-test-page .device-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Courier New', Consolas, monospace;
}

/* 测试模块网格 */
.screen-test-page .test-modules {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

/* 测试模块卡片 */
.screen-test-page .test-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.3s;
}

.screen-test-page .test-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.screen-test-page .test-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 20px 0;
}

.screen-test-page .test-card-icon {
    width: 48px;
    height: 48px;
    background: #2c3e50;
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.screen-test-page .test-card-icon svg {
    width: 24px;
    height: 24px;
}

.screen-test-page .test-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.screen-test-page .test-card-body {
    padding: 16px 20px;
    flex: 1;
}

.screen-test-page .test-card-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.screen-test-page .test-card-footer {
    padding: 0 20px 20px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.screen-test-page .btn-test {
    background: #2c3e50;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.screen-test-page .btn-test:hover {
    background: #1a252f;
    transform: translateY(-1px);
}

.screen-test-page .btn-test-outline {
    background: #fff;
    color: #2c3e50;
    border: 1px solid #ddd;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.screen-test-page .btn-test-outline:hover {
    background: #f8f8f8;
    border-color: #2c3e50;
}

/* 坏点检测 - 颜色选择器 */
.screen-test-page .color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.screen-test-page .color-btn {
    width: 36px;
    height: 36px;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
}

.screen-test-page .color-btn:hover {
    transform: scale(1.1);
    border-color: #2c3e50;
}

.screen-test-page .color-btn.active {
    border-color: #2c3e50;
    box-shadow: 0 0 0 2px rgba(44, 62, 80, 0.3);
}

.screen-test-page .color-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
}

.screen-test-page .color-hex-input {
    width: 100px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #2c3e50;
}

.screen-test-page .color-hex-input:focus {
    outline: none;
    border-color: #2c3e50;
}

/* 灰阶模式切换 */
.screen-test-page .mode-toggle {
    display: flex;
    gap: 4px;
    background: #f0f0f0;
    border-radius: 8px;
    padding: 4px;
    margin-top: 12px;
}

.screen-test-page .mode-btn {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: transparent;
    color: #666;
    transition: all 0.2s;
}

.screen-test-page .mode-btn.active {
    background: #fff;
    color: #2c3e50;
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* 残影速度控制 */
.screen-test-page .speed-controls {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.screen-test-page .speed-btn {
    padding: 6px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    background: #fff;
    color: #666;
    transition: all 0.2s;
}

.screen-test-page .speed-btn.active {
    background: #2c3e50;
    color: #fff;
    border-color: #2c3e50;
}

/* 刷新率结果显示 */
.screen-test-page .refresh-result {
    margin-top: 16px;
    padding: 16px;
    background: #f8f8f8;
    border-radius: 8px;
    display: none;
}

.screen-test-page .refresh-result.visible {
    display: block;
}

.screen-test-page .refresh-rate-value {
    font-size: 36px;
    font-weight: 700;
    color: #2c3e50;
    font-family: 'Courier New', Consolas, monospace;
}

.screen-test-page .refresh-rate-unit {
    font-size: 16px;
    font-weight: 400;
    color: #666;
    margin-left: 4px;
}

.screen-test-page .refresh-rate-range {
    font-size: 13px;
    color: #999;
    margin-top: 4px;
}

/* 全屏覆盖层 */
.screen-test-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    display: none;
    cursor: none;
}

.screen-test-overlay.active {
    display: block;
}

.screen-test-overlay canvas {
    width: 100%;
    height: 100%;
    display: block;
}

.screen-test-overlay .overlay-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    z-index: 100000;
    pointer-events: none;
    transition: opacity 0.5s;
}

.screen-test-overlay .overlay-hint.dark-bg {
    background: rgba(255, 255, 255, 0.7);
    color: #000;
}

.screen-test-overlay .overlay-hint.fade-out {
    opacity: 0;
}

/* 内联预览 Canvas */
.screen-test-page .preview-canvas-wrap {
    margin-top: 12px;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.screen-test-page .preview-canvas-wrap canvas {
    width: 100%;
    height: 120px;
    display: block;
}

.screen-test-page .preview-canvas-wrap .fullscreen-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.screen-test-page .preview-canvas-wrap:hover .fullscreen-hint {
    opacity: 1;
}

/* SEO 内容区 */
.screen-test-page .info-section {
    margin-bottom: 40px;
}

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

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

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

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

.screen-test-page .info-content h4 {
    font-size: 17px;
    font-weight: 600;
    color: #2c3e50;
    margin: 20px 0 10px 0;
}

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

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

.screen-test-page .info-content li::before {
    content: '\2022';
    position: absolute;
    left: 8px;
    color: #2c3e50;
    font-weight: bold;
}

.screen-test-page .info-content ol {
    padding-left: 24px;
    margin: 16px 0;
}

.screen-test-page .info-content ol li {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 8px;
}

.screen-test-page .info-content ol li::before {
    display: none;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .screen-test-page .test-modules {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .screen-test-page .page-header h1 {
        font-size: 22px;
    }

    .screen-test-page .page-header p {
        font-size: 14px;
    }

    .screen-test-page .device-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .screen-test-page .test-card-header {
        padding: 16px 16px 0;
    }

    .screen-test-page .test-card-body {
        padding: 12px 16px;
    }

    .screen-test-page .test-card-footer {
        padding: 0 16px 16px;
    }

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

    .screen-test-page .info-content {
        padding: 20px;
    }

    .screen-test-page .refresh-rate-value {
        font-size: 28px;
    }
}

@media (max-width: 480px) {
    .screen-test-page .device-info-grid {
        grid-template-columns: 1fr;
    }
}
