body {
    background-color: #f0f0f0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    font-family: 'Inter', -apple-system, sans-serif;
    user-select: none;
}

.app-container {
    width: 1000px;
    height: 650px;
    background: #fff;
    border: 2px solid #000;
    display: flex;
    flex-direction: column;
    box-shadow: 12px 12px 0px rgba(0,0,0,1);
}

/* Header */
.header {
    height: 45px;
    border-bottom: 2px solid #000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.main-view {
    flex: 1;
    display: flex;
    overflow: hidden;
    background: #fff;
}

/* Piano Keys */
.piano-sidebar {
    width: 80px;
    border-right: 2px solid #000;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.key {
    flex: 1;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
}
.key.black { background: #000; color: #fff; }
.key.white { background: #fff; color: #000; }

/* Grid Area */
.grid-viewport {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.grid-svg {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}

.note-rect {
    fill: #000;
    stroke: #fff;
    stroke-width: 1;
}
.note-handle {
    cursor: ew-resize;
    fill: transparent;
}

/* Footer */
.footer {
    height: 90px;
    border-top: 2px solid #000;
    display: flex;
    align-items: center;
    padding: 0 30px;
    gap: 40px;
}

.btn-box {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.label {
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
}

.action-btn {
    border: 2px solid #000;
    padding: 8px 16px;
    font-weight: 900;
    background: #fff;
    transition: all 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.action-btn:hover { background: #000; color: #fff; }
.action-btn:active { transform: translate(2px, 2px); }

.play-btn {
    min-width: 120px;
    height: 50px;
    font-size: 18px;
    background: #000;
    color: #fff;
}

.input-group {
    display: flex;
    border: 2px solid #000;
}
.input-group button {
    padding: 5px 15px;
    font-weight: 900;
}
.input-group button:hover { background: #eee; }
.input-group .value {
    padding: 5px 15px;
    border-left: 2px solid #000;
    border-right: 2px solid #000;
    min-width: 40px;
    text-align: center;
    font-weight: 900;
}

input[type="range"] {
    accent-color: #000;
}

/* 页面右上角返回按钮（不在 DAW 窗口内） */
.back-to-home {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #000;
    box-shadow: 4px 4px 0px rgba(0,0,0,1);
    color: #000;
    text-decoration: none;
    font-size: 24px;
    font-weight: 900;
    transition: all 0.1s;
    font-family: 'Inter', -apple-system, sans-serif;
}
.back-to-home:hover {
    background: #000;
    color: #fff;
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0,0,0,1);
}
.back-to-home:active {
    transform: translate(4px, 4px);
    box-shadow: 0 0 0 rgba(0,0,0,1);
}

/* 页面下方开源引导小字 */
.github-promo {
    position: fixed;
    bottom: 16px;
    left: 0;
    right: 0;
    margin: 0;
    text-align: center;
    font-size: 11px;
    color: #666;
    font-weight: 500;
    font-family: 'Inter', -apple-system, sans-serif;
}
.github-promo a {
    color: #000;
    text-decoration: underline;
}
.github-promo a:hover {
    color: #333;
}
