/* GLOBAL */
body {
  margin: 0;
  padding: 0;
  background: #0d0d0d;
  color: #eaeaea;
  font-family: "Segoe UI", Arial, sans-serif;
  overflow-x: hidden;
}

.hidden {
  display: none !important;
}

/* LANDING SCREEN */
.landing {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* BUTTONS */
.btn {
  background: #00ffb4;
  color: #0d0d0d;
  border: none;
  padding: 14px 28px;
  font-size: 18px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 0 12px rgba(0, 255, 180, 0.6);
  transition: 0.2s ease;
}

.btn:hover {
  background: #0d0d0d;
  color: #00ffb4;
  box-shadow: 0 0 18px rgba(0, 255, 180, 1);
}

.stop {
  margin-top: 20px;
}

/* MAIN LAYOUT */
#mainLayout {
  display: flex;
  height: 100vh;
  width: 100vw;
}

/* SIDEBAR */
.sidebar {
  width: 220px;
  background: #1a1a1a;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 255, 180, 0.2);
  flex-shrink: 0;
}

.sidebar h2 {
  color: #00ffb4;
  font-size: 28px;
  margin-bottom: 10px;
}

.sidebar p {
  font-size: 14px;
  color: #b5b5b5;
}

/* MAIN CONTENT */
.content {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow-y: auto;
  padding: 10px;
}

/* CANVAS (stick figure) */
#canvas {
  background: black;
  width: 100%;
  max-width: 1280px;
}

/* AUDIO PLAYER */
.player-box {
  margin-top: 20px;
  text-align: center;
  width: 100%;
}

audio {
  width: 100%;
  max-width: 400px;
}

.status {
  margin-top: 10px;
  font-size: 14px;
  color: #8affd9;
}

/* PLAYLIST PANEL */
.playlist {
  width: 300px;
  background: #1a1a1a;
  padding: 20px;
  box-shadow: 0 0 20px rgba(0, 255, 180, 0.2);
  margin-top: 20px;
  border-radius: 12px;
}

.playlist h3 {
  color: #00ffb4;
  margin-bottom: 10px;
}

.playlist ul {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
}

.playlist li {
  margin-bottom: 8px;
  color: #eaeaea;
}

/* ALBUM INFO */
.album-info img {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 8px;
}

.album-info p {
  font-size: 14px;
  color: #b5b5b5;
}

.placeholder {
  font-style: italic;
  color: #888;
}

/* HIDE VIDEO FEED */
#video {
  display: none !important;
}

/* TABLET RESPONSIVE */
@media (max-width: 900px) {
  #mainLayout {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #00ffb4;
    box-shadow: none;
  }

  .content {
    padding: 10px;
  }

  .playlist {
    width: 100%;
    max-width: none;
  }
}

/* MOBILE: TWO-COLUMN TOP (20% HEIGHT) + FULL CANVAS (80% HEIGHT) */
@media (max-width: 900px) {

  /* Top row wrapper */
  .mobile-top {
    display: flex;
    flex-direction: row;
    width: 100%;
    height: 20vh;
    min-height: 20vh;
    max-height: 20vh;
    overflow: hidden;
    gap: 10px;
    padding: 10px;
  }

  /* Sidebar + Playlist become two columns */
  .sidebar,
  .playlist {
    width: 50%;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    margin: 0;
    box-shadow: none;
    border-radius: 8px;
  }

  #canvas {
    width: 100vw;
    height: 80vh;
    max-width: none;
    max-height: none;
    aspect-ratio: auto !important;   /* ← THIS FIXES THE CLIPPING */
    display: block;
  }



  .player-box {
    width: 100%;
    text-align: center;
  }
}

/* PHONE-SPECIFIC TWEAKS */
@media (max-width: 480px) {
  .btn {
    padding: 12px 20px;
    font-size: 16px;
  }

  .sidebar h2 {
    font-size: 22px;
  }

  audio {
    max-width: 300px;
  }

  .playlist {
    padding: 15px;
  }
}
