/* 鼠标测试区域样式 */
.mouse-test-area {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 40px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: crosshair;
    user-select: none;
    position: relative;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.mouse-test-area:hover {
    box-shadow: 0 10px 40px rgba(102, 126, 234, 0.4);
}

.mouse-test-area.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    border-radius: 0;
    margin: 0;
}

/* 全屏模式下的统计面板 */
.fullscreen-stats {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    background: rgba(255,255,255,0.15);
    padding: 15px 25px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.fullscreen-stat {
    text-align: center;
    color: white;
}

.fullscreen-stat .fs-label {
    font-size: 11px;
    opacity: 0.8;
}

.fullscreen-stat .fs-value {
    font-size: 20px;
    font-weight: bold;
}

/* 全屏模式移动端适配 */
@media (max-width: 768px) {
    .fullscreen-stats {
        gap: 10px;
        padding: 10px 15px;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 90%;
    }
    
    .fullscreen-stat .fs-label {
        font-size: 10px;
    }
    
    .fullscreen-stat .fs-value {
        font-size: 16px;
    }
}

/* 鼠标可视化 */
.mouse-visual {
    margin-bottom: 30px;
}

.mouse-shape {
    position: relative;
    width: 120px;
    height: 180px;
}

.mouse-body {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 140px;
    background: linear-gradient(180deg, #f0f0f0 0%, #d0d0d0 100%);
    border-radius: 50px 50px 50px 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3), inset 0 2px 10px rgba(255,255,255,0.5);
}

.mouse-button {
    position: absolute;
    top: 0;
    width: 40px;
    height: 70px;
    background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 100%);
    border-radius: 20px 20px 5px 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1;
}

.mouse-button.left {
    left: 10px;
}

.mouse-button.right {
    right: 10px;
}

.mouse-button.middle {
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 35px;
    top: 10px;
    border-radius: 10px;
    background: linear-gradient(180deg, #666 0%, #444 100%);
}

.mouse-button.active {
    background: linear-gradient(180deg, #4CAF50 0%, #45a049 100%);
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.mouse-button.middle.active {
    transform: translateX(-50%) scale(0.95);
}

.btn-label {
    font-size: 11px;
    color: #666;
    font-weight: bold;
}

.mouse-button.middle .btn-label {
    display: none;
}

.scroll-indicator {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    z-index: 2;
}

.scroll-indicator span {
    font-size: 14px;
    color: #999;
    transition: all 0.2s ease;
}

.scroll-indicator .scroll-up.active {
    color: #4CAF50;
    transform: scale(1.3);
}

.scroll-indicator .scroll-down.active {
    color: #4CAF50;
    transform: scale(1.3);
}

.test-hint {
    color: white;
    text-align: center;
}

.test-hint p {
    margin: 5px 0;
    font-size: 18px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.test-hint .sub-hint {
    font-size: 14px;
    opacity: 0.8;
}

/* 统计面板 */
.stats-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.stats-panel h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.stat-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item.highlight {
    animation: highlight 0.3s ease;
}

@keyframes highlight {
    0% { background: white; }
    50% { background: #e8f5e9; }
    100% { background: white; }
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    margin-right: 12px;
    color: white;
}

.left-icon { background: linear-gradient(135deg, #667eea, #764ba2); }
.middle-icon { background: linear-gradient(135deg, #11998e, #38ef7d); }
.right-icon { background: linear-gradient(135deg, #f093fb, #f5576c); }
.double-icon { background: linear-gradient(135deg, #4facfe, #00f2fe); font-size: 12px; }
.scroll-up-icon { background: linear-gradient(135deg, #fa709a, #fee140); }
.scroll-down-icon { background: linear-gradient(135deg, #a8edea, #fed6e3); color: #666; }

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 12px;
    color: #888;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* 位置面板 */
.position-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.position-panel h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
}

.position-info {
    display: flex;
    gap: 30px;
    font-size: 16px;
}

.position-info strong {
    color: #667eea;
    font-size: 20px;
    min-width: 60px;
    display: inline-block;
}

/* 日志面板 */
.log-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.log-panel h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.clear-log-btn {
    font-size: 12px;
    padding: 4px 10px;
    background: #eee;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
}

.clear-log-btn:hover {
    background: #ddd;
}

.log-container {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 15px;
    max-height: 200px;
    overflow-y: auto;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.log-empty {
    color: #666;
    text-align: center;
    padding: 20px;
}

.log-item {
    padding: 4px 0;
    border-bottom: 1px solid #333;
    color: #ddd;
}

.log-item:last-child {
    border-bottom: none;
}

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

.log-event {
    color: #4CAF50;
}

.log-event.left { color: #667eea; }
.log-event.middle { color: #11998e; }
.log-event.right { color: #f5576c; }
.log-event.double { color: #4facfe; }
.log-event.scroll-up { color: #fa709a; }
.log-event.scroll-down { color: #a8edea; }
.log-event.reset { color: #ffc107; }

/* 检测结果面板 */
.result-panel {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.result-panel h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.result-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.result-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

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

.result-icon.pending {
    color: #ccc;
}

.result-icon.success {
    color: #4CAF50;
}

.result-text {
    font-size: 14px;
    color: #666;
}

.all-pass-hint {
    margin-top: 15px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #4CAF50, #45a049);
    border-radius: 8px;
    color: white;
    font-weight: bold;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

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

/* 按钮样式优化 */
.m5 .button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.m5 .secondary {
    background: #f0f0f0;
    color: #333;
}

.m5 .secondary:hover {
    background: #e0e0e0;
}

/* 响应式 */
@media (max-width: 768px) {
    .mouse-test-area {
        padding: 30px 20px;
        min-height: 250px;
    }

    .mouse-shape {
        transform: scale(0.85);
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .position-info {
        flex-direction: column;
        gap: 10px;
    }
}
