.tool-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Tool shell */
.develop-tool {
    max-width: 100%;
    margin: 0 auto;
}

.develop-tool.editor-section,
.editor-section.develop-tool {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.develop-tool .card:not(.result-card) {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius, 12px);
    background: var(--color-surface, #fff);
}

.develop-tool .card-body {
    padding: 1.25rem 1.35rem;
}

.develop-tool .card-title {
    color: var(--color-text, #1f2937);
    font-weight: 700;
    font-size: 1.05rem;
}

.develop-tool .form-control,
.develop-tool .form-select,
.develop-tool .select-input,
.develop-tool textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.develop-tool .form-control:focus,
.develop-tool .form-select:focus,
.develop-tool textarea:focus {
    border-color: var(--color-primary, #0d9488);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.develop-tool .btn-primary {
    background: var(--color-primary, #0d9488);
    border-color: var(--color-primary, #0d9488);
}

.develop-tool .btn-primary:hover {
    background: var(--color-primary-hover, #0f766e);
    border-color: var(--color-primary-hover, #0f766e);
}

.develop-tool .alert {
    border-radius: 10px;
}

[data-theme="dark"] .develop-tool .card:not(.result-card) {
    background: var(--color-surface, #1f2937);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .develop-tool .card-title,
[data-theme="dark"] .develop-tool .form-label,
[data-theme="dark"] .develop-tool {
    color: var(--color-text, #f9fafb);
}

[data-theme="dark"] .develop-tool .text-muted,
[data-theme="dark"] .develop-tool .form-text {
    color: var(--color-text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .develop-tool .form-control,
[data-theme="dark"] .develop-tool .form-select,
[data-theme="dark"] .develop-tool textarea {
    background: #111827;
    color: var(--color-text, #f9fafb);
    border-color: var(--color-border, #374151);
}

/* --- tool: mouse-test --- */
.tool-mouse-test-full {
    max-width: 1200px;
    margin: 0 auto;
}

.mouse-test-area {
    width: 100%;
    height: 300px;
    border: 3px dashed #dee2e6;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    cursor: crosshair;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.mouse-test-area:hover {
    border-color: #007bff;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.mouse-test-area.active {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.test-instructions {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    font-weight: 500;
}

.button-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.status-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.status-item:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.status-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.status-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #6c757d;
    transition: all 0.2s ease;
}

.status-indicator[data-status="pressed"] {
    background: #dc3545;
    box-shadow: 0 0 10px rgba(220, 53, 69, 0.5);
    transform: scale(1.2);
}

.status-indicator[data-status="released"] {
    background: #6c757d;
}

.position-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.info-label {
    font-weight: 600;
    color: #495057;
}

.info-value {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    color: #007bff;
    background: #e3f2fd;
    padding: 2px 8px;
    border-radius: 4px;
    min-width: 60px;
    text-align: center;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: white;
    font-size: 1.5rem;
}

.stat-content {
    flex: 1;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: bold;
    color: #212529;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 4px;
}

.btn {
    border-radius: 8px;
    padding: 10px 20px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .mouse-test-area {
        height: 200px;
    }
    
    .button-status-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.status-indicator[data-status="pressed"] {
    animation: pulse 0.3s ease-in-out;
}

/* 测试区域激活状态 */
.mouse-test-area.testing {
    border-color: #28a745;
    background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
}

.mouse-test-area.testing::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(40, 167, 69, 0.1) 50%, transparent 70%);
    animation: scan 2s linear infinite;
}

@keyframes scan {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}
