.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-tool --- */
.color-converter-tool {
    max-width: 1200px;
    margin: 0 auto;
}

.color-preview-box {
    height: 80px;
    border-radius: 8px;
    background: linear-gradient(45deg, #007bff, #0056b3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
    transition: all 0.3s ease;
}

.color-preview-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.current-color {
    font-size: 1.2rem;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.result-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.result-card:hover {
    background: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.result-header {
    font-size: 0.875rem;
    font-weight: bold;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.result-value {
    font-family: 'Courier New', monospace;
    font-size: 0.875rem;
    color: #495057;
    word-break: break-all;
    margin-bottom: 0.5rem;
}

.color-palette-item {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.color-palette-item:hover {
    transform: scale(1.1);
    border-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.color-palette-item.active {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.3);
}

.form-control-color {
    height: 50px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.form-control-color:hover {
    border-color: #007bff;
    transform: scale(1.02);
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.btn {
    border-radius: 6px;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .color-preview-box {
        height: 60px;
    }
    
    .current-color {
        font-size: 1rem;
    }
    
    .result-card {
        padding: 0.75rem;
    }
}
