/* 测试系统样式 */

/* 测试触发按钮 */
#test-trigger-btn {
    position: fixed;
    top: 40px;
    right: 35px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00ff00, #009900);
    border: 1.5px solid #00ff00;
    color: #000;
    font-weight: bold;
    font-size: 18px;
    z-index: 5000;
    display: none;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 255, 0, 0.5);
    animation: pulseTestBtn 2s infinite;
}

@keyframes pulseTestBtn {
    0% { box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 0, 0.8); }
    100% { box-shadow: 0 0 10px rgba(0, 255, 0, 0.5); }
}

/* 测试面板 */
#test-panel {
    position: fixed;
    top: 180px;
    right: 18px;
    z-index: 5000;
    display: none;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid #00ff00;
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    width: 280px;
    box-shadow: 0 0 30px rgba(0, 255, 0, 0.3);
    backdrop-filter: blur(20px);
}

#test-panel .panel-header {
    color: #00ff00;
    font-weight: bold;
    text-align: center;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid #00ff00;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* 测试按钮网格 */
.test-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: var(--space-md);
}

.test-btn {
    padding: 10px 5px;
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    min-height: 40px;
}

.test-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
    box-shadow: 0 0 10px currentColor;
}

.test-btn i {
    font-size: 14px;
}

/* 测试按钮颜色 */
.test-btn.camera { background: #2196F3; }
.test-btn.compass { background: #4CAF50; }
.test-btn.ai { background: #9C27B0; }
.test-btn.particles { background: #FF9800; }
.test-btn.ar { background: #795548; }
.test-btn.detect { background: #009688; }
.test-btn.fengshui { background: #FF5722; }
.test-btn.ornament { background: #E91E63; }
.test-btn.layout { background: #3F51B5; }
.test-btn.report { background: #607D8B; }

/* 专项测试区域 */
.test-section {
    border-top: 1px solid rgba(0, 255, 0, 0.3);
    padding-top: var(--space-md);
    margin-bottom: var(--space-md);
}

.test-section-title {
    color: #FFD700;
    font-size: 12px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.test-section-title i {
    font-size: 14px;
}

/* 全面测试按钮 */
.full-test-btn {
    width: 100%;
    background: linear-gradient(135deg, #FF0000, #FF9800);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-md);
    font-weight: bold;
    margin-bottom: var(--space-sm);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.full-test-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 0 20px rgba(255, 152, 0, 0.5);
}

/* 测试控制按钮 */
.test-controls {
    display: flex;
    gap: 8px;
    margin-top: var(--space-md);
}

.control-btn {
    flex: 1;
    padding: 8px;
    border: none;
    border-radius: var(--radius-sm);
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.control-btn.hide { background: #666; }
.control-btn.report { background: #4CAF50; }
.control-btn.reset { background: #f44336; }

.control-btn:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* 测试状态显示 */
#test-status {
    position: fixed;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #00ff00;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: 1px solid #00ff00;
    z-index: 6000;
    display: none;
    max-width: 90%;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    backdrop-filter: blur(10px);
}

/* 诊断结果面板 */
.diagnosis-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(20, 20, 30, 0.98);
    border: 2px solid #FF9800;
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    z-index: 10000;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(255, 152, 0, 0.3);
}

.diagnosis-header {
    color: #FF9800;
    font-size: 18px;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid #FF9800;
    display: flex;
    align-items: center;
    gap: 8px;
}

.diagnosis-content {
    color: #fff;
    font-size: 13px;
    line-height: 1.6;
    font-family: 'Courier New', monospace;
    white-space: pre-wrap;
    background: rgba(0, 0, 0, 0.3);
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    max-height: 300px;
    overflow-y: auto;
}

.diagnosis-close {
    width: 100%;
    padding: 10px;
    background: #f44336;
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: bold;
}

.diagnosis-close:hover {
    background: #d32f2f;
}

/* 测试结果标记 */
.test-result {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin-right: 8px;
    text-align: center;
    line-height: 20px;
    font-size: 12px;
}

.test-result.passed {
    background: #4CAF50;
    color: white;
}

.test-result.failed {
    background: #f44336;
    color: white;
}

.test-result.pending {
    background: #FF9800;
    color: white;
}

/* 进度条 */
.test-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    margin: var(--space-sm) 0;
    overflow: hidden;
}

.test-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* 响应式调整 */
@media (max-width: 768px) {
    #test-panel {
        width: 260px;
        right: 10px;
    }
    
    .test-btn {
        font-size: 11px;
        padding: 8px 4px;
    }
    
    .test-btn i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    #test-panel {
        width: 240px;
        top: 95px;
    }
    
    .test-grid {
        grid-template-columns: 1fr;
    }
}

.test-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 每排三个按钮 */
    gap: 10px; /* 按钮之间的间距 */
    margin-top: 10px;
}
.test-btn {
    font-size: 12px;
    padding: 8px;
    border-radius: 5px;
    background-color: #f0f0f0;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
