* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overscroll-behavior: none;
}

body {
    background-color: black;
    font-family: "Montserrat", sans-serif;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: none;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

::selection {
    background-color: #1db954;
    color: black;
}


nav {
    background-color: black;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 4rem;
    position: sticky;
    top: 0;
    z-index: 50;
}

.left-half {
    display: flex;
    align-items: center;
    color: white;
}

.logo {
    font-size: 2.5rem;
    margin: 1rem;
    color: #1db954;
}

.home-icon {
    font-size: 1.7rem;
    background-color: #1f1f1f;
    color: rgb(179, 179, 179);
    padding: 8px;
    border-radius: 50%;
    margin: 0 1rem;
    transition: 0.3s;
    cursor: pointer;
}

.home-icon:hover {
    color: white;
    transform: scale(1.05);
}

.search-bar {
    display: flex;
    height: 3rem;
    width: 30rem;
    border-radius: 20rem;
    background-color: #1f1f1f;
    align-items: center;

}

.search-bar:hover {
    background-color: #2c2c2c;
    border: 1px solid rgb(116, 116, 116);
}

.search-bar:focus-within {
    background-color: #2c2c2c;
    border: 1px solid #1db954;
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.15);
}

.search-icon {
    font-size: 1.5rem;
    color: rgb(179, 179, 179);
    padding: 0 0.7rem;
}

.search-bar:hover .search-icon {
    color: white;
}

.input-box {
    width: 78%;
    height: 60%;
    background-color: transparent;
    border: none;
    border-right: 1px solid rgb(179, 179, 179);
    color: white;
    font-size: 1.1rem;
    transition: 0.2s;
    outline: none;
    font-family: "Montserrat", sans-serif;
}

.input-box::placeholder {
    color: rgb(140, 140, 140);
}

.browse {
    font-size: 1.3rem;
    margin-left: 0.6rem;
}

.browse:hover {
    transform: scale(1.2);
}

.right-half {
    display: flex;
    align-items: center;
    color: white;
    width: 48%;

}

.right-half-p1 {
    display: flex;
    align-items: center;
    height: 1.7rem;
    margin: 0 1rem;
    padding: 0 1rem 0 0;
    border-right: 1px solid rgb(179, 179, 179);
}

.nav-text {
    font-weight: 600;
    transition: 0.1s;
    padding: 0 0.5rem;
    color: rgb(179, 179, 179);
}

.nav-text:hover {
    color: white;
    transform: scale(1.05);
    cursor: pointer;
}

.right-half-p2 {
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    justify-content: space-between;
    gap: 2rem;



}

.Install {
    display: flex;
    align-items: center;
    width: auto;
}

.login-btn {
    height: 3rem;
    width: 7rem;
    margin-left: auto;
    margin-right: 1rem;
    border-radius: 15rem;
    border: none;
    background-color: #1db954;
    color: black;
    font-size: 1rem;
    font-weight: 700;
    transition: 0.2s;
    cursor: pointer;
}

.login-btn:hover {
    background-color: #1ed760;
    transform: scale(1.05);
}


.main {
    background-color: black;
    width: 100%;
    flex: 1;
    min-height: 0;
    margin-top: 0.5rem;
    display: flex;
    justify-content: space-around;
    color: white;
    overflow: hidden;
}

.main-left-part {
    width: 27%;
    height: 100%;
    background-color: #121212;
    border-radius: 10px;
}


.library {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 1rem 1.5rem;
}

.library p {
    font-weight: 600;
}

.library div {
    font-size: 2rem;
    color: rgb(179, 179, 179);
    background-color: #2f2f2f;
    padding: 8px;
    height: 2rem;
    width: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 30rem;
    transition: 0.2s;

}

.library div:hover {
    color: white;
    background-color: #3a3a3a;
}

.box-container {

    margin-top: 1rem;
    height: 100%;
}

.box {
    background-color: #1f1f1f;
    height: 22%;
    width: 98%;
    border-radius: 10px;
    margin: 1rem 0;


}

.box h4 {
    font-weight: 600;
    padding: 1.3rem 0 0.5rem 1rem;

}

.box p {
    font-size: 0.8rem;
    padding-left: 1rem;
}

.box button {
    background-color: #1db954;
    color: black;
    font-weight: 600;
    padding: 0.6rem 0.8rem;
    margin: 1rem 0 0 1rem;
    border-radius: 25rem;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.box button:hover {
    transform: scale(1.05);
    background-color: #1ed760;
}

.main-right-part {
    width: 72%;
    height: 100%;
    background-color: #121212;
    border-radius: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #444 #121212;
}

.music-card img {
    height: 10rem;
    width: 10rem;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
}

.music-card {
    width: 11.5rem;
    min-width: 11.5rem;
    padding: 0.7rem;
    border-radius: 5px;
    transition: 0.2s;
    position: relative;
    flex-shrink: 0;
}

.music-card:hover {
    background-color: #222;
    transform: translateY(-3px);
}

.music-section {
    margin: 2rem 0 2rem 2rem;
}

.songs {
    margin: 2rem 0;
    display: flex;
    overflow-x: auto;
    gap: 0.3rem;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.songs::-webkit-scrollbar {
    height: 6px;
}

.songs::-webkit-scrollbar-track {
    background: transparent;
}

.songs::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.songs::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.music-card {
    cursor: pointer;
}

body.player-page-body {
    min-height: 100vh;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    background:
        radial-gradient(circle at top left, rgba(29, 185, 84, 0.2), transparent 26%),
        linear-gradient(135deg, #050505 0%, #111 50%, #181818 100%);
}

.player-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.4rem;
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(18px);
    background: rgba(0, 0, 0, 0.72);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.player-logo {
    text-decoration: none;
}

.page-back-btn,
.hero-secondary-btn,
.player-search-submit,
.player-circle-btn,
.player-queue-item {
    font-family: inherit;
}

.page-back-btn,
.hero-secondary-btn {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border-radius: 999px;
    padding: 0.8rem 1.1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.page-back-btn:hover,
.hero-secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.player-search-form {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.player-search-bar {
    width: min(100%, 34rem);
    padding-right: 0.4rem;
}

.player-search-input {
    border-right: none;
}

.player-search-submit {
    border: none;
    background: #1db954;
    color: black;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.72rem 1.2rem;
    cursor: pointer;
    transition: 0.2s ease;
}

.player-search-submit:hover {
    background: #1ed760;
    transform: scale(1.03);
}

.player-page-shell {
    width: min(1280px, 100% - 2rem);
    margin: 1.4rem auto 2rem;
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 1.4rem;
    align-items: start;
}

.player-stage-card,
.player-queue-panel {
    background: rgba(18, 18, 18, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 24px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.player-stage-card {
    padding: 1.6rem;
    display: grid;
    grid-template-columns: minmax(260px, 360px) minmax(0, 1fr);
    gap: 1.8rem;
}

.player-cover-panel {
    position: relative;
}

.player-cover {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 22px;
    display: block;
    position: relative;
    z-index: 1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.player-glow {
    position: absolute;
    inset: auto 12% -1rem;
    height: 3rem;
    background: rgba(29, 185, 84, 0.45);
    filter: blur(28px);
    z-index: 0;
}

.player-meta-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.95rem;
    color: white;
    min-width: 0;
}

.player-kicker {
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1db954;
}

.player-song-title {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: normal;
    overflow-wrap: break-word;
}

.player-song-artist {
    font-size: 1.15rem;
    color: #f1f1f1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-song-album {
    color: #b3b3b3;
    font-size: 0.98rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-cta-row {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.player-status-pill,
.queue-count {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(29, 185, 84, 0.14);
    color: #9cf0b7;
    font-size: 0.92rem;
    font-weight: 600;
}

.player-controls-card {
    margin-top: 0.4rem;
    padding: 1.25rem;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.player-main-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.player-circle-btn .player-btns {
    margin: 0;
    line-height: 1;
}

.player-circle-btn {
    border: none;
    background: transparent;
    color: inherit;
    cursor: pointer;
    transition: 0.2s ease;
    padding: 0.4rem 1rem;
}

.player-circle-btn:hover {
    transform: scale(1.05);
}

.player-circle-btn--primary {
    background: transparent;
}

#playerToggle .player-btns {
    font-size: 2rem;
}

.player-progress-block,
.player-volume-row {
    margin-top: 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: white;
}

.player-progress-block input,
.player-volume-row input {
    flex: 1;
}

.player-queue-panel {
    padding: 1.35rem;
    position: sticky;
    top: 6.2rem;
}

.player-queue-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    color: white;
    margin-bottom: 1rem;
}

.player-queue-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: calc(100vh - 10rem);
    overflow-y: auto;
    padding-right: 0.2rem;
}

.player-queue-item {
    width: 100%;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.04);
    color: white;
    padding: 0.75rem;
    border-radius: 18px;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 0.8rem;
    align-items: center;
    cursor: pointer;
    text-align: left;
    transition: 0.2s ease;
}

.player-queue-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.08);
}

.player-queue-item.active {
    background: rgba(29, 185, 84, 0.16);
    border-color: rgba(29, 185, 84, 0.45);
}

.player-queue-item img {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    object-fit: cover;
}

.player-queue-info {
    min-width: 0;
}

.player-queue-title,
.player-queue-artist {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-queue-title {
    font-weight: 700;
    margin-bottom: 0.22rem;
}

.player-queue-artist,
.player-queue-duration,
.player-empty-state {
    color: #b3b3b3;
    font-size: 0.92rem;
}

.player-empty-state {
    padding: 1rem;
    text-align: center;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 980px) {
    .player-topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .player-search-form {
        justify-content: stretch;
    }

    .player-search-bar {
        width: 100%;
    }

    .player-page-shell {
        grid-template-columns: 1fr;
    }

    .player-stage-card {
        grid-template-columns: 1fr;
    }

    .player-queue-panel {
        position: static;
    }

    .player-queue-list {
        max-height: none;
    }
}

@media (max-width: 640px) {
    .player-topbar {
        padding: 1rem;
    }

    .page-back-btn span,
    .hero-secondary-btn span {
        display: none;
    }

    .player-page-shell {
        width: min(100% - 1rem, 1280px);
        margin-top: 1rem;
    }

    .player-stage-card,
    .player-queue-panel {
        padding: 1rem;
        border-radius: 18px;
    }

    .player-controls-card {
        padding: 1rem;
    }

    .player-circle-btn {
        width: 3rem;
        height: 3rem;
    }

    .player-circle-btn--primary {
        width: 3.8rem;
        height: 3.8rem;
    }

    .player-search-submit {
        padding: 0.72rem 1rem;
    }

    .player-search-bar {
        height: 2.8rem;
    }

    .player-search-input {
        font-size: 0.95rem;
    }

    .player-meta-panel {
        gap: 0.7rem;
    }

    .player-song-title {
        font-size: 1.9rem;
    }

    .player-controls-card {
        padding: 0.9rem;
    }

    .player-main-controls {
        gap: 0.4rem;
        flex-wrap: wrap;
    }

    .player-circle-btn {
        padding: 0.3rem 0.5rem;
    }

    #playerToggle .player-btns {
        font-size: 1.8rem;
    }

    .player-progress-block,
    .player-volume-row {
        gap: 0.6rem;
    }

    .player-queue-list {
        max-height: 45vh;
    }
}

@media (max-width: 520px) {
    .player-topbar {
        gap: 0.6rem;
    }

    .page-back-btn {
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
    }

    .player-page-shell {
        width: min(100% - 0.8rem, 1280px);
        gap: 0.9rem;
    }

    .player-stage-card,
    .player-queue-panel {
        padding: 0.85rem;
        border-radius: 16px;
    }

    .player-cover {
        border-radius: 16px;
    }

    .player-song-title {
        font-size: 1.6rem;
    }

    .player-song-artist {
        font-size: 1rem;
    }

    .player-queue-item {
        grid-template-columns: 50px minmax(0, 1fr) auto;
        padding: 0.6rem;
    }

    .player-queue-item img {
        width: 50px;
        height: 50px;
        border-radius: 12px;
    }
}

@media (max-width: 380px) {
    .player-search-submit {
        padding: 0.6rem 0.85rem;
        font-size: 0.85rem;
    }

    .player-controls-card {
        padding: 0.75rem;
    }

    .player-status-pill,
    .queue-count {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
    }

    .player-song-title {
        font-size: 1.4rem;
    }
}

.img-title {
    margin: 0.7rem 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
    font-size: 0.9rem;
}

.img-description {
    font-size: 0.8rem;
    color: rgb(179, 179, 179);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-play-btn {
    color: #1db954;
    font-size: 2.7rem;
    position: absolute;
    background-color: rgb(0, 0, 0);
    width: 2.7rem;
    height: 2.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: 0.3s ease-in;
    right: 0.7rem;
    top: 7rem;
    opacity: 0;
    cursor: pointer;
}

.music-play-btn:hover {
    color: #1ed760;
    transform: translateY(-6px) scale(1.05);
}

.music-card:hover .music-play-btn {
    opacity: 1;
    transform: translateY(-6px);
}

.music-section h2 {
    font-size: 1.4rem;
    font-weight: 700;
}


.player-bar{
    width: 100%;
    height: 5rem;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #181818;
    border-top: 1px solid #282828;
}
.music-controller{
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50%;
}
.player{
    display: flex;
    align-items: center;
   
}
.player-btns{
    font-size: 1.1rem;
    margin: 0;
    color: rgb(190, 190, 190);
    cursor: pointer;
    transition: 0.2s;
}

.player .player-btns {
    margin: 0.4rem 1rem;
}
.player-btns:hover{
    transform: scale(1.05);
    color:rgb(255, 255, 255) ;
    font-weight: 600;
}
#play{
    font-size: 2rem;
}

#progressBar {
    appearance: none;
    width: 600px;
    height: 3px;
    background: linear-gradient(to right, #1db954 0%, #333 0%);
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    transition: height 0.15s ease;
}

#progressBar:hover {
    height: 5px;
}

input[type='range']::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    transition: transform 0.15s ease;
}

input[type='range']:hover::-webkit-slider-thumb {
    transform: scale(1.4);
    background-color: #1db954;
}

input[type='range']::-moz-range-thumb {
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    border: none;
    cursor: pointer;
}

input[type='range']:hover::-moz-range-thumb {
    transform: scale(1.4);
    background-color: #1db954;
}
.now-bar{
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 260px;         
    flex-shrink: 0;       
}

.now-info {
    min-width: 0;
    flex: 1;
    overflow: hidden;
}


.idle-player {
    display: flex;
    align-items: center;
    gap: 12px;
    animation: idleFadeIn 0.6s ease;
}

.idle-player.hidden {
    display: none;
}

@keyframes idleFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.idle-vinyl {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: conic-gradient(#1db954, #191414, #1db954, #191414, #1db954);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: idleVinylSpin 6s linear infinite;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(29, 185, 84, 0.3);
    padding: 3px;
}

@keyframes idleVinylSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.idle-eq {
    width: 30px;
    height: 30px;
    background: #121212;
    border-radius: 50%;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    padding: 6px 4px;
    animation: idleVinylSpin 6s linear infinite reverse;
}

.idle-eq span {
    display: block;
    width: 3px;
    border-radius: 2px;
    background: #1db954;
}

.idle-eq span:nth-child(1) {
    height: 40%;
    animation: eqBounce 0.8s ease-in-out infinite alternate;
    animation-delay: 0s;
}
.idle-eq span:nth-child(2) {
    height: 70%;
    animation: eqBounce 0.6s ease-in-out infinite alternate;
    animation-delay: 0.15s;
}
.idle-eq span:nth-child(3) {
    height: 100%;
    animation: eqBounce 0.7s ease-in-out infinite alternate;
    animation-delay: 0.3s;
}
.idle-eq span:nth-child(4) {
    height: 55%;
    animation: eqBounce 0.9s ease-in-out infinite alternate;
    animation-delay: 0.1s;
}
.idle-eq span:nth-child(5) {
    height: 35%;
    animation: eqBounce 0.75s ease-in-out infinite alternate;
    animation-delay: 0.25s;
}

@keyframes eqBounce {
    0%   { height: 15%; }
    100% { height: 100%; }
}

.idle-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.idle-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(90deg, #1db954, #1ed760, #1db954);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: idleGradient 3s ease infinite;
}

@keyframes idleGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.idle-tip {
    font-size: 0.7rem;
    color: #b3b3b3;
    transition: opacity 0.4s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}
.img-title-info {
    margin-left: 0.5rem;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
    font-weight: 600;
}

.img-des-info {
    margin-left: 0.5rem;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.7rem;
    color: #b3b3b3;
}
.player-bar img {
    height: 4rem;
    width: 4rem;
    border-radius: 10px;
    padding: 0.3rem;
    flex-shrink: 0;
    transition: border-radius 0.3s ease;
}

.player-bar img.now-spinning {
    border-radius: 50%;
    animation: nowSpin 8s linear infinite;
}

.player-bar img.now-spinning.paused {
    animation-play-state: paused;
}

@keyframes nowSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.img-title-info.marquee {
    animation: marqueeScroll 8s linear infinite;
}

@keyframes marqueeScroll {
    0%, 20% { transform: translateX(0); }
    80%, 100% { transform: translateX(calc(-100% + 160px)); }
}

.song-duration {
    position: absolute;
    top: 8.8rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.75);
    color: #b3b3b3;
    font-size: 0.65rem;
    padding: 2px 5px;
    border-radius: 3px;
    pointer-events: none;
}

.active {
    color: #1db954;
}

.active:hover {
    color: #1ed760;
}



.mobile-search-btn {
    display: none;
    font-size: 1.3rem;
    background-color: #1f1f1f;
    color: rgb(179, 179, 179);
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
}

.mobile-search-btn:hover {
    color: white;
}

@media (max-width: 1024px) {
    .main-left-part {
        width: 32%;
    }

    .main-right-part {
        width: 67%;
    }

    .search-bar {
        width: 22rem;
    }

    #progressBar {
        width: 400px;
    }

    .right-half-p1 {
        display: none;
    }

    .music-card {
        width: 10.5rem;
        min-width: 10.5rem;
    }

    .music-card img {
        width: 9rem;
        height: 9rem;
    }

    .music-play-btn {
        top: 6rem;
        font-size: 2.4rem;
        width: 2.4rem;
        height: 2.4rem;
    }

    .song-duration {
        top: 7.7rem;
    }
}

@media (max-width: 900px) {
    .main {
        flex-direction: column;
        justify-content: flex-start;
        flex: 1;
        min-height: 0;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .main-left-part {
        width: 100%;
        height: auto;
        max-height: 200px;
        overflow: hidden;
    }

    .main-right-part {
        width: 100%;
        height: 60vh;
    }

    .box-container {
        display: flex;
        gap: 0.5rem;
        padding: 0 0.5rem;
        height: auto;
    }

    .box {
        width: 50%;
        height: auto;
        margin: 0;
    }

    .box h4 {
        padding: 0.8rem 0 0.3rem 0.8rem;
        font-size: 0.85rem;
    }

    .box p {
        font-size: 0.7rem;
        padding-left: 0.8rem;
    }

    .box button {
        margin: 0.5rem 0 0.8rem 0.8rem;
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
    }

    .search-bar {
        width: 20rem;
    }

    #progressBar {
        width: 350px;
    }
}

@media (max-width: 768px) {
    nav {
        height: 3.5rem;
        padding: 0 0.3rem;
    }

    .logo {
        font-size: 2rem;
        margin: 0.5rem;
    }

    .home-icon {
        font-size: 1.3rem;
        margin: 0 0.4rem;
        padding: 6px;
    }

    .search-bar,
    .search-container {
        display: none;
    }

    .mobile-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-container.mobile-active {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.95);
        z-index: 200;
        padding: 1rem;
    }

    .search-container.mobile-active .search-bar {
        display: flex;
        width: 100%;
        height: 3rem;
        margin-top: 1rem;
    }

    .search-container.mobile-active .search-results {
        width: 100%;
        max-height: calc(100vh - 6rem);
        position: relative;
        top: 0.5rem;
    }

    .right-half {
        width: auto;
    }

    .right-half-p1 {
        display: none;
    }

    .right-half-p2 {
        gap: 0.5rem;
    }

    .Install,
    .sign-up {
        display: none;
    }

    .login-btn {
        height: 2.4rem;
        width: 5.5rem;
        font-size: 0.85rem;
        margin-right: 0.5rem;
    }

    .main {
        width: 100%;
        margin-top: 0.5vh;
        padding: 0 0.3rem;
    }

    .main-left-part {
        display: none;
    }

    .main-right-part {
        width: 100%;
        height: 75vh;
        border-radius: 8px;
    }

    .music-section {
        margin: 1.2rem 0 1.2rem 1rem;
    }

    .music-section h2 {
        font-size: 1.2rem;
    }

    .music-card {
        width: 9rem;
        min-width: 9rem;
        padding: 0.5rem;
    }

    .music-card img {
        width: 8rem;
        height: 8rem;
        border-radius: 4px;
    }

    .img-title {
        font-size: 0.8rem;
        margin: 0.4rem 0;
    }

    .img-description {
        font-size: 0.7rem;
    }

    .music-play-btn {
        font-size: 2rem;
        width: 2rem;
        height: 2rem;
        top: 5.5rem;
        right: 0.5rem;
        opacity: 1;
    }

    .music-card:hover .music-play-btn {
        transform: translateY(-4px);
    }

    .music-play-btn:hover {
        transform: translateY(-4px) scale(1.05);
    }

    .song-duration {
        top: 6.8rem;
        right: 0.8rem;
        font-size: 0.6rem;
    }

    .player-bar {
        flex-direction: column;
        height: auto;
        padding: 0.5rem 0.8rem;
        gap: 0.4rem;
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 150;
        background-color: #181818;
        border-top: 1px solid #282828;
    }

    .now-bar {
        width: 100%;
        gap: 8px;
    }

    .idle-vinyl {
        width: 42px;
        height: 42px;
    }

    .idle-eq {
        width: 24px;
        height: 24px;
        padding: 5px 3px;
    }

    .idle-title {
        font-size: 0.8rem;
    }

    .idle-tip {
        font-size: 0.65rem;
        max-width: 160px;
    }

    .player-bar img {
        height: 3rem;
        width: 3rem;
    }

    .img-title-info {
        max-width: 200px;
        font-size: 0.8rem;
    }

    .img-des-info {
        max-width: 200px;
        font-size: 0.65rem;
    }

    .music-controller {
        width: 100%;
    }

    #progressBar {
        width: 100%;
    }

    .progress-container {
        width: 100%;
        gap: 6px;
    }

    .player .player-btns {
        margin: 0.2rem 0.6rem;
        font-size: 1rem;
    }

    #play {
        font-size: 1.7rem;
    }

    .volume-container {
        width: 100%;
        justify-content: center;
        padding-right: 0;
        padding-bottom: 0.3rem;
    }

    .volume-slider {
        width: 100px;
    }

    .main-right-part {
        padding-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    nav {
        height: 3rem;
    }

    .logo {
        font-size: 1.7rem;
        margin: 0.3rem 0.5rem;
    }

    .home-icon {
        font-size: 1.1rem;
        margin: 0 0.3rem;
        padding: 5px;
    }

    .mobile-search-btn {
        font-size: 1.1rem;
        padding: 5px;
    }

    .login-btn {
        height: 2rem;
        width: 4.5rem;
        font-size: 0.75rem;
    }

    .main-right-part {
        height: 70vh;
    }

    .music-section {
        margin: 1rem 0 1rem 0.7rem;
    }

    .music-section h2 {
        font-size: 1rem;
    }

    .songs {
        gap: 0.2rem;
        margin: 1rem 0;
    }

    .music-card {
        width: 8rem;
        min-width: 8rem;
        padding: 0.4rem;
    }

    .music-card img {
        width: 7.2rem;
        height: 7.2rem;
    }

    .img-title {
        font-size: 0.72rem;
        margin: 0.3rem 0;
    }

    .img-description {
        font-size: 0.62rem;
    }

    .music-play-btn {
        font-size: 1.8rem;
        width: 1.8rem;
        height: 1.8rem;
        top: 5rem;
        right: 0.4rem;
    }

    .song-duration {
        top: 6rem;
        right: 0.6rem;
        font-size: 0.55rem;
        padding: 1px 4px;
    }

    .player-bar {
        padding: 0.4rem 0.5rem;
        gap: 0.3rem;
    }

    .player-bar img {
        height: 2.5rem;
        width: 2.5rem;
    }

    .now-bar {
        gap: 6px;
    }

    .img-title-info {
        max-width: 150px;
        font-size: 0.75rem;
    }

    .img-des-info {
        max-width: 150px;
        font-size: 0.6rem;
    }

    .player .player-btns {
        margin: 0.2rem 0.4rem;
        font-size: 0.9rem;
    }

    #play {
        font-size: 1.5rem;
    }

    .time-display {
        font-size: 0.65rem;
        min-width: 28px;
    }

    .volume-container {
        gap: 4px;
    }

    .volume-icon {
        font-size: 0.9rem;
    }

    .volume-slider {
        width: 70px;
    }

    .loading {
        padding: 2rem;
        font-size: 0.85rem;
    }

    .spinner {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 360px) {
    .music-card {
        width: 7rem;
        min-width: 7rem;
    }

    .music-card img {
        width: 6.2rem;
        height: 6.2rem;
    }

    .music-play-btn {
        font-size: 1.6rem;
        width: 1.6rem;
        height: 1.6rem;
        top: 4.2rem;
        right: 0.4rem;
    }

    .song-duration {
        top: 5.2rem;
        font-size: 0.5rem;
    }

    .img-title-info {
        max-width: 110px;
    }

    .img-des-info {
        max-width: 110px;
    }

    .player .player-btns {
        margin: 0.15rem 0.3rem;
    }

    .volume-slider {
        width: 55px;
    }
}

.search-container {
    position: relative;
}

.search-results {
    display: none;
    position: absolute;
    top: 3.5rem;
    left: 0;
    width: 100%;
    max-height: 400px;
    overflow-y: auto;
    background-color: #282828;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 100;
    scrollbar-width: thin;
    scrollbar-color: #444 #282828;
}

.search-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    transition: 0.2s;
}

.search-item:hover {
    background-color: #3a3a3a;
}

.search-item img {
    width: 45px;
    height: 45px;
    border-radius: 5px;
    object-fit: cover;
    margin-right: 12px;
    flex-shrink: 0;
}

.search-item-info {
    overflow: hidden;
}

.search-item-title {
    color: white;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-artist {
    color: #b3b3b3;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-no-results {
    padding: 20px;
    text-align: center;
    color: #b3b3b3;
}

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #b3b3b3;
    padding: 3rem;
    font-size: 1rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #333;
    border-top: 3px solid #1db954;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.time-display {
    color: #b3b3b3;
    font-size: 0.75rem;
    min-width: 35px;
    text-align: center;
}

.volume-container {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 200px;
    flex-shrink: 0;
    justify-content: flex-end;
    padding-right: 1rem;
}

.volume-icon {
    color: #b3b3b3;
    font-size: 1.1rem;
    cursor: pointer;
    transition: 0.2s;
}

.volume-icon:hover {
    color: white;
}

.volume-slider {
    appearance: none;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, #1db954 70%, #333 70%);
    border-radius: 5px;
    cursor: pointer;
    outline: none;
    transition: height 0.15s ease;
}

.volume-slider:hover {
    height: 5px;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
}


.toast-notification {
    position: fixed;
    bottom: 110px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #282828;
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: "Montserrat", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    max-width: 90vw;
    text-align: center;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification .fa-circle-exclamation {
    color: #e74c3c;
    font-size: 1.1rem;
}

.toast-notification .fa-circle-check {
    color: #1db954;
    font-size: 1.1rem;
}

.toast-notification .fa-circle-info {
    color: #3498db;
    font-size: 1.1rem;
}


.retry-btn:hover {
    transform: scale(1.05);
    background: #1ed760 !important;
}

.retry-btn:active {
    transform: scale(0.96);
}


.retry-btn .spinner {
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: black;
    width: 14px;
    height: 14px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
}


