:root {
  --black: #000;
  --textgrey: #a7a7a7;
  --grey: #121212;
  --green: #71d962;
  --primary: #fff;
  --lighterblack: #131313;
  --lightergrey: #a7a7a7;
  --darkgrey: #5e5e5e;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: "Montserrat", sans-serif;
  margin: 0;
  background-color: #000000;
  color: #fff;
  overflow: hidden;
  scrollbar-width: thin;
  user-select: none; /* Disable text selection */
  -webkit-user-select: none; /* For Safari/Chrome */
  -ms-user-select: none; /* For older IE versions */
}

img {
  /* pointer-events: none;  */
  user-drag: none; /* Drag ko disable kare */
  -webkit-user-drag: none; /* Safari ke liye */
}

.logo {
  width: 40px;
  margin-top: 10px;
  margin-left: 20px;
}

#home-button {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  padding: 15px;
  border: none;
  border-radius: 50%;
  background-color: #63636370;
  color: white;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

#home-button:hover {
  transform: scale(1.04); /* Add a slight zoom on hover */
}

.search-container {
  display: flex;
  align-items: center;
  border-radius: 20px;
  margin-top: 10px;
  margin-left: 220px;
}

#search-input {
  flex: 1;
  padding: 15px;
  border: none;
  width: 250px;
  border-radius: 0 20px 20px 0;
  outline: none;
  background-color: #63636370;
  color: white;
}

#search-input::placeholder {
  color: #b3b3b3;
}

#search-button {
  padding: 15px;
  border: none;
  border-radius: 20px 0 0 20px;
  background-color: #63636370;
  color: white;
  cursor: pointer;
}

.main-container {
  display: flex;
  flex: 1;
  padding: 0.5rem;
}

.sidebar {
  position: relative;
  background-color: transparent;
  width: 320px;
  min-width: 70px;
  max-width: 800px;
  border-radius: 1rem;
  margin-right: 0.5rem;
}

.main-content {
  background-color: #26262670;
  flex: 1;
  border-radius: 0.5rem;
  overflow-y: auto;
  height: calc(80vh - 10vh);
  overflow-x: hidden;
  padding-bottom: 10vh;
}

.main-content::-webkit-scrollbar {
  display: none;
}

.main-content:hover::-webkit-scrollbar {
  display: block;
}

.main-content h2 {
  margin-left: 1.8rem;
}

.music-player {
  display: flex;
  position: sticky;
  width: 100%;
  bottom: 0;
  left: 0;
  height: 10vh;
  justify-content: space-between;
  align-items: center;
  background-color: #000000;
  z-index: 1000;
}

a {
  color: white;
  text-decoration: none;
}

.nav {
  background-color: #121212;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
}

.nav-option {
  line-height: 2.5rem;
  opacity: 0.75;
  /* margin-left: 0.5rem 0.75rem; */
  padding: 0.5rem 0.75rem;
}

.nav-option i {
  font-size: 1.25rem;
}

.nav-option a {
  font-size: 1rem;
  margin-left: 1rem;
}

.nav-option:hover {
  opacity: 1;
}

.library {
  background-color: #26262670;
  border-radius: 1rem;
  height: calc(80vh - 10vh);
  padding-bottom: 10vh;
  border-radius: 0.5rem;
  overflow: hidden;
}

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.75rem;
}

.lib-option {
  font-size: 1.25rem;
}

.lib-option img {
  height: 1.25rem;
  width: 1.25rem;
}

.icons {
  font-size: 1.2rem;
  display: flex;
}

.icons i {
  opacity: 0.7;
  margin-right: 0.5rem;
  padding: 1rem;
  border-radius: 50%;
  width: 0rem;
  height: 0rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icons i:hover {
  opacity: 1;
  background-color: #44444449;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.box {
  background-color: #232323;
  height: 8rem;
  border-radius: 1rem;
  padding: 1rem 1.25rem;
  height: fit-content;
  margin: 0.75rem 0 1.75rem 0;
}

.box-p1 {
  font-size: 1rem;
  font-weight: 500;
}

.box-p2 {
  font-size: 0.85rem;
  opacity: 0.9;
}

.dark-badge {
  background-color: #000;
  color: #fff;
}

.badge {
  background-color: #fff;
  border: none;
  border-radius: 100px;
  font-weight: 700;
  padding: 0.25rem 1rem;
  margin-top: 0.5rem;
  height: 2rem;
  width: fit-content;
}

.dark-badge {
  background-color: #000;
  color: #fff;
}

.sticky-nav {
  position: sticky;
  top: 0;
  /* background-color: #000; */
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 8vh;
  /* padding: 0.5rem 0 0.5rem 0; */
  z-index: 100;
}

.sticky-nav-icons {
  margin-left: 1rem;
}

.sticky-nav-options {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-item {
  margin-right: 1rem;
}

@media (max-width: 1000px) {
  .hide {
    display: none;
  }
}

.cards-container {
  display: flex;
  flex-wrap: wrap;
  padding: 0 1rem;
}

.card {
  width: 160px;
  border-radius: 0.5rem;
  padding: 0.75rem;
  /* text-align: center; */
  position: relative;
}

.card:hover {
  cursor: pointer;
  background-color: #44444449;
}

.card-img {
  width: 100%;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
}

.card-info {
  font-size: 0.9rem;
  opacity: 0.8;
}

.play-icon {
  position: absolute;
  width: 50px;
  height: 50px;
  bottom: 130px;
  right: 25px;
  border: none;
  background-color: #1ed760;
  border-radius: 50%;
  display: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.card:hover .play-icon {
  display: block;
  background-color: #1ed760;
}

.play-icon i {
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.card:hover .play-icon:hover {
  background-color: #52ee88;
}

.play-button {
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.footer {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.line {
  width: 90%;
  height: 30%;
  border-top: 1px solid white;
  opacity: 0.4;
}

.album {
  width: 25%;
  display: flex;
  align-items: center;
}

.player {
  width: 60%;
  align-items: center;
}

.player-controls {
  display: flex;
  justify-content: center;
  align-items: center;
}

.controls {
  width: 25%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.player-control-icon {
  height: 1rem;
  margin: 0 1rem 0 1rem;
  /* opacity: 0.75; */
}

.player-control-icon:hover {
  opacity: 1;
  cursor: pointer;
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.playback-bar {
  display: flex;
  justify-content: center;
  align-items: center;
}

#curr-time,
#tot-time {
  font-size: 0.8rem;
  opacity: 0.75;
  margin: 0.2rem;
  padding-top: 0.25rem;
}

.progress-bar {
  width: 65%;
  border-radius: 1rem;
  height: 0.25rem;
  margin-top: 0.4rem;
  appearance: none;
  background: #333;
  cursor: pointer;
}

.progress-bar::-webkit-slider-runnable-track {
  /* background-color: #1bd760; */
  border-radius: 1rem;
  height: 0.25rem;
  opacity: 0;
}
.progress-bar.green-active {
  background: #1db954 !important;
}

.progress-bar:hover::-webkit-slider-runnable-track {
  opacity: 1;
}

.progress-bar::-webkit-slider-thumb {
  appearance: none;
  height: 12px;
  width: 12px;
  background-color: white;
  border-radius: 50%;
  margin-top: -4px;
  opacity: 0;
}

.progress-bar:hover::-webkit-slider-thumb {
  opacity: 1;
}

.album-info {
  margin-left: 0.5rem;
  overflow: hidden;
}

.album-icon {
  margin: 0 1rem 0 1rem;
  /* opacity: 0.75; */
}

.album-icon:hover {
  opacity: 1;
  cursor: pointer;
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.control-icon {
  height: 1rem;
  margin: 0 0.75rem 0 0.5rem;
  opacity: 0.9;
}

.control-icon:hover {
  opacity: 1;
  cursor: pointer;
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

.sound-bar {
  width: 25%;
  appearance: none;
  background-color: #333;
  border-radius: 1rem;
  cursor: pointer;
}

.sound-bar::-webkit-slider-runnable-track {
  /* background-color: #1bd760; */
  border-radius: 1rem;
  height: 0.25rem;
}

.sound-bar::-webkit-slider-thumb {
  appearance: none;
  height: 12px;
  width: 12px;
  background-color: white;
  border-radius: 50%;
  margin-top: -4px;
  opacity: 0;
}

.sound-bar:hover::-webkit-slider-thumb {
  opacity: 1;
}

#carousel-container {
  display: flex;
  align-items: center;
  position: relative;
}

#carousel {
  display: flex;
  overflow-x: hidden;
  scroll-behavior: smooth;
  width: 100%;
  gap: 0px;
}

#carousel > div:first-child {
  margin-left: 1rem;
}

#carousel > div:last-child {
  margin-right: 1rem;
}

.card {
  flex: 0 0 auto;
  position: relative;
}

.nav-btn {
  background-color: #121212;
  width: 30px;
  height: 30px;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  position: absolute;
  opacity: 0;
  z-index: 2;
}

#carousel-container:hover .nav-btn {
  background-color: #121212d6;
  width: 30px;
  height: 30px;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  position: absolute;
  opacity: 0.95;
  z-index: 2;
}

#prev-btn {
  left: 5px;
}

#next-btn {
  right: 5px;
}

@media (max-width: 767px) {
  #carousel {
    overflow: hidden;
    /* overflow-x: scroll; */
    -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
    scroll-snap-type: x mandatory; /* Adds snap behavior */
  }

  #carousel > * {
    flex-shrink: 0; /* Prevents carousel items from shrinking */
  }
}

/* Tablet Devices */
@media (max-width: 1024px) and (min-width: 768px) {
  #carousel {
    overflow: hidden;
    /* overflow-x: scroll; */
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }

  #carousel > * {
    flex-shrink: 0;
  }
}

.nav-btn:disabled {
  display: none;
}

/* Container for lists of artists and playlists */
.library-box1 {
  overflow-y: auto;
  height: 80vh;
  padding: 0 0.5rem;
}

.library-box {
  overflow-x: hidden;
  overflow-y: auto;
  height: calc(80vh - 14vh);
  /* padding-bottom: 10vh; */
  padding: 0 0.5rem;
}

.library-box::-webkit-scrollbar {
  display: none;
}

.library-box:hover::-webkit-scrollbar {
  display: block;
}

/* List style for artists and playlists */
.artist-list,
.playlist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Each library item */
.library-item {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0.45rem;
  margin: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.library-item:hover {
  margin: 0;
  /* background-color: #292929; */
  background-color: #44444449;
}

.library-item img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin-right: 1rem;
}

.library-item span {
  color: white;
}

.library-item:hover span {
  opacity: 0.8;
}

.badge-heading {
  display: inline-block;
  background-color: #44444449;
  color: white;
  font-size: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: 50px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin: 0 0.5rem 0 0.5rem;
  margin-bottom: 0.5rem;
}

.library-item-pinned {
  display: flex;
  align-items: center;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.5rem 0.45rem;
  margin: 0;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.library-item-pinned:hover {
  margin: 0;
  background-color: #44444449;
}

.library-item-pinned img {
  width: 50px;
  height: 50px;
  border-radius: 5px;
  margin-right: 1rem;
}

.library-item-pinned span {
  color: white;
}

.library-item-pinned:hover span {
  opacity: 0.8;
}

#profileIcon {
  font-size: 1.2rem;
  cursor: pointer;
  margin-top: 10px;
  margin-right: 30px;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: #63636370;
  min-width: 160px;
  z-index: 1;
  top: 100%;
  right: 0;
  margin-top: 1.2rem;
  margin-right: 5px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  border-radius: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

.dropdown-content {
  display: block;
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content a {
  color: white;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  font-size: 14px;
  text-align: left;
  border-bottom: 1px solid #444;
}

.dropdown-content a:last-child {
  border-bottom: none;
}

.dropdown-content a:hover {
  background-color: #1bd760;
  color: black;
}

@media (max-width: 480px) {
  .dropdown-content {
    min-width: 140px;
    font-size: 12px;
  }
}

.hidden {
  display: none !important;
}

.show {
  display: block;
}

.hidden {
  display: none;
}

#login-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal-content {
  background: #121212;
  color: #fff;
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

#login-button,
#close-modal {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  margin: 10px;
  cursor: pointer;
}

#login-button {
  background-color: #1ed760;
  color: #000;
}

#login-button:hover {
  background-color: #52ee88;
}

#close-modal {
  background-color: #555;
  color: #fff;
}

.resize-handle {
  position: absolute;
  right: -5px;
  top: 0;
  width: 2px;
  height: 100%;
  /* cursor: ew-resize; */
  cursor: -webkit-grab;
  /* background-color: #ccc; */
}

.resize-handle:hover {
  background-color: #999999;
}

.resize-handle:active {
  background-color: rgba(255, 255, 255, 0.9); /* Slightly darker on click */
}

.playing-view-resize-handle {
  position: absolute;
  left: 0;
  top: 0;
  width: 2px;
  height: 100%;
  /* cursor: ew-resize; */
  cursor: -webkit-grab;
  transition: background-color 0.3s ease;
}

.playing-view-resize-handle:hover {
  background-color: rgba(255, 255, 255, 0.6);
}

.playing-view-resize-handle:active {
  background-color: rgba(255, 255, 255, 0.8);
}

#controlIcon {
  width: 14px;
  object-fit: contain;
}

.now-playing-view {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 360px;
  max-width: 400px;
  min-width: 250px;
  align-items: center;
  justify-content: center;
  background-color: #26262670;
  margin-left: 0.5rem;
  color: white;
  border-radius: 10px;
  overflow: hidden;
  height: 80vh;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Close Icon (X) at the top right */
.close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  transition: opacity 0.3s ease, transform 0.3s ease;
  opacity: 0;
  z-index: 10;
  transform: scale(0.7);
}

.close-btn:hover {
  opacity: 1;
  transform: scale(1);
}

/* Video Container */
.video-container {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.3s ease;
}

.song-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.album-image {
  position: absolute;
  top: 70px;
  width: 90%;
  object-fit: cover;
  display: block;
  border-radius: 0.5rem;
  transition: opacity 0.3s ease;
}

.now-playing-view:hover .song-video {
  opacity: 1;
}

/* Song Details Section (Initially at bottom) */
.song-details {
  position: absolute;
  bottom: 20px;
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  justify-self: start;
  align-self: start;
  z-index: 1;
  transition: bottom 0.3s ease, transform 0.3s ease;
}

.song-title {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 0.2rem;
}

.song-info {
  /* color: #dadada; */
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  opacity: 0.8;
}

.now-playing-view:hover .close-btn {
  opacity: 1;
}

::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-thumb {
  background: var(--darkgrey);
}

::-webkit-scrollbar-thumb:active {
  background: var(--lightergrey);
}

/* Hide scrollbar on mobile devices */
@media (max-width: 768px) {
  /* Hide scrollbar in Webkit-based browsers (Chrome, Safari) */
  ::-webkit-scrollbar {
    display: none;
  }

  /* Enable scrolling */
  body {
    overflow: scroll;
  }

  /* For Firefox */
  body {
    scrollbar-width: thin; /* Optional: makes the scrollbar thin */
    scrollbar-color: transparent transparent; /* Hide the scrollbar */
  }
}

@media (max-width: 1000px) {
  .main-content h2 {
    font-size: 20px;
  }

  .sidebar {
    width: 75px;
    padding: 0;
  }

  .sidebar .nav-option a {
    display: none;
  }

  .sidebar .nav-option i {
    font-size: 1.5rem;
  }

  .library-box {
    height: 71vh;
  }

  .sidebar .icons {
    display: none;
  }

  .badge-heading {
    display: none;
  }
}

@media (max-width: 650px) {
  .sidebar {
    width: 75px;
    padding: 0;
  }
  .card {
    width: 120px;
  }

  .card-title {
    font-size: 12px;
  }

  .card-info {
    font-size: 0.7rem;
  }

  .play-icon {
    width: 40px;
    height: 40px;
    bottom: 105px;
    right: 20px;
  }

  .play-icon i {
    font-size: 16px;
  }

  .album-info,
  .album-artist {
    display: none;
  }
}

@media (max-width: 400px) {
  /* .sidebar, .library, .main-content, .now-playing-view {
    height: 75vh;
  }

  .sidebar {
    width: 75px;
    padding: 0;
  } */

  .sidebar {
    width: 75px;
    padding: 0;
  }
  .card {
    width: 80px;
  }

  .card-title {
    font-size: 10px;
  }

  .card-info {
    font-size: 0.5rem;
  }

  .play-icon {
    width: 30px;
    height: 30px;
    bottom: 95px;
    right: 15px;
  }

  .play-icon i {
    font-size: 12px;
  }

  .album-info,
  .album-artist {
    display: none;
  }
}
