* { box-sizing: border-box; }
body { background: #eef2f5; font-family: 'Segoe UI', 'Roboto', system-ui, sans-serif; margin: 0; padding: 20px; }
.container { max-width: 1400px; margin: 0 auto; background: white; border-radius: 28px; box-shadow: 0 20px 35px -12px rgba(0,0,0,0.2); overflow: hidden; display: flex; flex-direction: column; }
.toolbar { background: #1e2a3a; padding: 12px 24px; color: white; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.toolbar h1 { margin: 0; font-size: 1.2rem; }
.settings-panel { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.time-signature { display: flex; align-items: center; gap: 8px; background: #0f1720; padding: 5px 16px; border-radius: 40px; }
.time-signature label { font-size: 0.8rem; font-weight: normal; }
.time-signature input { width: 55px; background: #2d3e4e; border: none; color: white; padding: 5px 8px; border-radius: 20px; text-align: center; font-weight: bold; font-size: 1rem; }
.key-input { background: #0f1720; padding: 5px 16px; border-radius: 40px; display: flex; align-items: center; gap: 8px; }
.key-input input { width: 70px; background: #2d3e4e; border: none; color: white; padding: 5px 8px; border-radius: 20px; text-align: center; font-weight: bold; }
.tempo-input { background: #0f1720; padding: 5px 16px; border-radius: 40px; display: flex; align-items: center; gap: 8px; }
.tempo-input input { width: 70px; background: #2d3e4e; border: none; color: white; padding: 5px 8px; border-radius: 20px; text-align: center; }
.warning-badge { background: #7f1a1a; padding: 6px 14px; border-radius: 40px; font-size: 0.7rem; font-family: monospace; }
.rule-badge { background: #0f1720; padding: 6px 14px; border-radius: 40px; font-size: 0.7rem; font-family: monospace; }
.rule-badge span { color: #ffd966; }
.canvas-section { border-bottom: 1px solid #e2e8f0; }
.section-title { background: #f8fafc; padding: 12px 20px; font-weight: 600; border-bottom: 1px solid #e2e8f0; }
.canvas-container { background: #fffef7; padding: 20px; overflow-x: auto; overflow-y: auto; min-height: 300px; max-height: 55vh; }
canvas { display: block; background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.input-section { border-top: 1px solid #e2e8f0; }
textarea { width: 100%; height: 35vh; min-height: 200px; padding: 20px; font-family: 'Courier New', monospace; font-size: 14px; line-height: 1.5; border: none; resize: vertical; background: #fefef7; outline: none; }
.footer { background: #f1f5f9; padding: 12px 24px; border-top: 1px solid #cbd5e1; font-size: 0.8rem; display: flex; flex-wrap: wrap; justify-content: space-between; }
.example-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
button { background: #2c3e4e; border: none; color: white; padding: 5px 14px; border-radius: 30px; cursor: pointer; font-size: 0.75rem; transition: background 0.2s ease; }
button:hover { background: #1e2f3c; }
.info { color: #4a5568; }
@media (max-width: 800px) { .toolbar { flex-direction: column; align-items: stretch; } .settings-panel { justify-content: center; } }

/* ===== 原基础样式（保持不动） ===== */
/* ... 你原有的样式 ... */

/* ===== 新增：使用说明面板样式 ===== */
.usage-guide {
    margin-top: 20px;
    background: #f9fafb;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}
.guide-header {
    background: #1e2a3a;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.guide-content {
    padding: 20px;
    display: block;
    border-top: 1px solid #e5e7eb;
}
.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.guide-table th {
    text-align: left;
    padding: 8px;
    background: #e5e7eb;
}
.guide-table th:first-child {
    border-radius: 8px 0 0 0;
}
.guide-table th:last-child {
    border-radius: 0 8px 0 0;
}
.guide-table td {
    padding: 8px;
    border-bottom: 1px solid #e5e7eb;
}
.code-block {
    background: #1e2a3a;
    color: #e5e7eb;
    padding: 16px;
    border-radius: 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    overflow-x: auto;
}
.code-block pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-all;
}
.feature-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}
.feature-card {
    flex: 1;
    min-width: 200px;
    background: #f3f4f6;
    border-radius: 12px;
    padding: 12px;
}
.feature-card .card-title {
    font-weight: bold;
    margin-bottom: 8px;
}
.notice-box {
    margin-top: 24px;
    padding: 16px;
    background: #fef3c7;
    border-radius: 12px;
    border-left: 4px solid #f59e0b;
}
.notice-box ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    color: #78350f;
}
.quick-refs {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}
.ref-item {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
}
.ref-item:nth-child(1) { background: #e0f2fe; }
.ref-item:nth-child(2) { background: #d1fae5; }
.ref-item:nth-child(3) { background: #fed7aa; }
.ref-item:nth-child(4) { background: #fecaca; }
.ref-item:nth-child(5) { background: #fecaca; }
.ref-item:nth-child(6) { background: #e9d5ff; }

code {
    background: #e5e7eb;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #dc2626;
}

/* 响应式微调 */
@media (max-width: 768px) {
    .guide-table {
        font-size: 11px;
    }
    .guide-table td, .guide-table th {
        padding: 6px 4px;
    }
}

/* 滚动条美化 */
.code-block pre::-webkit-scrollbar {
    height: 6px;
}
.code-block pre::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 3px;
}
.code-block pre::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 3px;
}