/* --- RESET --- */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: Helvetica;
  background-image: url(src/matrix.gif);
  background-attachment: fixed;
  background-size: 100% 100%;
  margin: 0;
}

/* --- TOPBAR --- */
.topbar {
  position: fixed;
  top: 0;
  width: 100%;
  height: 50px;
  background-color: #2d2d2d;
  overflow: auto;
}

.topbar a {
  display: block;
  color: #919191;
  padding: 4px;
  text-align: center;
  font-size: 30px;
  text-decoration: none;
}

/* --- MAIN CONTENT --- */
.main {
  margin-top: 50px;
  margin-left: 160px;
  padding: 0 10px;
}

/* --- UNIFIED BOX STYLE --- */
.box {
  width: 292px;
  background: #c0c0c0;
  border: 3px outset #c0c0c0;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
  position: absolute;
  padding: 1px;
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  color: #000;
}

/* HEADER / TITLE BAR */
.box .title {
  cursor: move;
  height: 18px;
  width: 100%;
  background: linear-gradient(to bottom, #000080, #0000cc);
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 5px;
  font-weight: bold;
  font-size: 11px;
  border-bottom: 1px solid #808080;
}

.box .title p.title {
  margin: 0;
  font-family: Tahoma;
  font-weight: bold;
  font-size: 11px;
}

.box .title button {
  margin: 0;
  width: 14px;
  height: 14px;
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  font-size: 9px;
  font-weight: bold;
  cursor: pointer;
  color: #000;
}

/* BODY */
.box .body {
  background: #c0c0c0;
  padding: 8px;
  min-height: 50px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* BUTTONS */
.box .body button {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
  padding: 4px 10px;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* INPUTS */
.box .body input {
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  font-size: 11px;
  outline: 1px solid #000;
  background: #fff;
  border: 1px solid #808080;
  padding: 4px 6px;
  width: calc(100% - 12px);
  box-sizing: border-box;
  cursor: text;
}

/* MENU & LINKS */
menu {
  display: block;
  list-style-type: hiragana;
  margin: 2px 0;
  padding-left: 40px;
}

.clickable-text,
.no-style-link {
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

/* CHAT AREA */
#chat {
  border: 3px outset #c0c0c0;
  background: #c0c0c0;
  padding: 8px;
  height: 200px;
  overflow-y: auto;
}

/* CUSTOM SCROLLBARS */
#chat::-webkit-scrollbar,
.playlist::-webkit-scrollbar,
.eq-panel::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

#chat::-webkit-scrollbar-track,
.playlist::-webkit-scrollbar-track,
.eq-panel::-webkit-scrollbar-track {
  background: #c0c0c0;
  border: 1px inset #c0c0c0;
}

#chat::-webkit-scrollbar-thumb,
.playlist::-webkit-scrollbar-thumb,
.eq-panel::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
}

/* --- AUDIO PLAYER --- */

#audioPlayer {
  width: 280px;
  background: #c0c0c0;
  border: 3px outset #c0c0c0;
  box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3);
  font-family: "MS Sans Serif", Tahoma, sans-serif;
  color: #000;
  position: fixed;
  bottom: 0px;
  right: 0px;
  margin-left: -140px;
  z-index: 1000;
}

/* Header */
#audioPlayer .header {
  background: linear-gradient(to bottom, #000080, #0000cc);
  color: #fff;
  font-weight: bold;
  font-size: 10px;
  padding: 2px 5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #808080;
}

#audioPlayer .header button {
  background: #c0c0c0;
  border: 1px outset #c0c0c0;
  font-weight: bold;
  width: 14px;
  height: 12px;
  font-size: 9px;
  cursor: pointer;
  color: #000;
}

/* Body */
#audioPlayer .body {
  background: #c0c0c0;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Track Display */
.track-display {
  background: #000;
  color: #00ff00;
  font-family: "Courier New", monospace;
  font-size: 12px;
  padding: 4px;
  text-align: center;
  border: 2px inset #c0c0c0;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Time Display */
.time-display {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: #000;
  margin-top: 3px;
}

/* Controls */
.controls {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 4px 0;
}

.controls button {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
  padding: 4px 6px;
  font-size: 12px;
  cursor: pointer;
  min-width: 28px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sliders */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-label {
  font-size: 9px;
  font-weight: bold;
  min-width: 35px;
}

input[type="range"] {
  -webkit-appearance: none;
  height: 4px;
  background: #808080;
  border: 1px inset #c0c0c0;
  flex: 1;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
  cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
  cursor: pointer;
}

input[type="range"]::-ms-thumb {
  width: 14px;
  height: 14px;
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
  cursor: pointer;
}

/* Volume Indicator */
.volume-indicator {
  font-size: 9px;
  min-width: 25px;
  text-align: right;
}

/* Panel Toggles */
.panel-toggles {
  display: flex;
  gap: 3px;
  justify-content: center;
  margin-top: 4px;
}

.panel-toggle {
  background: linear-gradient(to bottom, #e0e0e0, #c0c0c0);
  border: 2px outset #c0c0c0;
  padding: 2px 6px;
  font-size: 8px;
  cursor: pointer;
  font-weight: bold;
  min-width: 50px;
}

/* Playlist Panel */
.playlist {
  width: 220px;
  height: 100%;
  overflow-y: auto;
  border: 2px inset #c0c0c0;
  background: #fff;
  display: none;
  position: absolute;
  top: 0;
  left: -225px;
  z-index: 999;
  box-shadow: -4px 4px 8px rgba(0, 0, 0, 0.3);
}

.playlist.show {
  display: block;
}

.playlist-item {
  padding: 4px 8px;
  font-size: 10px;
  cursor: pointer;
  border-bottom: 1px solid #e0e0e0;
}

.playlist-item:hover {
  background: #3465a4;
  color: #fff;
}

.playlist-item.current {
  background: #000080; /* highlight current track */
  color: #fff;
}

.playlist-item:last-child {
  border-bottom: none;
}

/* Equalizer Panel */
.eq-panel {
  width: 180px;
  height: 100px;
  position: absolute;
  bottom: 100%; /* appears above player */
  left: 68%;
  transform: translateX(-50%);
  border: 2px inset #c0c0c0;
  background: #000;
  padding: 8px;
  display: none;
  z-index: 999;
}

.eq-panel.show {
  display: block;
}

.eq-bars {
  display: flex;
  justify-content: center;
  gap: 5px;
  height: 80px;
  align-items: end;
  margin: 0;
  padding: 6px;
}

.eq-bar {
  width: 6px;
  background: #00ff00;
  transition: height 0.1s ease;
  border: 1px solid #008000;
  height: 2px;
}
