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

body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
}

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

/* Top Toolbar */
.top-toolbar {
    background: #1a1a1a;
    border-bottom: 1px solid #333;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

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

.logo-icon {
    font-size: 24px;
    color: #00ffff;
    animation: pulse 2s ease-in-out infinite;
}

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

.logo h1 {
    font-size: 20px;
    font-weight: 300;
    letter-spacing: 2px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
}

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

.canvas-container {
    flex: 1;
    position: relative;
    background: #000;
}

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

.canvas-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.instructions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    color: #ccc;
}

/* Control Panel */
.control-panel {
    width: 300px;
    background: #1a1a1a;
    border-left: 1px solid #333;
    transition: transform 0.3s ease;
}

.control-panel.collapsed {
    transform: translateX(100%);
}

.panel-header {
    padding: 16px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.panel-header h3 {
    font-size: 16px;
    font-weight: 400;
}

.panel-content {
    padding: 16px;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
}

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

.control-section h4 {
    font-size: 14px;
    margin-bottom: 12px;
    color: #00ffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

.control-group label {
    display: block;
    font-size: 12px;
    margin-bottom: 4px;
    color: #ccc;
}

.preset-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

/* Point Inspector */
.point-inspector {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a1a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 16px;
    min-width: 300px;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.1);
}

.inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.inspector-header h4 {
    font-size: 14px;
    color: #00ffff;
}

.inspector-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.inspector-content .control-group:last-child {
    grid-column: 1 / -1;
}

/* Buttons */
.btn {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #444;
    border-color: #666;
}

.btn-primary {
    background: #00ffff;
    color: #000;
    border-color: #00ffff;
}

.btn-primary:hover {
    background: #00cccc;
    border-color: #00cccc;
}

.btn-secondary {
    background: #666;
    border-color: #888;
}

.btn-secondary:hover {
    background: #777;
}

.btn-danger {
    background: #ff3333;
    border-color: #ff3333;
}

.btn-danger:hover {
    background: #cc0000;
}

.btn-icon {
    padding: 8px;
    min-width: 36px;
}

.btn-preset {
    font-size: 11px;
    padding: 6px 12px;
}

/* Form Elements */
input[type="range"] {
    width: 100%;
    height: 4px;
    border-radius: 2px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #00ffff;
    cursor: pointer;
    border: none;
}

input[type="color"] {
    width: 40px;
    height: 32px;
    border: 1px solid #555;
    border-radius: 4px;
    background: none;
    cursor: pointer;
}

select {
    background: #333;
    color: #fff;
    border: 1px solid #555;
    padding: 6px;
    border-radius: 4px;
    font-family: inherit;
    font-size: 12px;
    width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .control-panel {
        position: fixed;
        top: 60px;
        right: 0;
        bottom: 0;
        width: 280px;
        z-index: 1000;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .toolbar-actions {
        flex-wrap: wrap;
        gap: 4px;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .point-inspector {
        bottom: 10px;
        left: 10px;
        right: 10px;
        transform: none;
        min-width: auto;
    }
    
    .inspector-content {
        grid-template-columns: 1fr;
    }
}

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

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

::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #666;
}

/* Animations */
.btn, .control-panel, input[type="range"]::-webkit-slider-thumb {
    transition: all 0.2s ease-out;
}

.control-group {
    transition: opacity 0.2s ease;
}

.control-group:hover {
    opacity: 1;
}