body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background: linear-gradient(to top, #edeff0, #42a5f5);
  color: #123;
    margin-top: 60px; 
}

.container {
  display: flex;
  height: 100vh;
  overflow: hidden;
    margin-top: 60px; 
}
.content.with-right-panel {
  margin-right: 300px;
   transition: margin-right 0.3s ease;
}
.container h2{
  margin-left: 10px;
}

.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: hsl(205, 63%, 66%);
  color: white;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
}

/* Gộp trái: logo + home */
.header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Logo và chữ */
.wevibe-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

/* Logo nhỏ lại */
.wevibe-logo {
  width: 32px;
  height: 32px;
  margin-top: 0;
}

/* Chữ logo */
.wevibe-text {
  font-size: 18px;
  font-weight: bold;
  background: linear-gradient(90deg, #007cf0, #00dfd8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
  letter-spacing: 1px;
}

/* Nút home */
#homeBtn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 20px;
}

/* Search bar */
.search-bar {
  position: relative;
  width: 400px;
  max-width: 100%;
}

.search-bar input {
  width: 100%;
  padding: 8px 40px 8px 36px;
  border-radius: 20px;
  border: 1px solid #aaa;
  font-size: 14px;
  background: rgb(110, 183, 251);
  color: #044;
}

.search-bar .search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: #066;
  font-size: 16px;
}

/* Avatar người dùng */
.user-menu {
  position: relative;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
}


.dropdown {
  position: absolute;
  top: 50px;
  right: 0;
  background-color: #afd3f4; /* tone mint nhẹ */
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  z-index: 1000;
  width: 180px;
}

.dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  color: #054742;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.3s;
}

.dropdown a:hover {
  background-color: #82addb;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.sidebar {
  width: 300px;
  background: linear-gradient(to top, #edeff0, #3195e8);
  border-right: 2px solid rgba(0, 0, 0, 0.15);
  height: 100vh;
  padding: 20px;
  box-sizing: border-box;
   display: flex;
  flex-direction: column;
  overflow: hidden; /* ẩn scroll ở ngoài */
}
.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  margin-top: 10px;
  padding-right: 4px; /* có chút padding để hiện scroll đẹp hơn */
}

.sidebar-scroll::-webkit-scrollbar {
  width: 6px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
}

.sidebar-tabs-horizontal {
  display: flex;
  gap: 8px;
  margin: 10px 0 20px;
  justify-content: space-between;
  
}

.sidebar-tabs-horizontal .tab {
  flex: 1;
  padding: 8px;
  background: #6aa2eb;
  border: none;
  border-radius: 6px;
  color: #044;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 12px;
  text-align: center;
}

.sidebar-tabs-horizontal .tab:hover {
  background: #8cc2ef;
}

.sidebar-tabs-horizontal .tab.active {
  background: #93bbe5;
  color: white;
}



.playlist-list li {
  display: flex;
  align-items: center;
   margin-left: -20px;
  gap: 10px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: background 0.2s;
}


.playlist-list li:hover {
  background: #4ba6e3;
  border-radius: 6px;
  padding: 5px;
}

.playlist-list img {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  object-fit: cover;
}


.content {
  flex: 1;
  background: linear-gradient(to top, #d6e5f1, #42a5f5);
  padding: 20px;
  overflow-y: auto;
  padding-top: 30px;
  padding-bottom: 100px; /* chừa khoảng dưới cho thanh bar */
}

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* nhỏ hơn */
  gap: 12px;
  margin-top: 20px;
}


.playlist-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #b2e2df;
  text-align: center;
  width: 100%;
}

.playlist-card img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.playlist-card .name {
  font-size: 12px;
  padding: 6px;
  color: #044;
}


#song-list {
  list-style: none;
  padding: 0;
}

#song-list li {
  background: #ffffff;
  padding: 10px;
  margin-bottom: 10px;
  border-left: 5px solid #639ce6;
  cursor: pointer;
  color: #033;
}
.now-playing-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #99c5e7;
  color: #123;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  height: 40px;
  font-size: 14px;
  z-index: 1000;
}

.now-left {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 30%;
}

.now-left img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 4px;
}

.song-info {
  display: flex;
  flex-direction: column;
}

.song-info .title {
  font-weight: bold;
}

.song-info .artist {
  font-size: 12px;
  color: #aaa;
}

.now-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 40%;
}

.controls {
  display: flex;
  gap: 16px;
  font-size: 18px;
  align-items: center;
  justify-content: center;
}

.play-btn {
  font-size: 30px;
}

.progress {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.progress input[type="range"] {
  flex: 1;
  height: 4px;
  accent-color: white;
}

.now-right {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 30%;
  justify-content: flex-end;
}

.volume-bar {
  width: 80px;
  accent-color: white;
}

.active-icon {
  color: #1db954; /* Màu xanh lá Spotify */
}

.right-song-panel {
  position: fixed;
  top: 60px;  /* đẩy panel xuống dưới header */
  right: 0;
  width: 300px;
  height: calc(100% - 60px);  /* để panel không vượt quá màn hình */
  background-color: #91c3eb;
  padding: 20px;
  overflow-y: auto;
  box-shadow: -2px 0 5px rgba(0,0,0,0.2);
}
.right-song-panel.hidden {
  display: none;
}
.right-song-panel img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 10px;
}
.right-song-panel h3, .right-song-panel p {
  margin: 5px 0;
}
.right-song-panel audio {
  width: 100%;
  margin: 10px 0;
}
.right-song-panel .lyrics {
  margin-top: 10px;
}
.right-song-panel .lyrics h4 {
  margin-bottom: 5px;
}
.right-song-panel .lyrics p {
  font-size: 14px;
  white-space: pre-wrap;
}
#right-audio-player {
  display: none;
}
.expand-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 18px;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  padding: 8px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

/* Hiện nút khi hover vào panel */
.right-song-panel:hover .expand-btn {
  opacity: 1;
  pointer-events: auto;
}

.expand-btn:hover {
  background: rgba(255, 255, 255, 0.4);
}

.right-song-panel.expanded {
    position: fixed;
  top: 60px;       /* chừa chỗ header (logo + home + search + tabs) */
  left: 0;
  width: 100vw;
  bottom: 60px;    /* chừa chỗ now–playing bar */
  background: #82b7e5;
  padding: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.5);
  z-index: 999;    /* cao hơn nội dung nhưng thấp hơn header/bar nếu cần */
  overflow-y: auto;
  transition: all 0.3s ease;
}

/* Mặc định ẩn icon */
.right-song-panel .hover-controls {
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Khi hover vào panel thì hiện icon */
.right-song-panel:hover .hover-controls {
  opacity: 1;
  pointer-events: auto;
}

/* Style icon */
.hover-controls i {
  font-size: 20px;
  color: white;
  background: rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.2s;
}

.hover-controls i:hover {
  background: rgba(255, 255, 255, 0.4);
}



.hidden {
  display: none;
}
.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}

.tab {
  padding: 8px 16px;
  background: #9acaf0;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  color: #044;
  transition: background 0.2s;
}

.tab:hover {
  background: #98b1eb;
}

.tab.active {
  background: #8fc8eb;
  color: white;
}
.playlist-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 10px 0 5px;
}
.playlist-header h3{
  margin-left: 3px;
}

#addBtn {
  background-color: #4ca7f1;   /* Pastel xanh */
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;          /* Hình tròn */
  display: flex;
  align-items: center;
  justify-content: center;
  color: #055;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}

#addBtn:hover {
  background-color: #85cbe9;   /* Hover đậm hơn */
  color: white;
}

#addBtn svg {
  width: 20px;
  height: 20px;
}
.create-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  height: 100%;
  background: #f3fffd;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 10;
  transition: transform 0.3s ease;
}

.create-panel.hidden {
  transform: translateX(100%);
}

.create-panel input[type="text"] {
  width: 100%;
  padding: 8px;
  margin-bottom: 12px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.song-select-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.create-panel button {
  padding: 8px;
  background-color: #0aaba3;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}
.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.sidebar-header h2 {
  font-size: 24px;
  font-weight: bold;
  margin: 0;
}

#homeBtn {
  background-color: #3a9dee;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #055;
  cursor: pointer;
  transition: background 0.2s ease;
}

#homeBtn:hover {
  background-color: #85cbe9;
  color: white;
}
/* Popup nền phủ màn hình */
.login-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-popup.hidden {
  display: none;
}

/* Container chính của popup */
#popupContainer {
  background-color: #e3f2fd; /* pastel blue */
  border-radius: 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
  width: 768px;
  max-width: 100%;
  min-height: 480px;
  color: #0d47a1;
}

#popupContainer p,
#popupContainer span,
#popupContainer a {
  color: #0d47a1;
}

#popupContainer button {
  background: linear-gradient(to right, #64b5f6, #42a5f5);
  color: #fff;
  font-size: 12px;
  padding: 10px 45px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 10px;
  cursor: pointer;
}

#popupContainer button.hidden {
  background-color: transparent;
  border: 1px solid #90caf9;
  color: #0d47a1;
}

#popupContainer form {
  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 40px;
  height: 100%;
}

#popupContainer input {
  background-color: #ffffff;
  border: 1px solid #bbdefb;
  margin: 8px 0;
  padding: 10px 15px;
  font-size: 13px;
  border-radius: 8px;
  width: 100%;
  outline: none;
  color: #0d47a1;
}
.form-container {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  transition: all 0.6s ease-in-out;
  overflow: hidden;
}

/* SIGN IN FORM */
.sign-in {
  left: 0;
  z-index: 2;
  transform: translateX(0%);
  opacity: 1;
  pointer-events: auto;
}

#popupContainer.active .sign-in {
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* SIGN UP FORM */
.sign-up {
  left: 50%;
  z-index: 1;
  transform: translateX(0%);
  opacity: 0;
  pointer-events: none;
}

#popupContainer.active .sign-up {
  transform: translateX(-100%);
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}


@keyframes move {
  0%, 49.99% {
    opacity: 0;
    z-index: 1;
  }
  50%, 100% {
    opacity: 1;
    z-index: 5;
  }
}

.social-icons {
  margin: 20px 0;
}

.social-icons a {
  border: 1px solid #90caf9;
  border-radius: 50%;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin: 0 3px;
  width: 40px;
  height: 40px;
  color: #1565c0;
  background-color: #ffffff;
}

.toggle-container {
  position: absolute;
  top: 0;
  left: 50%;
  width: 50%;
  height: 100%;
  overflow: hidden;
  transition: all 0.6s ease-in-out;
  border-radius: 150px 0 0 100px;
  z-index: 1000;
}

#popupContainer.active .toggle-container {
  transform: translateX(-100%);
  border-radius: 0 150px 100px 0;
}

.toggle {
  background: linear-gradient(to right, #90caf9, #42a5f5);
  color: #fff;
  position: relative;
  left: -100%;
  height: 100%;
  width: 200%;
  transform: translateX(0);
  transition: all 0.6s ease-in-out;
}

#popupContainer.active .toggle {
  transform: translateX(50%);
}

.toggle-panel {
  position: absolute;
  width: 50%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0 30px;
  text-align: center;
  top: 0;
  transform: translateX(0);
  transition: all 0.6s ease-in-out;
}

.toggle-left {
  transform: translateX(-200%);
}

#popupContainer.active .toggle-left {
  transform: translateX(0);
}

.toggle-right {
  right: 0;
  transform: translateX(0);
}

#popupContainer.active .toggle-right {
  transform: translateX(200%);
} 