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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #1a0f2e 0%, #000000 100%);
    color: #ffffff;
    overflow-x: hidden;
}

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

.logo {
    font-family: 'Orbitron', monospace;
    font-size: 1.5rem;
    font-weight: 700;
    color: #00ffcc;
    text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

.export-menu {
    display: flex;
    gap: 1rem;
}

.export-btn {
    padding: 0.5rem 1rem;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid #00ffcc;
    color: #00ffcc;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.85rem;
}

.export-btn:hover {
    background: rgba(0, 255, 204, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.4);
    transform: translateY(-1px);
}

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

.canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.canvas-overlay {
    position: absolute;
    top: 1rem;
    right: 1rem;
    pointer-events: none;
}

.performance-indicator {
    background: rgba(0, 0, 0, 0.7);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #00ffcc;
    backdrop-filter: blur(5px);
}

.control-panel {
    width: 300px;
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 1.5rem;
    overflow-y: auto;
    border-left: 1px solid rgba(0, 255, 204, 0.2);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
}

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

.control-section h3 {
    font-family: 'Orbitron', monospace;
    color: #00ffcc;
    margin-bottom: 1rem;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.control-group {
    margin-bottom: 1rem;
}

.control-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #cccccc;
}

.slider {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.slider::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    background: #00ffcc;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
    transition: all 0.2s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.8);
}

.color-picker {
    width: 100%;
    height: 40px;
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 4px;
    background: transparent;
    cursor: pointer;
}

.select-input {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(0, 255, 204, 0.3);
    color: #ffffff;
    border-radius: 4px;
    cursor: pointer;
}

.select-input option {
    background: #2a2a2a;
    color: #ffffff;
}

.action-btn {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: rgba(255, 0, 128, 0.1);
    border: 1px solid #ff0080;
    color: #ff0080;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.action-btn:hover {
    background: rgba(255, 0, 128, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 128, 0.4);
    transform: translateY(-1px);
}

.preset-gallery {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(42, 42, 42, 0.95);
    backdrop-filter: blur(20px);
    padding: 1rem 2rem;
    border-top: 1px solid rgba(0, 255, 204, 0.2);
}

.preset-gallery h3 {
    font-family: 'Orbitron', monospace;
    color: #00ffcc;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.preset-container {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.preset-item {
    min-width: 120px;
    padding: 0.75rem 1rem;
    background: rgba(0, 255, 204, 0.1);
    border: 1px solid rgba(0, 255, 204, 0.3);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    font-size: 0.85rem;
    white-space: nowrap;
}

.preset-item:hover {
    background: rgba(0, 255, 204, 0.2);
    border-color: #00ffcc;
    box-shadow: 0 0 15px rgba(0, 255, 204, 0.3);
    transform: translateY(-2px);
}

/* Scrollbar styling */
.control-panel::-webkit-scrollbar,
.preset-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.control-panel::-webkit-scrollbar-track,
.preset-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

.control-panel::-webkit-scrollbar-thumb,
.preset-container::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 204, 0.5);
    border-radius: 3px;
}

/* Responsive design */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column;
    }
    
    .control-panel {
        width: 100%;
        height: 300px;
        order: 2;
    }
    
    .canvas-container {
        height: calc(100vh - 380px);
        order: 1;
    }
    
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .preset-gallery {
        position: relative;
        order: 3;
    }
}

/* Checkbox styling */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 0.5rem;
    accent-color: #00ffcc;
    cursor: pointer;
}

/* Animation classes */
@keyframes glow {
    0%, 100% { box-shadow: 0 0 5px rgba(0, 255, 204, 0.3); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 204, 0.6); }
}

.control-panel *:focus {
    outline: none;
    animation: glow 2s ease-in-out infinite;
}

/* Loading state */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}