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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #2a0a2a;
    color: #ffffff;
    overflow-x: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.app-title {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #ff69b4, #00ffff, #ffff00);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(255, 105, 180, 0.5);
}

.header-controls {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-controls label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #cccccc;
}

.pattern-buttons {
    display: flex;
    gap: 0.5rem;
}

.pattern-btn {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pattern-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.pattern-btn.active {
    background: linear-gradient(45deg, #ff69b4, #00ffff);
    border-color: transparent;
}

.main-container {
    display: flex;
    height: calc(100vh - 120px);
}

.side-panel {
    width: 300px;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.control-section {
    margin-bottom: 2rem;
}

.control-section h3 {
    color: #ff69b4;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.color-controls {
    display: grid;
    gap: 0.8rem;
}

.color-controls label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #cccccc;
}

.color-controls input[type="color"] {
    width: 40px;
    height: 30px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 1rem;
}

.preset-buttons button {
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.preset-buttons button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.control-section label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.8rem;
    color: #cccccc;
}

.control-section input[type="range"] {
    width: 120px;
}

.control-section select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 0.3rem;
    border-radius: 4px;
}

.canvas-container {
    flex: 1;
    position: relative;
    background: radial-gradient(circle at center, rgba(255, 105, 180, 0.1) 0%, transparent 70%);
}

#canvas {
    width: 100%;
    height: 100%;
    cursor: crosshair;
    transition: filter 0.3s ease;
}

#canvas:hover {
    filter: brightness(1.1);
}

.bottom-toolbar {
    display: flex;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.bottom-toolbar button {
    padding: 0.8rem 1.5rem;
    background: linear-gradient(45deg, rgba(255, 105, 180, 0.3), rgba(0, 255, 255, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bottom-toolbar button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 105, 180, 0.4);
}

.bottom-toolbar button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-controls {
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .side-panel {
        width: 250px;
    }
    
    .app-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .side-panel {
        width: 100%;
        max-height: 200px;
        order: 2;
    }
    
    .canvas-container {
        order: 1;
        height: 60vh;
    }
    
    .header-controls {
        font-size: 0.9rem;
    }
    
    .pattern-buttons {
        flex-wrap: wrap;
    }
    
    .bottom-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .bottom-toolbar button {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Fullscreen styles */
:fullscreen {
    background: #2a0a2a;
}

:fullscreen .header,
:fullscreen .side-panel,
:fullscreen .bottom-toolbar {
    display: none;
}

:fullscreen .main-container {
    height: 100vh;
}

:fullscreen .canvas-container {
    width: 100%;
}

/* Animation for controls fade-in */
@keyframes fadeInControls {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-controls > * {
    animation: fadeInControls 0.5s ease forwards;
}

.side-panel {
    animation: fadeInControls 0.8s ease forwards;
}

.bottom-toolbar {
    animation: fadeInControls 1s ease forwards;
}

/* Scrollbar styling */
.side-panel::-webkit-scrollbar {
    width: 6px;
}

.side-panel::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #ff69b4, #00ffff);
    border-radius: 3px;
}

.side-panel::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #ff1493, #00bfff);
}