:root {
    --primary-color: #bb86fc;
    --secondary-color: #03dac6;
    --background-color: #121212;
    --surface-color: #1e1e1e;
    --text-color: #ffffff;
    --error-color: #cf6679;
}

body {
    height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.container {
    padding: 30px;
    text-align: center;
    background-color: var(--surface-color);
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.container:hover {
    transform: translateY(-5px);
}

h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 2.5em;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

#pixelCanvas {
    border: 2px solid var(--secondary-color);
    border-radius: 10px;
    cursor: crosshair;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

#pixelCanvas:hover {
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.controls {
    margin-top: 30px;
}

.color-picker {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.color-option {
    width: 40px;
    height: 40px;
    margin: 5px;
    cursor: pointer;
    border-radius: 50%;
    border: 3px solid var(--surface-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--primary-color);
    transform: scale(1.2);
}

#customColorPicker {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 50px;
    height: 50px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

#customColorPicker::-webkit-color-swatch {
    border-radius: 50%;
    border: 3px solid var(--surface-color);
}

#customColorPicker::-moz-color-swatch {
    border-radius: 50%;
    border: 3px solid var(--surface-color);
}

button {
    margin: 10px;
    padding: 12px 24px;
    font-size: 16px;
    color: var(--background-color);
    background-color: var(--primary-color);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

#pixelSize {
    margin: 20px 0;
    width: 200px;
    -webkit-appearance: none;
    background: var(--surface-color);
    outline: none;
    opacity: 0.7;
    transition: opacity 0.2s;
    border-radius: 12px;
}

#pixelSize:hover {
    opacity: 1;
}

#pixelSize::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

#pixelSize::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: var(--primary-color);
    cursor: pointer;
    border-radius: 50%;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 120px;
    background-color: var(--surface-color);
    color: var(--text-color);
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}
