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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    margin-bottom: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1rem;
    color: #718096;
}

main {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.color-section {
    margin-bottom: 40px;
}

.color-input-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
}

.color-picker-container {
    flex: 1;
    text-align: center;
}

.color-picker-container label {
    display: block;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

.color-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.color-preview {
    width: 120px;
    height: 120px;
    border-radius: 60px;
    border: 4px solid #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.color-preview:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.color-palette {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.color-chip {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 2px solid #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.color-chip:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-color: #667eea;
}

.color-chip.selected {
    border-color: #667eea;
    border-width: 3px;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.3);
}

.custom-color-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.custom-color-section label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

.custom-color-section input[type="color"] {
    width: 80px;
    height: 80px;
    border: 4px solid #ffffff;
    border-radius: 40px;
    cursor: pointer;
    outline: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    background: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.custom-color-section input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
    border: none;
    border-radius: 36px;
    overflow: hidden;
}

.custom-color-section input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 36px;
}

.custom-color-section input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 36px;
}

.custom-color-section input[type="color"]:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.color-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.color-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
    margin-bottom: 5px;
}

.rgb-value, .hex-value {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Roboto Mono', monospace;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(102, 126, 234, 0.2);
    text-align: center;
    backdrop-filter: blur(5px);
}

.mix-symbol {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.mix-icon {
    font-size: 2.5rem;
    margin-bottom: 8px;
    animation: sparkle 2s infinite;
}

.mix-text {
    font-size: 1rem;
    font-weight: 700;
    color: #4a5568;
    background: linear-gradient(135deg, #667eea, #764ba2);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

@keyframes sparkle {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(180deg); }
}

.result-section {
    text-align: center;
}

.result-arrow {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 20px;
}

.result-container {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.05);
}

.result-container h3 {
    font-size: 1.5rem;
    color: #4a5568;
    margin-bottom: 20px;
}

.result-preview {
    width: 200px;
    height: 120px;
    border-radius: 15px;
    margin: 0 auto 20px;
    border: 3px solid #e2e8f0;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-info {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.result-rgb, .result-hex {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    background: #667eea;
    color: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.ratio-section {
    margin-top: 40px;
    text-align: center;
}

.ratio-section label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 20px;
}

.ratio-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.ratio-label {
    font-size: 1rem;
    color: #718096;
    font-weight: 500;
}

#ratio {
    width: 300px;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    outline: none;
    cursor: pointer;
}

#ratio::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #667eea;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.3);
}

.ratio-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #4a5568;
    background: #f7fafc;
    padding: 10px 20px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    display: inline-block;
}

footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

footer p {
    font-size: 1rem;
    color: #718096;
}

@media (max-width: 768px) {
    .color-input-group {
        flex-direction: column;
        gap: 30px;
    }
    
    .mix-symbol {
        margin: 20px 0;
    }
    
    .mix-icon {
        transform: rotate(90deg);
    }
    
    .color-palette {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
        padding: 12px;
    }
    
    .color-chip {
        width: 35px;
        height: 35px;
        border-radius: 17px;
    }
    
    .color-preview {
        width: 100px;
        height: 100px;
        border-radius: 50px;
    }
    
    .result-info {
        flex-direction: column;
        gap: 15px;
    }
    
    #ratio {
        width: 250px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 15px;
    }
    
    main {
        padding: 30px 20px;
    }
} 