* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', 'Helvetica', sans-serif;
}

body {
    background-color: #f0f9ff;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

h1 {
    text-align: center;
    color: #ff6b6b;
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #5f27cd;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

h3 {
    color: #ff9f43;
    margin-bottom: 10px;
}

.color-section, .result-section {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.05);
}

.primary-colors {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
}

.color-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    color: white;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.color-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.red {
    background-color: #ff0000;
}

.blue {
    background-color: #0000ff;
}

.yellow {
    background-color: #ffff00;
    color: #333;
    text-shadow: none;
}

.black {
    background-color: #000000;
}

.white {
    background-color: #ffffff;
    color: #333;
    text-shadow: none;
    border: 2px dashed #ccc;
}

.mixing-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.color-preview {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#color-display {
    width: 150px;
    height: 150px;
    border-radius: 15px;
    background-color: #eee;
    margin-bottom: 10px;
    border: 3px solid #ddd;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

#color-formula {
    text-align: center;
    font-weight: bold;
    color: #555;
}

.selected-colors {
    flex: 1;
    min-width: 200px;
}

#selected-colors-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    min-height: 50px;
}

.selected-color {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 5px;
    position: relative;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.selected-color::after {
    content: '×';
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #ff6b6b;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.selected-color:hover::after {
    opacity: 1;
}

button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-right: 10px;
    font-size: 1rem;
}

#mix-button {
    background-color: #4cd137;
    color: white;
}

#mix-button:hover:not([disabled]) {
    background-color: #44bd32;
    transform: scale(1.05);
}

#mix-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

#clear-button {
    background-color: #ff9f43;
    color: white;
}

#clear-button:hover {
    background-color: #ff9f43;
}

#save-color {
    background-color: #20bf6b;
    color: white;
}

#save-color:hover {
    background-color: #26de81;
}

.hidden {
    display: none;
}

#color-name-input {
    background-color: #f1f2f6;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

#new-color-name {
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    margin-right: 10px;
    width: 200px;
}

#created-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
}

.created-color {
    width: 120px;
    text-align: center;
    margin-bottom: 15px;
}

.color-swatch {
    width: 100px;
    height: 100px;
    border-radius: 10px;
    margin: 0 auto 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.2s;
    position: relative;
}

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

.color-swatch::after {
    content: '✓';
    position: absolute;
    top: -10px;
    right: -10px;
    background-color: #4cd137;
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
}

.color-swatch.selected::after {
    opacity: 1;
}

.color-name {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

@media (max-width: 600px) {
    .mixing-area {
        flex-direction: column;
    }
    
    .color-button {
        width: 80px;
        height: 80px;
    }
    
    #color-display {
        width: 120px;
        height: 120px;
    }
}

.reset-container {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

#reset-all {
    background-color: #eb4d4b;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s;
}

#reset-all:hover {
    background-color: #ff6b6b;
} 