/* Version 1.3: centered bars, 20px padding, title-left, timer */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: Arial, sans-serif; background: #f5f5f5; height: 100vh; overflow: hidden; }
.container { display: flex; height: 100%; }

/* SIDEBAR */
.sidebar {
  width: 30%; padding: 20px; background: #fff;
  overflow-y: auto; box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}
.sidebar h2 { margin: 20px 0 10px; font-size: 1.1em; }
.sidebar input[type="file"],
.sidebar input[type="text"],
.sidebar select,
.sidebar input[type="color"],
.sidebar button {
  width: 100%; margin: 8px 0; padding: 6px;
}
.sidebar label { display: block; margin: 8px 0; }

/* PROGRESS BAR */
.progress-bar {
  width: 100%; height: 6px; background: #ddd;
  border-radius: 3px; overflow: hidden; margin: 10px 0;
}
.progress-fill {
  width: 0; height: 100%; background: #4caf50;
  transition: width 0.2s ease;
}

/* MAIN PREVIEW */
.main {
  width: 70%; padding: 20px; overflow-y: auto;
}
.player-preview {
  position: relative;
  background-color: #000;              /* fallback */
  background-position: center;
  background-size: cover;              /* cover the box */
  margin-bottom: 20px;
  padding: 0 20px;                      /* 20px left/right padding */
  overflow: hidden;
}

/* TITLE & SOCIAL */
.player-preview .title {
  position: absolute; top: 20px; left: 20px;
  transform: none;
  color: #fff; text-shadow: 0 0 5px rgba(0,0,0,0.7);
  font-size: 1.5rem; white-space: nowrap;
  max-width: calc(100% - 40px); /* account for padding */
  overflow: hidden; text-overflow: ellipsis;
}
.player-preview .social {
  position: absolute; bottom: 10px; left: 20px;
  color: #fff; text-shadow: 0 0 5px rgba(0,0,0,0.7);
  font-size: 1rem;
}

/* TIMER */
.player-preview .timer {
  position: absolute; bottom: 10px; right: 20px;
  background: rgba(0,0,0,0.4); padding: 2px 6px;
  color: #fff; font-size: 0.9rem;
  text-shadow: 0 0 4px rgba(0,0,0,0.7);
  border-radius: 3px;
}

/* SPECTRUM */
.player-preview canvas {
  position: absolute; top: 0; left: 20px; /* respect left padding */
  width: calc(100% - 40px);               /* respect both sides */
  height: 100%;
  pointer-events: none;    /* let clicks through */
  opacity: 0.6;
}

/* CUSTOM PLAY/PAUSE */
.player-preview .play-btn {
  position: absolute; bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: none; border: none; padding: 0;
  cursor: pointer; opacity: 0; transition: opacity 0.3s;
}
.player-preview:hover .play-btn { opacity: 1; }
.player-preview .play-btn svg {
  width: 48px; height: 48px;
  fill: var(--control-color, #fff);
}
