@media (max-width: 2000px){
  body{
    overflow:hidden;
  }
}
@media (max-width: 1400px) {
  .left {
    position: absolute;
    left: -100%;
    transition: all 0.3s;
    z-index: 1;
    width: 450px;
    background-color: black;
  }
  body {
    background-color: rgb(18, 18, 18);
    overflow: hidden;
  }
   .cardContainer {
    max-height: 50vh;
  }
  .footer{
    margin-bottom: 10px;
  }
  .library{
   min-height: 70vh;

  }
  .right {
    width: 100vw;
  }
  .playbar {
    width: 95vw;
  }
  .hamburger {
    display: block;
  }
  .close {
    display: block;
    position: absolute;
    right: 31px;
    top: 25px;
  }
  .card {
    width: 50vw;
  }
  .cardContainer {
    gap: 9px;
    justify-content: center;
  }
  
  .info div:first-child {
    max-width: 230px;
    word-break: break-word;
  }
}
@media (max-width: 400px) {
  /* Sidebar (hidden by default on mobile) */
  .left {
    position: absolute;
    left: -120%;
    transition: all 0.3s;
    z-index: 1;
    width: 380px;
    background-color: black;
  }

  .playbar {
    position: fixed;
    bottom: 8px;
    width: 94vw;
    right: 10px;
    padding: 6px;
    filter: invert(1);
    background: #dad5d5;
    border-radius: 8px;
    height: 150px; /* flexible height */
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .abovebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }
  .body{
    overflow: hidden;
  }

  .songinfo {
    color: black;
    padding: 0 2px;
    max-width: 320px;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .songtime {
    font-size: 13px;
    width: auto;
    white-space: nowrap;
    padding: 0;
  }

  .volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }

  .range input {
    width: 100px;
  }

  .seekbar {
    height: 3px;
    width: 95%;
    border-radius: 6px;
    background: black;
    position: absolute; /* safer than absolute */
    bottom: 0;
  }

  .circle {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: black;
    position: relative;
    bottom: 4px;
    left: 0%;
    transition: left 0.5s;
  }

  .player-controls {
    display: flex;
    gap: 45px;
  }

  .info div:first-child {
    max-width: 150px;
    word-break: break-word;
  }

  .right {
    margin: 0;
  }

  .card {
    width: 84vw;
  }

  /* optional: keep songbuttons flex instead of absolute */
  .songbuttons {
    display: flex;
    justify-content: center;
    gap: 16px;
  }
  .cardContainer {
    max-height: 50vh;
  }
}

@media (max-width: 1000px) and (min-width: 400px) {
  .playbar {
    position: fixed;
    bottom: 15px;
    width: 95.7vw;
    right: 17px;
    padding: 12px;
    filter: invert(1);
    background: #dad5d5;
    border-radius: 10px;
    height: 75px;
  }
 
  .seekbar {
    height: 4px;
    width: 95%;
    border-radius: 10px;
    background: black;
    position: absolute;
    bottom: 0;
    margin: 9px 0;
    cursor: pointer;
  }

  .circle {
    width: 13px;
    height: 13px;
    border-radius: 13px;
    background-color: black;
    position: relative;
    bottom: 6px;
    left: 0%;
    transition: left 0.5s;
  }

  .abovebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .songbuttons i {
    cursor: pointer;
  }

  .songtime {
    color: black;
    padding: 0 45px;
  }

  .songinfo {
    color: black;
    padding: 0 2px;
    max-width: 320px; /* adjust width as needed */
    font-size: 15px;
    display: -webkit-box; /* create a flexible box */
    -webkit-line-clamp: 2; /* limit to 2 lines */
    -webkit-box-orient: vertical; /* vertical layout */
    overflow: hidden; /* hide overflowed text */
    text-overflow: ellipsis; /* show ... at cutoff */
    text-align: center;
  }

  .songbuttons {
    display: flex;
    justify-content: center; /* keeps buttons centered horizontally */
    align-items: center;
    gap: 16px;
    margin-right: 80px; /* ensures horizontal centering */
  }

  .songtime {
    width: 125px;
    white-space: nowrap; /* prevents bending */
    font-size: 14px;
  }

  #play {
    width: 10px;
    margin-right: 2px;
  }

  .player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .volume {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-left: 45px;
  }

  .range input {
    cursor: pointer;
  }
}

@media (max-width: 864px) and (min-width: 644px) {
  .songbuttons {
    position: absolute;
    left: 380px;
  }

}

@media (max-width: 811px) and (min-width: 644px) {
  .songinfo {
    max-width: 220px;
  }

  .songbuttons {
    position: absolute;
    left: 280px;
  }
}

@media (max-width: 707px) and (min-width: 644px) {
  .songbuttons {
    position: absolute;
    left: 230px;
  }

}

@media (max-width: 644px) and (min-width: 400px) {
  .left {
    position: absolute;
    left: -120%;
    transition: all 0.3s;
    z-index: 1;
    width: 400px;
    background-color: black;
  }

  .playbar {
    position: fixed;
    bottom: 8px;
    width: 90vw;
    right: 22px;
    padding: 6px;
    filter: invert(1);
    background: #dad5d5;
    border-radius: 8px;
    height: 150px; /* flexible height */
    display: flex;
    flex-direction: column;
    gap: 100px;
  }

  .abovebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .songinfo {
    color: black;
    padding-top: 5px;
    padding-bottom: 5px;
    max-width: 380px;
    font-size: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .songtime {
    font-size: 13px;
    width: auto;
    white-space: nowrap;
    padding: 0;
  }

  
  .cardContainer {
    max-height: 45vh;
  }
  .volume {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
  }

  .range input {
    width: 100px;
  }

  .seekbar {
    height: 3px;
    width: 96%;
    border-radius: 6px;
    background: black;
    position: absolute; /* safer than absolute */
    bottom: 0;
  }

  .circle {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: black;
    position: relative;
    bottom: 4px;
    left: 0%;
    transition: left 0.5s;
  }

  .player-controls {
    display: flex;
    gap: 45px;
  }
  .songbuttons {
    margin-left: 56px;
  }
}

@media (max-width: 400px) {
  /* Sidebar (hidden by default on mobile) */
  .left {
    position: absolute;
    left: -120%;
    transition: all 0.3s;
    z-index: 1;
    width: 99vw; /* relative instead of fixed 380px */
    background-color: black;
  }

  .playbar {
    position: fixed;
    bottom: 8px;
    width: 94vw;
    right: 10px;
    padding: 6px;
    filter: invert(1);
    background: #dad5d5;
    border-radius: 8px;
    height: 150px; /* flexible height */
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .fa-music {
    width: 2px;
  }
  .title {
    width: 105px; /* scales with screen */
    font-size: 12px; /* slightly smaller for 320px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .abovebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
  }

  .songinfo {
    color: black;
    padding: 0 2px;
    max-width: 85vw; /* scales with screen */
    font-size: 14px; /* slightly smaller for 320px */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    text-align: center;
  }

  .songtime {
    font-size: 12px;
    width: auto;
    white-space: nowrap;
    padding: 0;
  }

  .volume {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
  }

  .range input {
    width: 70px; /* reduced for smaller screens */
  }

  .seekbar {
    height: 3px;
    width: 92%;
    border-radius: 6px;
    background: black;
    position: absolute;
    bottom: 0;
  }

  .circle {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: black;
    position: relative;
    bottom: 4px;
    left: 0%;
    transition: left 0.5s;
  }

  .player-controls {
    display: flex;
    gap: 30px; /* reduce spacing */
    flex-wrap: wrap; /* allow buttons to wrap if too tight */
    justify-content: center;
  }

  .songbuttons {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap; /* buttons can go to 2nd line if screen is small */
  }

  .cardContainer {
    max-height: 45vh;
  }
  .playnow span {
    font-size: 12px;
  }
  .loginbtn{
    width:79px;
  }
.signupbtn{
  font-size: 14px;
}

.buttons > * {
  margin: 0 5px;
}
.navs{
  margin-top: 4px;
}
}
