
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    touch-action: manipulation;
  }

  html, body {
    height: 100%;
    width: 100%;
    overflow: hidden;
    background: #111;
    color: #fff;
    font-family: system-ui, -apple-system, sans-serif;
  }

  body {
    display: flex;
    flex-direction: column;
    position: relative;
  }

  header {
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    min-height: 74px;
    background: linear-gradient(to bottom, rgba(17,17,17,1), rgba(17,17,17,.8));
    border-bottom: 2px solid #e91e6344;
    z-index: 99;
    backdrop-filter: blur(10px);
  }

  #headerCenter {
    flex: 2;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  h1 {
    color: #e91e63;
    font-size: clamp(22px, 9vw, 35px);
    font-weight: 900;
    text-shadow: 0 0 40px #e91e63;
  }

  h2 {
    color: #ccc;
    font-size: clamp(12px, 3.8vw, 15px);
    margin-top: 5px;
    opacity: .9;
    padding-left: 5px;
  }

  /* ROOM BUTTON — copies current URL with ?room= */
  #roomBtn {
    padding: 10px 20px;
    background: rgba(233,30,99,.15);
    border: 2px solid #e91e6344;
    border-radius: 50px;
    font-weight: 700;
    color: #e91e63;
    text-shadow: 0 0 15px #e91e63;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 20px rgba(233,30,99,.3);
    cursor: pointer;
    transition: all .25s;
    display: flex;
    align-items: center;
    gap: 8px;
  }

  #roomBtn:hover {
    background: rgba(233,30,99,.35);
    box-shadow: 0 0 35px rgba(233,30,99,.6);
  }

  #roomBtn:active {
    transform: scale(.95);
  }

  #copyHint {
    font-weight: 400;
    opacity: .8;
    font-size: .9em;
    display: none;
  }

  #playerCount {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: rgba(255,255,255,.08);
    border-radius: 50px;
    font-weight: 600;
    font-size: 14px;
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.1);
  }

  #playerCount::before {
    content: "People";
    font-size: 16px;
  }

  #muteBtn, #midiBtn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e91e63;
    color: #fff;
    font-size: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 0 30px #e91e6388, 0 8px 20px rgba(0,0,0,.5);
    transition: all .3s;
    position: relative;
    overflow: hidden;
    user-select: none;
  }

  #midiBtn {
    font-size: 12px;
  }

  #muteBtn::before, #midiBtn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,.4), transparent 70%);
    opacity: 0;
    transition: opacity .3s;
  }

  #muteBtn:hover::before, #midiBtn:hover::before {
    opacity: 1;
  }

  #muteBtn.muted, #midiBtn.midi-off {
    background: #444;
    color: #888;
    box-shadow: 0 0 20px #000;
  }

  #muteBtn:active, #midiBtn:active {
    transform: scale(.92);
  }

  #drumBar {
    padding: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    background: linear-gradient(to top, rgba(17,17,17,1), rgba(17,17,17,.8));
    backdrop-filter: blur(10px);
    border-top: 2px solid #e91e6344;
    z-index: 99;
  }

  #volumeControl {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-weight: 600;
  }

  #volumeSlider {
    -webkit-appearance: none;
    width: 140px;
    height: 8px;
    border-radius: 5px;
    background: #333;
    outline: none;
  }

  #volumeSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: #e91e63;
    border-radius: 50%;
    box-shadow: 0 0 20px #e91e63;
    cursor: pointer;
  }

  #mpcGrid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 0;
    padding: 10px;
    background: rgba(20,20,20,.9);
    border-radius: 15px;
    border: 2px solid #e91e6344;
    box-shadow: 0 10px 40px rgba(0,0,0,.8), inset 0 0 30px rgba(233,30,99,.2);
  }

  .mpc-pad {
    aspect-ratio: 1.1;
    border-radius: 18px;
    font-weight: 900;
    font-size: clamp(12px, 3vw, 17px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform .08s;
    box-shadow: inset 0 0 70px #000000;
    position: relative;
    overflow: hidden;
    transform: scale(.8);
  }

  .mpc-pad.pressed {
    transform: scale(.74);
  }

  /* Piano — always visible */
  #container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: #111;
  }

  #keys {
    position: absolute;
    inset: 0;
    --key-width: calc(100% / 19);
  }

  .white {
    position: absolute;
    width: var(--key-width);
    height: 100%;
    left: calc(var(--i) * var(--key-width));
    background: linear-gradient(#fdfdfd, #e8e8e8);
    box-shadow: inset -1px 0 #ccc, 0 8px 20px rgba(0,0,0,.4);
    cursor: pointer;
    transition: all .09s;
  }

  .black {
    position: absolute;
    width: calc(var(--key-width) * .62);
    height: 45%;
    left: calc(var(--i) * var(--key-width) + var(--key-width) * .66);
    background: linear-gradient(135deg, #222, #000);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 18px rgba(0,0,0,.8);
    z-index: 5;
    cursor: pointer;
    transition: all .09s;
  }

  .white.pressed {
    background: #a0e8ff !important;
    transform: translateY(4px);
    box-shadow: 0 4px 20px rgba(0,180,255,.4), inset 0 0 20px rgba(0,200,255,.2) !important;
  }

  .black.pressed {
    background: #555 !important;
    transform: translateY(3px);
  }

  canvas#fallingNotes {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
  }

  #info {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
    padding: 9px;
    font-size: clamp(15px, 4.5vw, 20px);
    color: #00ff7e;
    background: #000000aa;
    backdrop-filter: blur(8px);
    z-index: 99;
  }

  #credit {
    position: fixed;
    bottom: 14px;
    font-size: 13px;
    color: #555;
    opacity: .8;
    z-index: 99;
    width: 99%;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding-right: 10px;
  }

.googleads {
    text-align: center;
    width: 100vw;
    border-bottom: 0px solid #e91e6355;
    padding: 10px 0;
    position: absolute;
    bottom: 4vh;
    z-index: 1;
}

#drumLeft { position: relative; top: 5px;}
#drumRight { width: -webkit-fill-available }


  .instrument-switch {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 16px;
    flex-wrap: wrap;
  }
  .instrument-btn {
    padding: 6px 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .instrument-btn.active {
    background: #e91e63;
    box-shadow: 0 0 12px rgba(233,30,99,0.6);
  }
  .instrument-btn:hover:not(.active) {
    background: #555;
  }


  /* RESPONSIVE */
  @media (max-width: 800px) {
    #mpcGrid {
      grid-template-columns: repeat(5, 1fr);
      gap: 10px;
    }
    .mpc-pad {
      font-size: 11px;
      aspect-ratio: 1.35;
    }
    .instrument-switch {
      gap: 6px;
      margin-left: 10px;
    }
    .instrument-btn {
      font-size: 12px;
      padding: 5px 10px;
    }
 
  }

  @media (max-width: 480px) and (orientation: portrait) {
    .mpc-pad {
      aspect-ratio: 1;
    }
    .googleads {
      padding: 0;
    }
  }

  @media (orientation: landscape) and (max-height: 600px) {
    .googleads { display: none; }
    #container { min-height: 280px; }
    #mpcGrid {
      grid-template-columns: repeat(10, 1fr);
      gap: 8px;
      padding: 8px;
    }
    .mpc-pad {
      aspect-ratio: 1.4 / 1;
      font-size: clamp(9px, 2.2vw, 14px);
      transform: scale(.88);
    }
    .mpc-pad.pressed { transform: scale(.82); }
    header { padding: 10px 16px; min-height: 60px; flex-wrap: nowrap; }
    h1 { font-size: clamp(18px, 6vw, 28px); }
    h2 { font-size: clamp(10px, 2.8vw, 13px); }
    #drumBar { padding: 4px; gap: 12px; }
    #volumeSlider { width: 100px; }
    #info { padding: 6px; font-size: clamp(12px, 3vw, 16px); }
    #credit { display: none; }
  }
