.web-audio-mpc {
    width: min(1180px, calc(100% - 20px));
    box-sizing: border-box;
    margin: 30px auto;
    padding: 24px;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(circle at top, #383b40 0%, #202226 45%, #151619 100%);
    border: 1px solid #4c4f54;
    border-radius: 20px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .08);
    font-family: Arial, Helvetica, sans-serif;
}
.web-audio-mpc * { box-sizing: border-box; }
.web-audio-mpc button, .web-audio-mpc input { font: inherit; }
.mpc-topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.mpc-title { display: flex; align-items: center; gap: 12px; letter-spacing: 1px; }
.mpc-title strong { display: block; font-size: 18px; }
.mpc-title small { display: block; margin-top: 4px; color: #aeb2b8; font-size: 12px; letter-spacing: 0; }
.mpc-led { width: 13px; height: 13px; flex: 0 0 13px; background: #ff3b30; border-radius: 50%; box-shadow: 0 0 6px #ff3b30, 0 0 15px rgba(255, 59, 48, .75); }
.web-audio-mpc.ready .mpc-led { background: #34c759; box-shadow: 0 0 6px #34c759, 0 0 15px rgba(52, 199, 89, .75); }
.mpc-controls { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.mpc-control-button { min-height: 42px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; cursor: pointer; transition: transform 80ms ease, filter 120ms ease; }
.mpc-control-button:hover { filter: brightness(1.15); }
.mpc-control-button:active { transform: scale(.96); }
.mpc-start-button { background: #1677d2; border-color: #4aa3f3; }
.mpc-start-button.started { background: #267a3b; border-color: #53b96d; }
.mpc-stop-button { background: #b5212f; border-color: #e04b57; }
.mpc-volume-control { display: flex; align-items: center; gap: 9px; min-height: 42px; padding: 7px 12px; color: #fff; background: rgba(0, 0, 0, .28); border: 1px solid #555960; border-radius: 9px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.mpc-master-volume { width: 150px; accent-color: #ff6b35; cursor: pointer; }
.mpc-volume-value { min-width: 38px; color: #ffb095; }
.mpc-bank-section { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; padding: 12px 14px; background: rgba(0, 0, 0, .24); border: 1px solid #4d5157; border-radius: 11px; }
.mpc-bank-label { color: #adb1b7; font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.mpc-bank-buttons { display: flex; gap: 8px; }
.mpc-bank-button { width: 46px; height: 38px; color: #d7d9dc; background: #34373b; border: 1px solid #62666c; border-radius: 7px; font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 3px 0 #151619, inset 0 1px 0 rgba(255, 255, 255, .08); }
.mpc-bank-button:hover { background: #45494e; }
.mpc-bank-button.active { color: #fff; background: #e95420; border-color: #ff9c6e; box-shadow: 0 0 9px rgba(255, 98, 43, .9), 0 0 20px rgba(255, 98, 43, .45); }
.mpc-current-bank { margin-left: auto; color: #ffb095; font-size: 12px; font-weight: 700; text-transform: uppercase; }
.mpc-grid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 10px; }
.mpc-pad { position: relative; width: 100%; min-width: 0; aspect-ratio: 1 / 1; padding: 8px; overflow: hidden; color: #f4f4f4; background: linear-gradient(145deg, #555a60 0%, #363a3f 48%, #272a2e 100%); border: 2px solid #686d73; border-radius: 11px; box-shadow: 0 6px 0 #121315, 0 9px 13px rgba(0, 0, 0, .55), inset 0 1px 2px rgba(255, 255, 255, .14); cursor: pointer; touch-action: manipulation; user-select: none; transition: transform 55ms ease, box-shadow 55ms ease, background 55ms ease, border-color 55ms ease; }
.mpc-pad:hover:not(:disabled) { border-color: #91969d; filter: brightness(1.08); }
.mpc-pad:disabled { cursor: not-allowed; opacity: .48; }
.mpc-pad.loading { cursor: wait; }
.mpc-pad.loading::after { content: ""; position: absolute; right: 10%; bottom: 5px; left: 10%; height: 2px; background: linear-gradient(90deg, transparent, #ffa56f, transparent); animation: mpc-pad-loading 900ms linear infinite; }
.mpc-pad.error { background: linear-gradient(145deg, #513237, #271c1e); border-color: #9f3a43; }
.mpc-pad.active { transform: translateY(5px) scale(.96); color: #fff; background: linear-gradient(145deg, #ff8b46, #ef4e24); border-color: #ffbd91; box-shadow: 0 1px 0 #882810, 0 0 12px #ff642f, 0 0 27px rgba(255, 100, 47, .85), inset 0 0 12px rgba(255, 255, 255, .22); }
.mpc-bank-button:focus-visible, .mpc-control-button:focus-visible, .mpc-pad:focus-visible { outline: 3px solid #66b5ff; outline-offset: 3px; }
.pad-number { position: absolute; top: 6px; left: 7px; color: rgba(255, 255, 255, .55); font-size: 9px; font-weight: 400; }
.pad-name { display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: clamp(8px, 1vw, 12px); font-weight: 700; letter-spacing: .3px; }
.pad-key { position: absolute; right: 7px; bottom: 5px; min-width: 17px; padding: 2px 4px; color: #dedede; background: rgba(0, 0, 0, .28); border-radius: 4px; font-size: 8px; line-height: 1.2; text-transform: uppercase; }
.mpc-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 17px; color: #91969d; font-size: 11px; }
@keyframes mpc-pad-loading { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@media (max-width: 900px) { .web-audio-mpc { padding: 18px; } .mpc-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } .mpc-topbar, .mpc-controls { justify-content: center; } .mpc-title { width: 100%; justify-content: center; text-align: center; } }
@media (max-width: 560px) { .mpc-volume-control { width: 100%; justify-content: center; } .mpc-bank-section { justify-content: center; } .mpc-current-bank { width: 100%; margin-left: 0; text-align: center; } .mpc-master-volume { width: min(180px, 42vw); } .mpc-grid { gap: 8px; } .mpc-footer { flex-direction: column; align-items: center; gap: 5px; } }
