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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0F1419 0%, #1A1F35 50%, #2D1B69 100%);
    color: #E8E8F0;
    min-height: 100vh;
    overflow-x: hidden;
}

.header {
    text-align: center;
    padding: 20px;
    position: relative;
}

.header h1 {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #00D4FF, #9B59B6, #FF6B6B);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.subtitle {
    font-size: 1.1rem;
    color: #B8BCC8;
    margin-bottom: 15px;
}

.berrry-link {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #00D4FF;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.berrry-link:hover {
    color: #FF6B6B;
    transform: scale(1.05);
}

.main-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 20px;
    padding: 0 20px;
    flex-wrap: wrap;
}

.canvas-container {
    flex: 1;
    min-width: 300px;
    position: relative;
    background: rgba(15, 20, 25, 0.8);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.canvas-overlay {
    position: absolute;
    top: 30px;
    left: 30px;
}

.overlay-btn {
    background: rgba(0, 212, 255, 0.2);
    border: 1px solid #00D4FF;
    color: #00D4FF;
    padding: 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.overlay-btn:hover {
    background: rgba(0, 212, 255, 0.3);
    transform: scale(1.05);
}

#canvas {
    display: block;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.control-panel {
    width: 320px;
    background: rgba(20, 25, 35, 0.9);
    border-radius: 15px;
    padding: 20px;
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: fit-content;
}

.control-section {
    margin-bottom: 25px;
}

.control-section h3 {
    color: #00D4FF;
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(0, 212, 255, 0.3);
    padding-bottom: 5px;
}

.color-presets {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 15px;
}

.color-preset {
    padding: 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.color-preset:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.control-group {
    margin-bottom: 15px;
}

.control-group label {
    display: block;
    margin-bottom: 8px;
    color: #D0D4DB;
    font-size: 0.95rem;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #2A2F3A;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00D4FF, #9B59B6);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #00D4FF, #9B59B6);
    cursor: pointer;
    border: none;
}

input[type="color"] {
    width: 60px;
    height: 30px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: none;
}

input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #00D4FF;
}

.action-btn {
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.2), rgba(155, 89, 182, 0.2));
    border: 1px solid rgba(0, 212, 255, 0.5);
    border-radius: 8px;
    color: #E8E8F0;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.action-btn:hover {
    background: linear-gradient(45deg, rgba(0, 212, 255, 0.3), rgba(155, 89, 182, 0.3));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

footer {
    text-align: center;
    padding: 30px 20px;
    color: #8A8FA3;
    font-size: 0.9rem;
}

footer a {
    color: #00D4FF;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #FF6B6B;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .berrry-link {
        position: static;
        display: block;
        margin-top: 10px;
    }
    
    .color-presets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .canvas-container {
        padding: 15px;
    }
    
    .control-panel {
        padding: 15px;
    }
    
    .header h1 {
        font-size: 1.8rem;
    }
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1A1F35;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #00D4FF, #9B59B6);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #FF6B6B, #00D4FF);
}