:root {
    --primaryColor: #7289da;
    --secondaryColor: #5a69a9;
    --backgroundColor: #1a1a1a;
    --textColor: #f0f0f0;
    --borderColor: #333;
    --successColor: #43c565;
    --hoverColor: #222;
    --cardBackground: #252525;
    --codeBackground: #2a2a2a;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    transition: background-color var(--transition-speed), color var(--transition-speed);
}

body {
    font-family: 'Inter', 'Nunito', sans-serif;
    line-height: 1.6;
    color: var(--textColor);
    background-color: var(--backgroundColor);
    padding: 20px;
    min-height: 100vh;
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-top: 20px;
}

h1, h2, h3 {
    margin-bottom: 15px;
    color: var(--primaryColor);
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    position: relative;
    display: inline-block;
}

h1:after {
    content: '';
    position: absolute;
    width: 60%;
    height: 3px;
    background: var(--primaryColor);
    bottom: -5px;
    left: 20%;
}

main {
    display: flex;
    flex-direction: column;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.controls-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.color-inputs, .options {
    flex: 1;
    min-width: 300px;
    background: var(--cardBackground);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--borderColor);
}

.color-inputs:hover, .options:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.color-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.color-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.color-input {
    width: 60px;
    height: 36px;
    border: 1px solid var(--borderColor);
    padding: 0;
    cursor: pointer;
    border-radius: 4px;
    transition: transform 0.2s;
}

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

.color-hex {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 6px;
    font-family: 'Roboto Mono', monospace;
    font-size: 14px;
    transition: border-color 0.3s;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--textColor);
}

.color-hex:focus {
    outline: none;
    border-color: var(--primaryColor);
    box-shadow: 0 0 0 2px rgba(114, 137, 218, 0.3);
}

.color-actions {
    display: flex;
    gap: 6px;
}

button {
    background-color: var(--primaryColor);
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

button:hover {
    background-color: var(--secondaryColor);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

button.delete {
    background-color: #e74c3c;
    padding: 6px 10px;
}

button.delete:hover {
    background-color: #c0392b;
}

button.move {
    background-color: #3498db;
    padding: 6px 10px;
}

button.move:hover {
    background-color: #2980b9;
}

#add-color {
    width: 100%;
    margin-top: 5px;
}

#add-color:before {
    content: '+';
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 8px;
}

.option-group {
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primaryColor);
}

input, select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--borderColor);
    border-radius: 6px;
    background-color: rgba(0, 0, 0, 0.2);
    color: var(--textColor);
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primaryColor);
    box-shadow: 0 0 0 2px rgba(114, 137, 218, 0.3);
}

input[type="range"] {
    height: 10px;
    -webkit-appearance: none;
    appearance: none;
    background: linear-gradient(to right, var(--primaryColor), var(--secondaryColor));
    border-radius: 8px;
    padding: 0;
    border: none;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primaryColor);
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--primaryColor);
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.2);
}

#steps-value {
    display: inline-block;
    width: 40px;
    text-align: center;
    background-color: var(--primaryColor);
    color: white;
    border-radius: 6px;
    height: 28px;
    line-height: 28px;
    margin-left: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.output-container {
    background: var(--cardBackground);
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--borderColor);
}

#gradient-preview {
    height: 120px;
    border-radius: 8px;
    margin-bottom: 25px;
    border: 1px solid var(--borderColor);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s;
}

#gradient-preview:hover {
    transform: scale(1.01);
}

#color-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    justify-content: center;
}

.color-swatch {
    width: 90px;
    text-align: center;
    transition: transform 0.2s;
}

.color-swatch:hover {
    transform: translateY(-3px);
}

.swatch {
    height: 60px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid var(--borderColor);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
    cursor: pointer;
}

.swatch-hex {
    font-size: 14px;
    font-family: 'Roboto Mono', monospace;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.2s;
}

.swatch-hex:hover, .swatch:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primaryColor);
}

.copied {
    background-color: var(--successColor) !important;
    color: white !important;
    transition: all 0.3s;
}

.toast {
    visibility: hidden;
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(30, 30, 30, 0.9);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    z-index: 1000;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    color: #aaa;
    font-size: 14px;
}

@media (max-width: 768px) {
    main {
        gap: 20px;
        padding: 0 10px;
    }

    .controls-container {
        flex-direction: column;
    }

    .color-inputs, .options {
        width: 100%;
        min-width: unset;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .color-item {
        padding: 8px;
    }
    
    .color-actions {
        flex-direction: column;
    }
    
    #color-swatches {
        gap: 10px;
    }
    
    .color-swatch {
        width: 70px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    .color-input {
        width: 40px;
        height: 30px;
    }
    
    .color-hex {
        font-size: 12px;
    }
    
    button {
        padding: 8px 12px;
        font-size: 12px;
    }
}