/* ================================================================== * MIDI 播放器 · 样式 * ================================================================== */ :root { --bg: #07090d; --bg-soft: #0e1218; --panel: #121821; --panel-2: #171f2a; --line: rgba(255, 255, 255, 0.09); --text: #e6edf5; --text-dim: #8b98a9; --accent: #5ad2f4; --accent-2: #7be495; --warn: #ffd166; --danger: #ff8fa3; --radius: 14px; --shadow: 0 12px 40px rgba(0, 0, 0, 0.45); } * { box-sizing: border-box; } html, body { margin: 0; padding: 0; background: radial-gradient(1200px 700px at 50% -20%, #131c28 0%, var(--bg) 60%); color: var(--text); font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; min-height: 100%; } body.dragging { outline: 2px dashed var(--accent); outline-offset: -10px; } button { font-family: inherit; cursor: pointer; } code, kbd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; } .app { max-width: 1180px; margin: 0 auto; padding: 22px 20px 60px; display: flex; flex-direction: column; gap: 16px; } /* ------------------------------ 顶栏 ------------------------------ */ .app-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; } .brand { display: flex; align-items: center; gap: 14px; } .brand .logo { width: 46px; height: 46px; display: grid; place-items: center; font-size: 24px; border-radius: 12px; background: linear-gradient(150deg, rgba(90, 210, 244, 0.22), rgba(123, 228, 149, 0.14)); border: 1px solid var(--line); } .brand h1 { margin: 0; font-size: 20px; letter-spacing: 0.5px; } .brand p { margin: 2px 0 0; font-size: 12px; color: var(--text-dim); } .header-actions { display: flex; gap: 10px; } .btn { border: 1px solid var(--line); background: var(--panel); color: var(--text); padding: 9px 16px; border-radius: 10px; font-size: 13px; transition: background 0.15s, border-color 0.15s, transform 0.1s; } .btn:hover { background: var(--panel-2); border-color: rgba(90, 210, 244, 0.45); } .btn:active { transform: translateY(1px); } /* ---------------------------- 拖放区域 ---------------------------- */ .dropzone { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--radius); border: 1px dashed rgba(255, 255, 255, 0.16); background: linear-gradient(180deg, rgba(90, 210, 244, 0.05), transparent); transition: border-color 0.2s, background 0.2s; } .dropzone:hover, body.dragging .dropzone { border-color: rgba(90, 210, 244, 0.6); background: linear-gradient(180deg, rgba(90, 210, 244, 0.12), transparent); } .dropzone.compact { padding: 12px 18px; } .dropzone.compact .dz-icon { font-size: 20px; } .dz-icon { font-size: 34px; color: var(--accent); line-height: 1; text-shadow: 0 0 24px rgba(90, 210, 244, 0.5); } .dz-text p { margin: 0; } .dz-title { font-size: 15px; } .dz-sub { font-size: 12.5px; color: var(--text-dim); margin-top: 4px !important; } .dz-title code { background: rgba(255, 255, 255, 0.08); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; } .link { background: none; border: none; color: var(--accent); padding: 0 2px; font-size: inherit; text-decoration: underline dotted; } .link:hover { color: #9fe6ff; } /* ---------------------------- 卷帘画布 ---------------------------- */ .stage { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #0b0e13; box-shadow: var(--shadow); } #roll { display: block; width: 100%; height: 360px; } .song-badge { position: absolute; top: 10px; left: 12px; display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 999px; background: rgba(8, 12, 18, 0.72); border: 1px solid var(--line); font-size: 12px; color: var(--text-dim); backdrop-filter: blur(6px); max-width: calc(100% - 24px); } .song-badge #badge-title { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; } .song-badge #badge-meta { white-space: nowrap; } /* ----------------------------- 走带控件 ----------------------------- */ .transport { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); } .icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 15px; display: grid; place-items: center; transition: background 0.15s, transform 0.1s, box-shadow 0.2s; } .icon-btn:hover { background: #1e2836; } .icon-btn:active { transform: scale(0.95); } .icon-btn.primary { background: linear-gradient(160deg, #5ad2f4, #37a8d4); color: #06212c; border-color: transparent; font-size: 17px; box-shadow: 0 0 0 0 rgba(90, 210, 244, 0.5); } .icon-btn.primary:hover { box-shadow: 0 0 20px 2px rgba(90, 210, 244, 0.35); } .time { font-family: ui-monospace, monospace; font-size: 13px; color: var(--text-dim); white-space: nowrap; min-width: 118px; } .time #time-cur { color: var(--text); font-weight: 600; } .time .sep { margin: 0 3px; } input[type="range"] { -webkit-appearance: none; appearance: none; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.12); accent-color: var(--accent); outline: none; cursor: pointer; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: none; box-shadow: 0 0 8px rgba(90, 210, 244, 0.6); } input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--accent); } #seek { flex: 1 1 240px; min-width: 160px; } .ctl { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-dim); } .ctl input[type="range"] { width: 96px; } .ctl .val { font-family: ui-monospace, monospace; color: var(--text); min-width: 48px; } .meter { width: 120px; height: 18px; border-radius: 5px; flex: 0 0 auto; } /* ------------------------------ 面板 ------------------------------ */ .panels { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.2fr); gap: 16px; } @media (max-width: 820px) { .panels { grid-template-columns: 1fr; } } .panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px 18px; min-height: 220px; } .panel h2 { margin: 0 0 12px; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--text-dim); font-weight: 600; display: flex; align-items: baseline; gap: 10px; } .panel h2 .hint { font-size: 10.5px; letter-spacing: 0; text-transform: none; color: rgba(255, 255, 255, 0.32); font-weight: 400; } .info { margin: 0; display: flex; flex-direction: column; gap: 1px; } .info .row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px dashed rgba(255, 255, 255, 0.06); font-size: 13px; } .info .row dt { color: var(--text-dim); flex: 0 0 auto; } .info .row dd { margin: 0; text-align: right; font-family: ui-monospace, monospace; font-size: 12.5px; word-break: break-all; } .info-empty, .tracks-empty { color: rgba(255, 255, 255, 0.28); font-size: 13px; padding: 20px 0; text-align: center; } /* ---------------------------- 轨道列表 ---------------------------- */ .tracks { display: flex; flex-direction: column; gap: 6px; } .track { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 9px; background: rgba(255, 255, 255, 0.028); border: 1px solid transparent; font-size: 13px; } .track.muted { opacity: 0.42; } .track.soloed { border-color: rgba(90, 210, 244, 0.4); background: rgba(90, 210, 244, 0.07); } .track .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; box-shadow: 0 0 10px currentColor; } .track .tname { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .track .tcount { color: var(--text-dim); font-size: 11.5px; font-family: ui-monospace, monospace; flex: 0 0 auto; } .track .tbtn { width: 26px; height: 24px; border-radius: 6px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); color: var(--text-dim); font-size: 11px; font-weight: 700; line-height: 1; } .track .tbtn:hover { color: var(--text); } .track .tbtn.on-m { background: var(--danger); color: #2b0a12; border-color: transparent; } .track .tbtn.on-s { background: var(--accent); color: #06212c; border-color: transparent; } /* ------------------------------ 页脚 ------------------------------ */ .app-footer { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: rgba(255, 255, 255, 0.34); padding: 4px 2px; } .app-footer a { color: var(--accent); text-decoration: none; } .app-footer a:hover { text-decoration: underline; } kbd { background: rgba(255, 255, 255, 0.09); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; font-size: 11px; } /* ------------------------------ Toast ------------------------------ */ .toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: rgba(18, 24, 33, 0.95); border: 1px solid var(--line); color: var(--text); padding: 10px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity 0.25s, transform 0.25s; max-width: min(560px, 90vw); text-align: center; } .toast.show { opacity: 1; transform: translate(-50%, 0); } .toast.error { border-color: rgba(255, 143, 163, 0.6); }