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

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

/* --- tool: color-matching-degree-calculator --- */
.color-matching-calculator {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.color-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 120px;
}

.color-swatch {
    width: 100px;
    height: 60px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.color-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.match-result {
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.match-percentage {
    font-size: 2.5rem;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.match-label {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
}

.form-range {
    height: 6px;
    border-radius: 3px;
}

.form-range::-webkit-slider-thumb {
    background: #007bff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
}

.form-range::-moz-range-thumb {
    background: #007bff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    border: none;
}

.form-control-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .color-swatch {
        width: 80px;
        height: 50px;
    }
    
    .match-percentage {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* 动画效果 */
.color-swatch {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 匹配度颜色指示 */
.match-percentage.high {
    color: #28a745;
}

.match-percentage.medium {
    color: #ffc107;
}

.match-percentage.low {
    color: #dc3545;
}
