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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    overflow: hidden;
    touch-action: none;
}

.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: #333;
    display: flex;
    align-items: center;
    padding: 0 10px;
    gap: 8px;
    z-index: 100;
    flex-wrap: nowrap;
    overflow-x: auto;
}

.toolbar button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    background: #555;
    color: white;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.toolbar button:hover {
    background: #666;
}

.toolbar button:active {
    background: #444;
}

.toolbar button.active {
    background: #007bff;
}

.toolbar button.toggle-on {
    background: #28a745;
}

.toolbar .separator {
    width: 1px;
    height: 30px;
    background: #666;
    flex-shrink: 0;
}

.color-picker {
    width: 35px;
    height: 35px;
    border: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
}

.stroke-width {
    width: 50px;
    height: 30px;
    flex-shrink: 0;
}

.info {
    color: #aaa;
    font-size: 11px;
    margin-left: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.canvas-container {
    position: fixed;
    top: 50px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #e0e0e0;
    overflow: hidden;
}

#drawing-svg {
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

#drawing-svg.panning {
    cursor: grab;
}

#drawing-svg.panning:active {
    cursor: grabbing;
}

.pressure-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 11px;
    max-width: 250px;
}

/* Grid pattern for infinite canvas feel */
.canvas-grid {
    fill: url(#grid-pattern);
}

/* Selection lasso */
.selection-lasso {
    fill: rgba(0, 123, 255, 0.1);
    stroke: #007bff;
    stroke-width: 2;
    stroke-dasharray: 5, 5;
    pointer-events: none;
}

/* Selected stroke highlight */
.selected-stroke {
    filter: drop-shadow(0 0 3px #007bff);
}

/* Selection bounding box */
.selection-box {
    fill: none;
    stroke: #007bff;
    stroke-width: 1;
    stroke-dasharray: 4, 4;
    pointer-events: none;
}
