* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

/* Dark scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1a1a2e;
}

::-webkit-scrollbar-thumb {
    background: #4a4a6a;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a6a8a;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    display: flex;
    align-items: center;
    gap: 30px;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Back button with animated glow */
.back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.back-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s ease;
}

.back-btn:hover::before {
    left: 100%;
}

.back-btn:hover {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.8),
                0 0 40px rgba(118, 75, 162, 0.6),
                0 0 60px rgba(102, 126, 234, 0.4);
    transform: translateY(-2px);
}

.back-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-btn:hover .back-icon {
    transform: translateX(-4px);
}

/* Status bar */
.status-bar {
    background: rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.status-bar.success {
    border-left-color: #4caf50;
    background: rgba(76, 175, 80, 0.1);
}

.status-bar.error {
    border-left-color: #f44336;
    background: rgba(244, 67, 54, 0.1);
}

.status-bar.info {
    border-left-color: #2196f3;
    background: rgba(33, 150, 243, 0.1);
}

/* Main content */
.main-content {
    display: grid;
    grid-template-columns: 350px 1fr 300px;
    gap: 30px;
}

/* Left panel */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-wheel-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 0 auto;
}

#colorWheel {
    border-radius: 50%;
    cursor: crosshair;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.wheel-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid white;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
}

.color-sliders {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.slider-group:last-child {
    margin-bottom: 0;
}

.slider-group label {
    min-width: 80px;
    font-weight: 500;
}

.slider-group input[type="range"] {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    -webkit-appearance: none;
}

.slider-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

#redSlider {
    background: linear-gradient(90deg, #000, #ff0000);
}

#greenSlider {
    background: linear-gradient(90deg, #000, #00ff00);
}

#blueSlider {
    background: linear-gradient(90deg, #000, #0000ff);
}

.slider-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
}

/* Center panel */
.center-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-preview {
    display: flex;
    gap: 30px;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
}

.preview-box {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.1);
}

.color-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #a0a0a0;
}

.input-with-copy {
    display: flex;
    gap: 10px;
}

.input-with-copy input {
    flex: 1;
    padding: 12px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
}

.input-with-copy input:focus {
    outline: none;
    border-color: #667eea;
}

.copy-btn {
    padding: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.copy-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.copy-btn:active {
    transform: scale(0.95);
}

/* Color box */
.color-boxes {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.box-label {
    font-weight: 600;
    margin-bottom: 10px;
}

#colorBox {
    border-radius: 8px;
    cursor: crosshair;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.box-cursor {
    position: absolute;
    width: 15px;
    height: 15px;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    transform: translate(-50%, -50%);
    display: none;
}

/* Tools */
.tools {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.tool-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tool-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: #667eea;
    transform: translateY(-2px);
}

.tool-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.tool-btn.success {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    width: 100%;
    justify-content: center;
    margin-top: 20px;
}

.file-upload input[type="file"] {
    display: none;
}

/* Uploaded image */
.uploaded-image-container {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
}

.uploaded-image-container h3 {
    margin-bottom: 15px;
}

#uploadedCanvas {
    max-width: 100%;
    border-radius: 8px;
    cursor: crosshair;
}

.picked-color-display {
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.picked-color-swatch {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Right panel */
.right-panel {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 12px;
}

.scheme-designer h2 {
    margin-bottom: 20px;
    font-size: 1.5rem;
    background: linear-gradient(90deg, #00d4ff, #7b2cbf);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.scheme-designer .tool-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
}

.scheme-results {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
}

.scheme-color {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.scheme-color:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.scheme-preview {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.scheme-label {
    font-weight: 500;
}

/* Responsive */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .left-panel {
        order: 2;
    }
    
    .center-panel {
        order: 1;
    }
    
    .right-panel {
        order: 3;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .color-preview {
        flex-direction: column;
    }
    
    .preview-box {
        width: 100%;
        height: 100px;
    }
}
