/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 14px;
}

::-webkit-scrollbar-track {
  background: #111;
  border: 2px solid #E0943B;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #E0943B, #8a4f12);
  border-radius: 4px;
  border: 2px solid #000;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #ffd27a, #E0943B);
}

/* ===== Body ===== */
body {
  background-color: black;
  color: white;
  font-family: Verdana;
  margin: 0;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ===== Page (FIXED ✅) ===== */
.page {
  min-height: 98vh;
  margin-top: 10px;
  margin-left: 0px;
  border: 5px solid #E0943B;
  border-radius: 8px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.page > * {
  position: relative;
  z-index: 2;
}

/* ===== MIDI App Container ===== */
#midiPlayApp {
  margin: 40px auto;
  padding: 15px;

  width: 500px;
  height: 400px;

  display: flex;
  flex-direction: column;

  border: 2px solid #E0943B;
  background-color: #505090;
}

/* ===== Track List (scrollable area ✅) ===== */
#trackList {
  margin-top: 5px;
  flex: 1;

  overflow-y: auto;
  overflow-x: hidden;

  border: 1px solid #E0943B;
}

/* ===== File name display ===== */
#fileNameDisplay { 
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  padding: 5px;
  border: 1px solid #E0943B;
}

/* ===== Player ===== */
#midiPlayer {
  width: 100%;
}

/* ===== List styling ===== */
li {
  white-space: nowrap;
  padding: 3px;
}

#midiUlList { 
  cursor: pointer; 
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
}

/* ===== Button rows ===== */
#prevNextDiv,
#autoRandomDiv {
  display: flex;
  gap: 5px;
  margin-top: 5px;
}

/* ===== Buttons ===== */
#prevNextDiv button,
#autoRandomDiv button {
  width: 50%;

  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;

  padding: 6px 0;

  background: linear-gradient(to bottom, #2a2a2a, #000);
  color: #fff;

  border: 2px solid #E0943B;
  border-radius: 4px;

  /* retro raised effect */
  box-shadow:
    2px 2px 0px #8a4f12,
    -1px -1px 0px #ffd27a;

  transition: all 0.15s ease;
}

/* Hover */
#prevNextDiv button:hover,
#autoRandomDiv button:hover {
  transform: translateY(-2px) scale(1.05);

  box-shadow:
    3px 3px 0px #8a4f12,
    -1px -1px 0px #ffd27a,
    0 0 8px #E0943B;
}

/* Click */
#prevNextDiv button:active,
#autoRandomDiv button:active {
  transform: translateY(2px);

  box-shadow:
    1px 1px 0px #8a4f12 inset,
    -1px -1px 0px #ffd27a inset;
}
