body {
    background: #f5f5f5;
    font-family: "Microsoft YaHei", sans-serif;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.instrument {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.note {
    display: inline-block;
    width: 40px;
    height: 40px;
    margin: 5px;
    background: #e8f4f8;
    border: 1px solid #a8d0e6;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
    line-height: 40px;
}

.note:hover {
    background: #d0e8f2;
}

.composition {
    min-height: 100px;
    border: 1px solid #ddd;
    padding: 10px;
    margin-top: 20px;
}

.controls {
    margin: 20px 0;
}

button {
    padding: 8px 15px;
    background: #4a90e2;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background: #357abd;
}

/* 曲线编辑器样式 */
.curve-editor {
    margin: 20px 0;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
}

#curveCanvas {
    background: #fff;
    border: 1px solid #e0e0e0;
    cursor: crosshair;
}

/* 音轨相关样式 */
.track {
    border: 1px solid #ddd;
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    background: #f8f9fa;
}

.track-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.curve-edit-panel {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.curve-properties {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

.curve-controls {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 14px;
    color: #666;
}

.control-group select,
.control-group input {
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* 添加滚动容器样式 */
.canvas-container {
    overflow-x: auto;
    margin: 10px 0;
    padding-bottom: 15px;
    width: 100%;
    background: #fff;
    position: relative;
}

#curveCanvas {
    min-width: 100%;
    background: #fff;
    cursor: crosshair;
}

/* 添加滚动控制器样式 */
.scroll-controls {
    display: flex;
    gap: 10px;
    margin: 5px 0;
    align-items: center;
}

.scroll-controls button {
    padding: 3px 8px;
    font-size: 12px;
}

.scroll-controls .measure-count {
    display: flex;
    align-items: center;
    gap: 5px;
}

.scroll-controls input[type="number"] {
    width: 60px;
    padding: 3px;
}

/* 其他样式保持不变... */

/* 修改曲线编辑器容器样式 */
.curve-editor {
    margin: 20px 0;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
}

/* 添加滚动容器样式 */
.canvas-scroll-container {
    width: 100%;
    overflow-x: auto;
    margin: 10px 0;
    background: #fff;
    border: 1px solid #e0e0e0;
}

.canvas-wrapper {
    min-width: 100%;
    position: relative;
    display: inline-block;
}

#curveCanvas {
    display: block;
    background: #fff;
    cursor: crosshair;
}

/* 自定义滚动条样式 */
.canvas-scroll-container::-webkit-scrollbar {
    height: 8px;
}

.canvas-scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.canvas-scroll-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.canvas-scroll-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 添加音符编辑区域样式 */
.note-editor-area {
    position: relative;
    height: 400px;
    overflow: auto;
    border: 1px solid #ddd;
    margin: 10px 0;
}

.note-timeline {
    position: sticky;
    top: 0;
    height: 30px;
    background: white;
    border-bottom: 1px solid #ddd;
    z-index: 2;
}

.timeline-marker {
    position: absolute;
    width: 1px;
    height: 10px;
    background: #ccc;
    bottom: 0;
}

.timeline-marker.measure {
    height: 20px;
    background: #666;
}

.timeline-marker.beat {
    height: 15px;
    background: #999;
}

.note-grid {
    position: relative;
    min-height: 100%;
}

.note-grid-line {
    position: absolute;
    width: 100%;
    height: 20px;
    border-bottom: 1px solid #eee;
}

.note-label {
    position: sticky;
    left: 0;
    padding: 0 5px;
    background: white;
    font-size: 12px;
    color: #666;
}

.note-sequence {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.note-block {
    position: absolute;
    height: 20px;
    background: rgba(74, 144, 226, 0.5);
    border: 1px solid #4a90e2;
    border-radius: 3px;
    cursor: move;
    user-select: none;
}

.note-block:hover {
    background: rgba(74, 144, 226, 0.7);
}

.note-info {
    position: absolute;
    top: -20px;
    left: 0;
    font-size: 10px;
    white-space: nowrap;
}

.note-edit-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* 添加音符块调整手柄样式 */
.note-handle {
    position: absolute;
    width: 8px;
    height: 100%;
    top: 0;
    cursor: ew-resize;
    background: rgba(255, 255, 255, 0.3);
}

.note-handle.left {
    left: 0;
}

.note-handle.right {
    right: 0;
}

.note-handle:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* 修改音符块样式 */
.note-block {
    position: absolute;
    height: 20px;
    background: rgba(74, 144, 226, 0.5);
    border: 1px solid #4a90e2;
    border-radius: 3px;
    cursor: move;
    user-select: none;
}

.note-block:hover {
    background: rgba(74, 144, 226, 0.7);
} 