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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    background: #f5f5f5;
    color: #333;
}

#app-title {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: #2c2c2c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: left;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    z-index: 1001;
    border-bottom: 2px solid #444;
    padding-left: 20px;
}

#canvas {
    display: block;
    width: 100vw;
    height: calc(100vh - 180px);
    margin-top: 60px;
    cursor: grab;
    background: #ffffff;
}

#canvas:active {
    cursor: grabbing;
}

#toolbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: #2c2c2c;
    border-top: 2px solid #444;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
}

.toolbar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: grab;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    user-select: none;
    min-width: 80px;
    position: relative;
}

.toolbar-item::before {
    content: '';
    position: absolute;
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
    z-index: 0;
}

.toolbar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.toolbar-item:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.toolbar-item img {
    width: 60px;
    height: 60px;
    pointer-events: none;
    image-rendering: crisp-edges;
    position: relative;
    z-index: 1;
}

.toolbar-item span {
    font-size: 11px;
    color: #fff;
    pointer-events: none;
    text-align: center;
    position: relative;
    z-index: 1;
}

#resetBtn {
    margin-left: 20px;
    padding: 12px 20px;
    background: rgba(255, 100, 100, 0.3);
    border: 1px solid rgba(255, 100, 100, 0.5);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    height: fit-content;
}

#resetBtn:hover {
    background: rgba(255, 100, 100, 0.4);
    border-color: rgba(255, 100, 100, 0.7);
}

#resetBtn:active {
    transform: scale(0.95);
}

.dragging {
    cursor: grabbing !important;
}

.dragging .toolbar-item:not(.dragging-item) {
    opacity: 0.5;
}

