* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    position: relative;
}

.header-content {
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.logo i {
    font-size: 2.5rem;
    color: #667eea;
}

.logo h1 {
    font-size: 2.5rem;
    color: #333;
    font-weight: 700;
}

.subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 20px;
}

.back-btn {
    position: absolute;
    top: 0;
    left: 0;
    padding: 12px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

/* Main Content */
.main-content {
    flex: 1;
    margin: 0 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Color Picker Section */
.color-picker-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.picker-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.color-display {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.current-color {
    width: 100%;
    height: 150px;
    border-radius: 15px;
    border: 3px solid #e1e5e9;
    background: #000000;
    position: relative;
    overflow: hidden;
}

.current-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    z-index: -1;
}

.color-info h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 20px;
}

.color-formats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.format-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.format-group label {
    min-width: 60px;
    font-weight: 600;
    color: #333;
}

.format-input {
    display: flex;
    flex: 1;
    gap: 10px;
}

.format-input input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.format-input input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.copy-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 8px;
    background: #f8f9fa;
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
    transform: scale(1.1);
}

/* Picker Controls */
.picker-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.color-canvas-container {
    position: relative;
    width: 300px;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    border: 3px solid #e1e5e9;
}

#color-canvas {
    display: block;
    cursor: crosshair;
}

.canvas-cursor {
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid white;
    border-radius: 50%;
    pointer-events: none;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3);
}

.hue-slider-container,
.alpha-slider-container {
    position: relative;
    width: 300px;
    height: 30px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid #e1e5e9;
}

#hue-canvas,
#alpha-canvas {
    display: block;
    cursor: pointer;
}

.hue-cursor,
.alpha-cursor {
    position: absolute;
    width: 4px;
    height: 100%;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.3);
    pointer-events: none;
    transform: translateX(-50%);
}

.input-controls {
    margin-top: 20px;
}

.rgb-controls h4 {
    margin-bottom: 15px;
    color: #333;
}

.slider-group {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 10px;
}

.slider-group label {
    min-width: 60px;
    font-weight: 500;
    color: #333;
}

.color-slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.color-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid #667eea;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.color-slider.red {
    background: linear-gradient(to right, #000, #ff0000);
}

.color-slider.green {
    background: linear-gradient(to right, #000, #00ff00);
}

.color-slider.blue {
    background: linear-gradient(to right, #000, #0000ff);
}

.color-slider.alpha {
    background: linear-gradient(to right, transparent, #000);
}

/* Harmony Section */
.harmony-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.harmony-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.harmony-header h3 {
    font-size: 1.4rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.harmony-header h3 i {
    color: #667eea;
}

.harmony-controls {
    display: flex;
    gap: 15px;
    align-items: center;
}

.harmony-controls select {
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    cursor: pointer;
}

.generate-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.generate-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.harmony-colors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.harmony-color {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.harmony-color:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.harmony-color-swatch {
    width: 100%;
    height: 80px;
    border-radius: 8px;
    margin-bottom: 15px;
    cursor: pointer;
    border: 2px solid #e1e5e9;
}

.harmony-color-info {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #666;
}

/* Palette Section */
.palette-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.palette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.palette-header h3 {
    font-size: 1.4rem;
    color: #333;
    display: flex;
    align-items: center;
    gap: 12px;
}

.palette-header h3 i {
    color: #667eea;
}

.palette-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.palette-btn {
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.palette-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.palette-container {
    min-height: 100px;
}

.palette-empty {
    text-align: center;
    padding: 40px;
    color: #666;
}

.palette-empty i {
    font-size: 2rem;
    margin-bottom: 15px;
    color: #ccc;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.palette-color {
    position: relative;
    height: 80px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
    overflow: hidden;
}

.palette-color:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.palette-color::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
        linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
        linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 10px 10px;
    background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
    z-index: -1;
}

.palette-color-remove {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    font-size: 0.8rem;
    color: #ff4444;
}

.palette-color:hover .palette-color-remove {
    opacity: 1;
}

/* Presets Section */
.presets-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.presets-header h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.presets-header h3 i {
    color: #667eea;
}

.presets-grid {
    display: grid;
    gap: 30px;
}

.preset-category h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e1e5e9;
}

.preset-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 10px;
}

.preset-color {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.preset-color:hover {
    transform: scale(1.2);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.2);
    z-index: 10;
    position: relative;
}

/* Tools Section */
.tools-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.tools-header h3 {
    font-size: 1.4rem;
    color: #333;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.tools-header h3 i {
    color: #667eea;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.tool-card {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.tool-icon {
    margin-bottom: 15px;
}

.tool-icon i {
    font-size: 2rem;
    color: #667eea;
}

.tool-card h4 {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 10px;
}

.tool-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* Contrast Checker */
.contrast-checker {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contrast-inputs {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.contrast-inputs input[type="color"] {
    width: 60px;
    height: 40px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.contrast-inputs input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.contrast-inputs input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 6px;
}

.contrast-result {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contrast-result .ratio {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
}

.contrast-result .rating {
    font-size: 0.9rem;
    padding: 4px 12px;
    border-radius: 15px;
    font-weight: 600;
    color: white;
}

.rating.aaa {
    background: #4caf50;
}

.rating.aa {
    background: #ff9800;
}

.rating.fail {
    background: #f44336;
}

/* Image Upload */
.image-upload {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.upload-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.extracted-colors {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.extracted-color {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    cursor: pointer;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.extracted-color:hover {
    transform: scale(1.2);
}

/* Random and CSS buttons */
.random-btn,
.css-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 5px;
}

.random-btn:hover,
.css-btn:hover {
    background: #5a6fd8;
    transform: translateY(-1px);
}

.css-generator {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

/* Footer */
.footer {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    text-align: center;
    padding: 20px;
    margin: 0 20px 20px;
    border-radius: 15px;
    color: #666;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.design-notice {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #4caf50;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse-animation {
    animation: pulse 0.3s ease;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .picker-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .color-canvas-container,
    .hue-slider-container,
    .alpha-slider-container {
        width: 100%;
        max-width: 400px;
    }
    
    #color-canvas {
        width: 100%;
        height: auto;
    }
    
    #hue-canvas,
    #alpha-canvas {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .container {
        margin: 0;
    }

    .header,
    .main-content,
    .footer {
        margin: 10px;
    }

    .header {
        padding: 20px;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .logo i {
        font-size: 2rem;
    }

    .back-btn {
        position: relative;
        margin-bottom: 20px;
        align-self: flex-start;
    }

    .color-picker-section,
    .harmony-section,
    .palette-section,
    .presets-section,
    .tools-section {
        padding: 20px;
    }

    .harmony-header,
    .palette-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }

    .harmony-controls,
    .palette-controls {
        justify-content: center;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .format-group {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .format-group label {
        min-width: auto;
    }

    .slider-group {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .slider-group label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .preset-colors {
        grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
        gap: 8px;
    }

    .preset-color {
        width: 30px;
        height: 30px;
    }

    .palette-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .palette-color {
        height: 60px;
    }

    .harmony-colors {
        grid-template-columns: 1fr;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Additional Color Picker Styles */
.rgb-inputs, .hsl-inputs, .hsv-inputs, .cmyk-inputs {
    display: flex;
    gap: 10px;
    align-items: center;
}

.rgb-inputs input, .hsl-inputs input, .hsv-inputs input, .cmyk-inputs input {
    flex: 1;
    padding: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #333;
    font-size: 14px;
    text-align: center;
    width: 50px;
}

.rgb-inputs input:focus, .hsl-inputs input:focus, .hsv-inputs input:focus, .cmyk-inputs input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.2);
}

.color-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    background: #000;
    cursor: pointer;
    transition: all 0.3s ease;
}

.color-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}

.btn-primary, .btn-secondary {
    padding: 12px 20px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    background: white;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-header h2 {
    color: #333;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header i {
    color: #667eea;
}

.palette-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-item {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-item:hover {
    transform: scale(1.1);
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.color-item.small {
    width: 30px;
    height: 30px;
}

.harmony-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

.color-history {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    min-height: 80px;
}

.current-palette {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
    min-height: 80px;
}

.saved-palettes {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.palette-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(5px);
}

.palette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.palette-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.delete-btn {
    background: #ff4757;
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.preset-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    backdrop-filter: blur(5px);
}

/* Image Upload Section */
.image-upload-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.upload-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.upload-area {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(102, 126, 234, 0.05);
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
}

.upload-area.dragover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.15);
    transform: scale(1.02);
}

.upload-content i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.upload-content h3 {
    color: #333;
    margin-bottom: 10px;
}

.upload-content p {
    color: #666;
    margin-bottom: 20px;
}

.image-preview-container {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.image-tools {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.image-canvas-container {
    position: relative;
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

#imageCanvas {
    max-width: 100%;
    max-height: 500px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    cursor: crosshair;
}

.eyedropper-cursor {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    pointer-events: none;
    display: none;
    z-index: 10;
}

.extracted-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    min-height: 60px;
}

.extracted-color {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.extracted-color:hover {
    transform: scale(1.1);
    border-color: #667eea;
}

.extracted-color::after {
    content: attr(data-color);
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #333;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.extracted-color:hover::after {
    opacity: 1;
}

/* Color Name Display */
.color-name {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 15px;
    text-align: center;
}

.color-name strong {
    color: #667eea;
}

#colorNameValue {
    color: #333;
    font-weight: 600;
}

/* Color Analysis Section */
.analysis-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.analysis-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(5px);
    text-align: center;
}

.analysis-card h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.analysis-card i {
    color: #667eea;
}

.temperature-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.temp-value {
    font-weight: 600;
    color: #333;
    font-size: 1.1rem;
}

.temp-indicator {
    width: 100px;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(90deg, #0077be 0%, #ffffff 50%, #ff6b35 100%);
    position: relative;
}

.temp-indicator::after {
    content: '';
    position: absolute;
    width: 8px;
    height: 14px;
    background: #333;
    border-radius: 2px;
    top: -2px;
    left: var(--position, 50%);
    transform: translateX(-50%);
    transition: left 0.3s ease;
}

.accessibility-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contrast-ratio {
    font-weight: 600;
    color: #333;
    padding: 10px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
}

.psychology-info {
    color: #333;
    font-style: italic;
    line-height: 1.4;
}

/* Responsive Design for New Features */
@media (max-width: 768px) {
    .upload-area {
        padding: 20px;
    }
    
    .upload-content i {
        font-size: 2rem;
    }
    
    .image-tools {
        justify-content: center;
    }
    
    .analysis-grid {
        grid-template-columns: 1fr;
    }
    
    .extracted-colors {
        justify-content: center;
    }
}

/* ColorHunt Style Palette Collection */
.colorhunt-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.palette-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover, .filter-btn.active {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
}

.palette-search {
    display: flex;
    gap: 20px;
    margin: 20px 0;
    align-items: center;
    flex-wrap: wrap;
}

.search-container {
    position: relative;
    flex: 1;
    min-width: 250px;
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
}

.search-container input {
    width: 100%;
    padding: 12px 12px 12px 45px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    font-size: 14px;
    transition: all 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.2);
}

.sort-options select {
    padding: 10px 15px;
    border: 2px solid rgba(102, 126, 234, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    color: #333;
    cursor: pointer;
}

.colorhunt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.palette-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.palette-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.palette-colors-strip {
    display: flex;
    height: 120px;
}

.palette-color {
    flex: 1;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
}

.palette-color:hover {
    transform: scale(1.05);
    z-index: 2;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.palette-color::after {
    content: attr(data-color);
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.palette-color:hover::after {
    opacity: 1;
}

.palette-info {
    padding: 15px;
}

.palette-title {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.palette-tags {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.palette-tag {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 500;
}

.palette-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 12px;
}

.palette-likes {
    display: flex;
    align-items: center;
    gap: 5px;
}

.palette-likes i {
    color: #ff6b6b;
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

/* Custom Palette Creator */
.palette-creator-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.palette-creator {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(5px);
}

.color-slots {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    justify-content: center;
}

.color-slot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
}

.color-slot .color-display {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.color-slot .color-display:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.color-slot input[type="color"] {
    width: 60px;
    height: 40px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background: transparent;
}

.remove-color {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s ease;
}

.remove-color:hover {
    background: #ff3742;
    transform: scale(1.1);
}

.add-color-slot {
    display: flex;
    align-items: center;
    justify-content: center;
}

.add-color-btn {
    width: 80px;
    height: 80px;
    border: 2px dashed #667eea;
    border-radius: 15px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.add-color-btn:hover {
    background: rgba(102, 126, 234, 0.2);
    transform: scale(1.05);
}

.add-color-btn span {
    font-size: 10px;
    font-weight: 500;
}

.palette-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced Palette Cards */
.palette-item {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 15px;
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.palette-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.palette-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.palette-header span {
    font-weight: 600;
    color: #333;
}

.palette-colors {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.palette-metadata {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #666;
}

.palette-date {
    font-style: italic;
}

.palette-copy-all {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: none;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s ease;
}

.palette-copy-all:hover {
    background: #667eea;
    color: white;
}