* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
}

body {
    background: radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
                #0a0a0a;
    color: #e5e7eb;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
}

.app-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #6366f1;
}

.app-title svg {
    width: 24px;
    height: 24px;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.status-badge {
    padding: 6px 12px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 4px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #22c55e;
}

/* Main Layout */
.app-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 320px;
    background: rgba(15, 15, 15, 0.9);
    border-right: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(100vh - 60px);
}

.sidebar-section {
    padding: 20px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6366f1;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title svg {
    width: 16px;
    height: 16px;
}

/* Control Group */
.control-group {
    margin-bottom: 20px;
    position: relative;
}

.control-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 12px;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.control-group label svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

.control-group.disabled {
    opacity: 0.3;
    pointer-events: none;
}

/* Select Wrapper */
.select-wrapper {
    position: relative;
    width: 100%;
}

select {
    width: 100%;
    padding: 10px 12px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    color: #e5e7eb;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    appearance: none;
    cursor: pointer;
    transition: all 0.2s;
}

select:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(25, 25, 25, 0.8);
}

select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.select-wrapper::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #6366f1;
    pointer-events: none;
}

/* Slider */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(20, 20, 20, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 4px;
}

.slider {
    flex-grow: 1;
    -webkit-appearance: none;
    height: 3px;
    background: rgba(99, 102, 241, 0.2);
    border-radius: 3px;
    outline: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: all 0.2s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.8);
}

.slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #6366f1;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

.slider-value {
    min-width: 45px;
    text-align: center;
    font-size: 13px;
    color: #6366f1;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.1);
    padding: 4px 8px;
    border-radius: 3px;
}

/* Buttons */
button {
    padding: 10px 16px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'JetBrains Mono', monospace;
}

button svg {
    width: 16px;
    height: 16px;
}

.primary-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.primary-button:hover {
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
    transform: translateY(-1px);
}

.secondary-button {
    background: rgba(30, 30, 30, 0.8);
    color: #e5e7eb;
    border-color: rgba(99, 102, 241, 0.2);
}

.secondary-button:hover {
    background: rgba(40, 40, 40, 0.8);
    border-color: rgba(99, 102, 241, 0.4);
}

.button-group {
    display: flex;
    gap: 8px;
    margin-top: 20px;
}

/* Canvas Container */
.canvas-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    background: 
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.canvas-container.drag-over {
    background-color: rgba(99, 102, 241, 0.05);
}

.canvas-container.drag-over::after {
    content: '';
    position: absolute;
    inset: 20px;
    border: 2px dashed #6366f1;
    border-radius: 8px;
    pointer-events: none;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    border-radius: 8px;
    box-shadow: 
        0 0 40px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #6b7280;
}

.empty-state svg {
    margin-bottom: 20px;
    filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.3));
}

.empty-state p {
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.empty-state span {
    display: block;
    font-size: 12px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Right Sidebar - Presets Panel */
.presets-sidebar {
    width: 320px;
    background: rgba(15, 15, 15, 0.9);
    border-left: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 60px);
    flex-shrink: 0;
}

.presets-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.presets-sidebar-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.preset-section {
    padding: 16px;
}

.preset-section-title {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6b7280;
    margin-bottom: 12px;
}

.preset-item {
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.preset-item:hover {
    border-color: #6366f1;
    background: rgba(25, 25, 25, 0.8);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.preset-item.active {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.3);
}

.preset-name {
    font-size: 13px;
    font-weight: 600;
    color: #e5e7eb;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preset-description {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.4;
}

.preset-delete {
    position: absolute;
    top: 8px;
    right: 8px;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preset-delete svg {
    width: 16px;
    height: 16px;
}

.preset-delete:hover {
    color: #ef4444;
    transform: scale(1.1);
}

.preset-item:hover .preset-delete {
    opacity: 1;
}

.save-preset-btn {
    width: 100%;
    padding: 12px;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    border: 1px dashed rgba(99, 102, 241, 0.4);
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 16px;
}

.save-preset-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
}


/* Scrollbar */
.sidebar::-webkit-scrollbar,
.presets-sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.presets-sidebar-content::-webkit-scrollbar-track {
    background: rgba(20, 20, 20, 0.5);
}

.sidebar::-webkit-scrollbar-thumb,
.presets-sidebar-content::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.presets-sidebar-content::-webkit-scrollbar-thumb:hover {
    background: rgba(99, 102, 241, 0.5);
}

/* Credits */
.credits {
    position: fixed;
    bottom: 16px;
    right: 16px;
    text-align: right;
    font-size: 10px;
    color: #4b5563;
    z-index: 50;
    padding: 8px 12px;
    background: rgba(15, 15, 15, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 4px;
    backdrop-filter: blur(10px);
}

.credits a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s;
}

.credits a:hover {
    color: #818cf8;
}

.credits .separator {
    margin: 0 6px;
    color: #374151;
}

/* Modal Dialog */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-dialog {
    background: rgba(15, 15, 15, 0.98);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.8), 0 0 100px rgba(99, 102, 241, 0.2);
    width: 90%;
    max-width: 450px;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-dialog-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.modal-dialog-header h3 {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #6366f1;
    margin: 0;
}

.modal-dialog-body {
    padding: 24px;
}

.modal-dialog-body p {
    margin: 0 0 20px 0;
    color: #9ca3af;
    font-size: 13px;
    line-height: 1.6;
}

.modal-dialog-label {
    display: block;
    font-size: 11px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-dialog-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(20, 20, 20, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 4px;
    color: #e5e7eb;
    font-size: 13px;
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.modal-dialog-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.modal-dialog-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(99, 102, 241, 0.2);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-dialog-footer button {
    padding: 10px 20px;
}
