.color-picker-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 15px;
}
.canvas-section {
    flex: 1;
    min-width: 300px;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.canvas-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: repeating-conic-gradient(#e0e0e0 0% 25%, #fff 0% 50%) 50% / 16px 16px;
    border-radius: 8px;
    min-height: 300px;
    overflow: hidden;
    cursor: crosshair;
}
#imageCanvas {
    max-width: 100%;
    max-height: 500px;
    display: none;
}
.upload-placeholder {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}
.upload-placeholder .icon {
    font-size: 64px;
    margin-bottom: 20px;
}
.color-panel {
    width: 320px;
    min-width: 280px;
    background: #fff;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.current-color-preview {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    background: #e0e0e0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
    cursor: pointer;
}
.current-color-preview:hover {
    opacity: 0.9;
}
.color-info-grid {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}
.color-info-item {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'Consolas', monospace;
    font-size: 13px;
}
.color-info-item .label {
    font-weight: 600;
    width: 55px;
    color: #555;
}
.color-info-item .value {
    flex: 1;
    word-break: break-all;
}
.color-info-item .copy-btn {
    padding: 4px 8px;
    font-size: 12px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}
.color-info-item .copy-btn:hover {
    background: #0056b3;
}
.color-history {
    margin-top: 15px;
}
.color-history h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
}
.history-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.history-color {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.history-color:hover {
    transform: scale(1.1);
    border-color: #007bff;
}
.related-colors {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.related-colors h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #333;
}
.related-color-group {
    margin-bottom: 20px;
}
.related-color-group .group-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}
.related-color-items {
    display: flex;
    gap: 6px;
}
.related-color-item {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.related-color-item:hover {
    transform: scale(1.1);
}
.related-color-item::after {
    content: attr(data-hex);
    position: absolute;
    bottom: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: #888;
    white-space: nowrap;
    pointer-events: none;
}
.upload-area {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
.zoom-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}
.zoom-control label {
    font-size: 13px;
    color: #666;
}
.zoom-control input[type="range"] {
    flex: 1;
}
.ai-section {
    margin-top: 20px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: #fff;
}
.ai-section h4 {
    margin: 0 0 12px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ai-section .btn-ai {
    width: 100%;
    padding: 10px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}
.ai-section .btn-ai:hover {
    background: rgba(255,255,255,0.3);
}
.ai-section .btn-ai:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.ai-section select option {
    background: #fff;
    color: #333;
}
.ai-result {
    margin-top: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.6;
    display: none;
}
.magnifier {
    position: fixed;
    width: 120px;
    height: 120px;
    border: 3px solid #fff;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    display: none;
    z-index: 1000;
    overflow: hidden;
}
.magnifier-canvas {
    width: 100%;
    height: 100%;
}
.magnifier-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border: 2px solid #000;
    background: transparent;
}
.magnifier-info {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.8);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
}
.image-url-input {
    flex: 1;
    min-width: 200px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}
.btn-load-url {
    padding: 8px 16px;
    background: #28a745;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.btn-load-url:hover {
    background: #218838;
}
.btn-load-url:disabled {
    background: #6c757d;
    cursor: not-allowed;
}
.image-info {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    display: none;
}
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    font-size: 14px;
    color: #666;
    z-index: 10;
}
@media (max-width: 768px) {
    .color-picker-container {
        flex-direction: column;
    }
    .color-panel {
        width: 100%;
    }
}
