.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: opposite-color-calculator --- */
.color-calculator {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: auto;
    padding: 2rem 0;
}

.color-preview {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    border: 3px solid #fff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.color-preview:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.color-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.color-preview:hover::before {
    opacity: 1;
}

.color-input-group {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.color-input {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    background: #fff;
}

.color-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    transform: scale(1.02);
}

.rgb-input {
    width: 80px;
    margin: 0 5px;
}

.hex-input {
    width: 120px;
    font-family: 'Courier New', monospace;
}

.color-label {
    font-weight: 700;
    font-size: 1.2rem;
    color: #495057;
    margin-bottom: 1rem;
    text-align: center;
}

.action-btn {
    background: linear-gradient(45deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 2rem;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
    color: white;
}

.copy-btn {
    background: linear-gradient(45deg, #11998e 0%, #38ef7d 100%);
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    color: white;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: scale(1.05);
    color: white;
}

.preset-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.preset-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: 2px solid #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.preset-color:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.color-info {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.color-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.color-info-label {
    font-weight: 600;
    color: #6c757d;
}

.color-info-value {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #495057;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
}

.toast {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

@media (max-width: 768px) {
    .color-preview {
        height: 150px;
    }
    
    .rgb-input {
        width: 60px;
        margin: 0 2px;
    }
    
    .hex-input {
        width: 100px;
    }
    
    .preset-color {
        width: 35px;
        height: 35px;
    }
}
