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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

header {
    text-align: center;
    margin-bottom: 3rem;
}

header h1 {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 0.5rem;
}

header p {
    color: #fff;
}

.color-picker-container {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.color-controls {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.color-preview {
    width: 150px;
    height: 150px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #ddd;
}

.color-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 500;
    color: #2c3e50;
}

.input-group input {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

input[type="color"] {
    width: 100%;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.saved-colors-section {
    border-top: 1px solid #ddd;
    padding-top: 2rem;
    margin-bottom: 2rem;
}

.saved-colors-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.saved-colors-header h2 {
    color: #2c3e50;
}

.saved-colors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.color-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.05);
}

.color-harmonies {
    border-top: 1px solid #ddd;
    padding-top: 2rem;
}

.color-harmonies h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.harmony-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.harmony-color {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.harmony-swatch {
    width: 100%;
    aspect-ratio: 1;
    border-radius: 8px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
}

.harmony-swatch:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.harmony-label {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.tooltip {
    background-color: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    transform: translateX(-50%);
    animation: fadeInOut 1.5s ease;
    pointer-events: none;
    z-index: 1000;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateX(-50%) translateY(10px); }
    15% { opacity: 1; transform: translateX(-50%) translateY(0); }
    85% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-10px); }
}

.primary-btn,
.secondary-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background-color: #3498db;
    color: white;
    width: 100%;
}

.primary-btn:hover {
    background-color: #2980b9;
}

.secondary-btn {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.secondary-btn:hover {
    background-color: #bdc3c7;
}

.secondary-btn svg {
    width: 16px;
    height: 16px;
}

footer {
    text-align: center;
    margin-top: 3rem;
    color: #7f8c8d;
}

@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .color-preview {
        height: 100px;
    }
    
    .rgb-inputs {
        grid-template-columns: 1fr;
    }
    
    .hsl-slider {
        grid-template-columns: 30px 1fr 50px;
    }
}

.saved-color-wrapper {
    position: relative;
    width: 100%;
}

.remove-color-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 1;
}

.saved-color-wrapper:hover .remove-color-btn {
    opacity: 1;
}

.remove-color-btn:hover {
    background-color: #c0392b;
}