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

body {
    font-family: 'Inter', 'Poppins', sans-serif;
    background: linear-gradient(135deg, #0B1426 0%, #1A2332 100%);
    color: #E8E8E8;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: rgba(11, 20, 38, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 217, 255, 0.2);
}

.title-section {
    position: relative;
    display: flex;
    align-items: center;
}

.app-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #00D9FF;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.5);
    margin: 0;
}

.particles-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.3;
}

.export-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.export-btn {
    padding: 0.5rem 1rem;
    background: linear-gradient(45deg, #00D9FF, #00B8CC);
    color: #0B1426;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 217, 255, 0.4);
}

.preset-select {
    padding: 0.5rem 1rem;
    background: rgba(26, 35, 50, 0.8);
    color: #E8E8E8;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
}

/* Main Content */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.left-panel, .right-panel {
    width: 280px;
    background: rgba(11, 20, 38, 0.95);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    overflow-y: auto;
    border-right: 1px solid rgba(0, 217, 255, 0.1);
}

.right-panel {
    border-right: none;
    border-left: 1px solid rgba(0, 217, 255, 0.1);
}

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

.control-section h3 {
    color: #00D9FF;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

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

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

.slider {
    width: 100%;
    height: 6px;
    background: rgba(26, 35, 50, 0.8);
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #00D9FF, #FF6B6B);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: linear-gradient(45deg, #00D9FF, #FF6B6B);
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.radio-group input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: #00D9FF;
}

.radio-group label {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.shape-select, .color-picker {
    width: 100%;
    padding: 0.5rem;
    background: rgba(26, 35, 50, 0.8);
    color: #E8E8E8;
    border: 1px solid rgba(0, 217, 255, 0.3);
    border-radius: 6px;
}

.color-picker {
    height: 40px;
    cursor: pointer;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #00D9FF;
}

/* Canvas Area */
.canvas-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
}

#canvas {
    background: linear-gradient(135deg, #0B1426 0%, #1A2332 100%);
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    cursor: crosshair;
}

.canvas-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 800px;
    margin-top: 1rem;
}

.zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.zoom-controls button {
    width: 30px;
    height: 30px;
    background: rgba(0, 217, 255, 0.2);
    border: 1px solid rgba(0, 217, 255, 0.5);
    border-radius: 50%;
    color: #00D9FF;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.zoom-controls button:hover {
    background: rgba(0, 217, 255, 0.3);
    transform: scale(1.1);
}

#zoom-level {
    color: #B0B0B0;
    font-size: 0.9rem;
    min-width: 40px;
    text-align: center;
}

.grid-toggle {
    display: flex;
    align-items: center;
    color: #B0B0B0;
    font-size: 0.9rem;
    cursor: pointer;
}

.grid-toggle input[type="checkbox"] {
    margin-right: 0.5rem;
    accent-color: #00D9FF;
}

/* Timeline Panel */
.timeline-panel {
    background: rgba(11, 20, 38, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 217, 255, 0.1);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.timeline-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.play-btn, .loop-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 217, 255, 0.2);
    border: 2px solid #00D9FF;
    border-radius: 50%;
    color: #00D9FF;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover, .loop-btn:hover {
    background: rgba(0, 217, 255, 0.3);
    transform: scale(1.05);
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #B0B0B0;
    font-size: 0.9rem;
}

.speed-control .slider {
    width: 100px;
}

.timeline {
    flex: 1;
    max-width: 500px;
}

.timeline-track {
    height: 6px;
    background: rgba(26, 35, 50, 0.8);
    border-radius: 3px;
    position: relative;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, #00D9FF, #FF6B6B);
    border-radius: 3px;
    width: 0%;
    transition: width 0.1s ease;
}

.timeline-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

/* Scrollbar Styling */
.left-panel::-webkit-scrollbar,
.right-panel::-webkit-scrollbar {
    width: 6px;
}

.left-panel::-webkit-scrollbar-track,
.right-panel::-webkit-scrollbar-track {
    background: rgba(11, 20, 38, 0.5);
}

.left-panel::-webkit-scrollbar-thumb,
.right-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 217, 255, 0.3);
    border-radius: 3px;
}

.left-panel::-webkit-scrollbar-thumb:hover,
.right-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 217, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .left-panel, .right-panel {
        width: 250px;
    }
    
    .canvas-area {
        padding: 0.5rem;
    }
    
    #canvas {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 900px) {
    .main-content {
        flex-direction: column;
    }
    
    .left-panel, .right-panel {
        width: 100%;
        height: 200px;
        order: 2;
    }
    
    .canvas-area {
        order: 1;
        min-height: 400px;
    }
    
    .header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .export-controls {
        flex-wrap: wrap;
    }
}

/* Animation Effects */
@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

.particles-bg::before {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00D9FF;
    border-radius: 50%;
    animation: pulse 2s infinite;
    top: 20%;
    left: 10%;
}

.particles-bg::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: #FF6B6B;
    border-radius: 50%;
    animation: pulse 1.5s infinite 0.5s;
    top: 60%;
    right: 15%;
}

/* Hover Effects */
.control-group:hover label {
    color: #00D9FF;
    transition: color 0.2s ease;
}

.export-btn:active {
    transform: translateY(0);
}

/* Focus States */
.slider:focus,
.shape-select:focus,
.color-picker:focus,
.preset-select:focus {
    outline: 2px solid rgba(0, 217, 255, 0.5);
    outline-offset: 2px;
}