@import url('https://fonts.googleapis.com/css2?family=Lato:wght@700&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Creepster&display=swap');

#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    z-index: 1;
}

#canvas1 {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    z-index: 1;
}

#allcontent > * {
    z-index: 2;
    opacity: 0.75;
}

:root {
    --a: 0;
}

* {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    box-sizing: border-box;
}

.close {
    display: none;
}

body {
    background-color: rgba(34, 34, 34, 0);
    color: white;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
    padding-bottom: 85px; /* Adjusted for playbar height */
}

#leftcontainer {
    height: 100vh;
    overflow: auto;
    margin-left: 70px;
    margin-top: 70px;
    margin-bottom: 70px;
    background-color: rgba(34, 34, 34, 0);
    width: 400px;
}

#rightcontainer {
    margin-right: 70px;
    margin-top: 70px;
    margin-bottom: 70px;
    background-color: rgba(34, 34, 34, 0);
    height: calc(100vh - 140px);
    overflow-y: auto;
}

#lefthomecontainer {
    overflow: auto;
    opacity: 1;
    display: block;
}

.left {
    width: 20vw;
    padding: 10px;
    background-color: rgba(34, 34, 34, 0);
    border-radius: 10px;
}

.right {
    width: 70vw;
    padding: 10px;
    background-color: rgba(34, 34, 34, 0);
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home ul li {
    display: flex;
    gap: 15px;
    list-style: none;
    padding-top: 14px;
    font-weight: bold;
    align-items: center;
}

.home ul li a {
    text-decoration: none;
    color: rgb(0, 137, 98);
    font-size: 15px;
}

/* Fix left container icons */
.home ul li img, .heading img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
}

.heading {
    display: flex;
    gap: 15px;
    width: 100%;
    padding: 23px 14px;
    font-weight: bold;
    align-items: center;
    font-size: 13px;
    background-color: rgba(34, 34, 34, 0);
    border-radius: 10px;
}

.library {
    min-height: 80vh;
    position: relative;
    background-color: rgba(34, 34, 34, 0);
    border-radius: 10px;
}

.footer {
    display: flex;
    font-size: 10px;
    color: grey;
    gap: 13px;
    position: absolute;
    bottom: 0;
    padding: 10px 0;
    flex-wrap: wrap;
}

.footer a {
    color: grey;
}

.right {
    margin: 5px;
    position: relative;
}

.header {
    display: flex;
    justify-content: space-between;
    background-color: rgba(33, 33, 33, 0.9);
    flex-wrap: wrap;
    border-radius: 10px;
    align-items: center;
    justify-content: space-evenly;
    align-self: center;
}

.header > * {
    padding: 10px;
    height: 20px;
    width: 250px;
}

.RLC {
    padding: 16px;
    background-color: rgba(34, 34, 34, 0.005);
    border-radius: 10px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 1;
    flex-grow: 1;
    overflow-y: auto;
}

.RLC h1 {
    text-align: center;
    width: 100%;
    color: rgb(206, 206, 206);
    margin-bottom: 20px;
}

/* Album Cards Container */
.cardContainer {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    justify-content: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
    background-color: rgba(37, 37, 37, 0.2);
    margin-bottom: 20px;
}

/* Album Cards */
.card {
    width: 100%;
    max-width: 220px;
    padding: 18px;
    border-radius: 10px;
    background-color: rgba(37, 37, 37, 1);
    position: relative;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 1);
    justify-self: center;
    box-sizing: border-box;
}

.card:hover {
    background-color: rgba(12, 0, 139, 0.9);
    cursor: pointer;
    --a: 1;
    opacity: 1;
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.card.selected {
    background-color: rgba(139, 0, 53, 1);
    color: rgb(5, 0, 65);
    border: 2px solid #777777;
    text-shadow: 0px, 0px, 10px, rgb(255, 255, 255);
}

.card.selected:hover {
    background-color: rgba(121, 31, 223, 0.7);
    --a: 1;
}

.card > * {
    padding-top: 12px;
    opacity: 1;
}

.card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 1/1;
}

.play {
    width: 36px;
    height: 36px;
    background-color: #1e88e5;
    border-radius: 50%;
    padding: 8px;
    display: flex;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: var(--a);
    transition: all 1s ease-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.buttons > * {
    margin: 0 12px;
    align-items: center;
    align-self: center;
}

/* Hide sign in and login buttons permanently */
.signupbtn, .loginbtn {
    display: none !important;
}

/* Playbar - Professional layout */
.playbar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    filter: invert(1);
    background: rgba(226, 217, 217, 1);
    border-radius: 15px 15px 0 0;
    width: 100%;
    padding: 8px 0;
    height: 85px !important;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
    opacity: 1;
    box-sizing: border-box;
}

/* Playbar sections */
.playbar-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0 15px;
    height: 30px !important;
    box-sizing: border-box;
}

.playbar-middle {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 15px;
    height: 30px !important;
    box-sizing: border-box;
}

.playbar-bottom {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 15px;
    height: 25px !important;
    box-sizing: border-box;
}

/* Song info */
.songinfo {
    color: black;
    font-weight: 500;
    font-size: 14px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

/* Play controls */
.songbuttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    align-items: center;
}

/* Volume controls */
.volume {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    width: 150px;
}

.volume .range input {
    width: 120px;
    cursor: pointer;
}

/* Seekbar - moved inside playbar */
.seekbar-container {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 15px;
    height: 25px !important;
    box-sizing: border-box;
}

/* Timestamps */
.songtime {
    color: black;
    font-weight: 500;
    font-size: 11px;
    min-width: 40px;
    text-align: center;
}

/* Seekbar - professional sizing */
.seekbar {
    height: 4px;
    width: 100%;
    background: black;
    border-radius: 10px;
    position: relative;
    margin: 0 10px;
    cursor: pointer;
}

.circle {
    width: 12px;
    height: 12px;
    border-radius: 12px;
    background-color: black;
    position: absolute;
    bottom: -4px;
    left: 0%;
    transition: left 0.5s;
}

/* Override inline width and height attributes for playbar icons */
#previous, #play, #next {
    width: 22px !important;
    height: 22px !important;
    max-width: 22px !important;
    max-height: 22px !important;
}

.volume img {
    width: 18px !important;
    height: 18px !important;
    max-width: 18px !important;
    max-height: 18px !important;
}

/* Song List - Fixed artwork size */
.songList {
    height: 544px;
    overflow: auto;
    margin-bottom: 44px;
    background-color: rgba(34, 34, 34, 0.5);
    border-radius: 10px;
}

.hamburger {
    display: none;
    cursor: pointer;
    height: 24px;
    width: 24px;
}

.hamburgerContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    height: 24px;
}

.songList ul {
    padding: 0 12px;
}

.songList ul li {
    list-style-type: decimal;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    padding: 12px 0;
    border: 1px solid rgba(146, 143, 143, 0.491);
    margin: 12px 0;
    padding: 13px;
    border-radius: 5px;
    background-color: rgba(34, 34, 34, 0.5);
    align-items: center;
}

/* Fixed song list artwork size */
.songList ul li img {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
    border-radius: 4px;
    object-fit: cover;
}

.songList .info {
    font-size: 13px;
    flex: 1;
    min-width: 0;
}

.info div {
    word-break: break-all;
}

/* Add style for the artist name */
.info div:last-child {
    color: rgb(0, 88, 175);
    font-weight: 500;
}

.playnow {
    display: flex;
    justify-content: center;
    align-items: center;
}

.playnow span {
    font-size: 15px;
    width: 64px;
    padding: 12px;
}

/* Typography for Cards */
.card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
}

.card h4 {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 3px;
    font-weight: 500;
}

.card p {
    font-size: 13px;
    color: #999;
    font-weight: 400;
}

/* Search bar */
.searchbar {
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    align-self: center;
    background-color: rgba(27, 27, 27, 0.7);
    border-radius: 24px;
    padding: 6px 10px;
    gap: 8px;
    width: 360px;
    border: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 1px 2px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.03);
    transition: border-color .2s ease, box-shadow .2s ease, background-color .2s ease;
    height: 32px;
    box-sizing: border-box;
}

.searchbar:hover {
    border-color: rgba(255,255,255,0.16);
}

.searchbar:focus-within {
    background-color: rgba(32, 32, 32, 0.7);
    border-color: rgba(127, 86, 217, 0.6);
    box-shadow: 0 0 0 3px rgba(127, 86, 217, 0.25), inset 0 1px 0 rgba(255,255,255,0.04);
}

.searchbar input[type="text"] {
    flex: 1 1 auto;
    background: transparent;
    border: none;
    outline: none;
    color: #f2f2f2;
    font-size: 14px;
    line-height: 1.4;
    padding: 4px 8px;
    min-width: 0;
    box-sizing: border-box;
}

.searchbar input[type="text"]::placeholder {
    color: rgba(255,255,255,0.45);
}

.searchbar img {
    width: 16px;
    height: 16px;
    opacity: 0.85;
}

/* Logo styles */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

#Labelname {
    font-family: 'Creepster', cursive;
    font-size: 18px;
    color: rgb(175, 0, 47);
    margin-left: 8px;
    line-height: 1;
    text-align: center;
}

.logo img {
    display: block;
    border-radius: 50%;
    object-fit: cover;
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
}

/* Mobile Responsiveness */
@media (max-width: 1200px) {
    /* Ensure left container is properly hidden */
    .left {
        position: fixed;
        left: -100%;
        top: 0;
        width: 340px;
        height: 100vh;
        background-color: rgba(18, 18, 18, 0.98);
        z-index: -10;
        transition: left 0.3s ease;
        overflow-y: auto;
        margin: 0;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.8);
        border-radius: 0;
    }

    .left.active {
        left: 0;
        z-index: -10;
    }

    /* Ensure right container has higher z-index and solid background */
    .right, #rightcontainer, .RLC, .cardContainer {
        z-index: 2;
        position: relative;
        background-color: rgba(34, 34, 34, 0.98);
        border-radius: 10px;
    }

    .right {
        width: 100%;
        margin: 0;
        padding: 10px;
    }

    #rightcontainer {
        margin: 0;
        padding: 10px;
        height: calc(100vh - 140px);
    }

    .close {
        display: block;
        position: absolute;
        top: 15px;
        right: 15px;
        cursor: pointer;
        z-index: 1000;
        width: 30px;
        height: 30px;
        padding: 5px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
    }

    .hamburger {
        display: block;
    }

    .cardContainer {
        margin: 20px auto;
        gap: 20px;
        padding: 0 15px;
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .card {
        max-width: 180px;
        padding: 15px;
    }

    body {
        padding-bottom: 85px;
    }

    .playbar {
        height: 95px !important;
        padding: 5px 0;
    }
    
    .playbar-top {
        height: 25px !important;
    }
    
    .playbar-middle {
        height: 35px !important;
    }
    
    .playbar-bottom {
        height: 20px !important;
    }

    /* Volume slider adjustments for mobile */
    .volume {
        width: 120px;
    }
    
    .volume .range input {
        width: 40%;
    }

    #previous, #play, #next {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }

    .volume img {
        width: 16px !important;
        height: 16px !important;
        max-width: 16px !important;
        max-height: 16px !important;
    }

    .songinfo {
        font-size: 13px;
        max-width: 120px;
    }

    .songtime {
        font-size: 10px;
        min-width: 35px;
    }

    .seekbar {
        height: 3px;
    }

    .circle {
        width: 10px;
        height: 10px;
        bottom: -3.5px;
    }
}

@media (max-width: 768px) {
    /* Simplified mobile layout */
    .header {
        padding: 8px;
        flex-direction: column;
        align-items: center;
        height: auto;
        width: 100%;
        position: relative;
        z-index: -10;
    }

    .searchbar {
        width: 100%;
        max-width: 400px;
        height: 30px;
        margin-bottom: 10px;
    }

    /* Ensure content area has proper background */
    #rightcontainer {
        background-color: rgba(34, 34, 34, 0.98);
        border-radius: 10px;
        margin: 10px;
        padding: 10px;
        height: calc(100vh - 175px);
    }

    .cardContainer {
        gap: 15px;
        padding: 0 10px;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    }

    .card {
        max-width: 160px;
        padding: 12px;
    }

    .card h2 {
        font-size: 16px;
    }

    .card h4 {
        font-size: 13px;
    }

    .card p {
        font-size: 12px;
    }

    .play {
        width: 32px;
        height: 32px;
    }

    body {
        padding-bottom: 95px;
    }

    .playbar {
        height: 110px !important;
        flex-direction: column;
        padding: 5px 0;
    }
    
    .playbar-top {
        flex-direction: column;
        height: auto !important;
        padding: 5px 0;
        min-height: 30px;
    }
    
    .playbar-middle {
        height: 40px !important;
    }
    
    .playbar-bottom {
        height: 25px !important;
    }
    
    .songinfo {
        text-align: center;
        margin-bottom: 5px;
        max-width: 80%;
    }
    
    .songbuttons {
        margin-bottom: 5px;
    }

    /* Volume adjustments */
    .volume {
        width: 120px;
    }

    .volume .range input {
        width: 100px;
    }

    #previous, #play, #next {
        width: 18px !important;
        height: 18px !important;
        max-width: 18px !important;
        max-height: 18px !important;
    }

    .volume img {
        width: 14px !important;
        height: 14px !important;
        max-width: 14px !important;
        max-height: 14px !important;
    }

    .seekbar-container {
        padding: 0 10px;
        height: 20px;
    }

    .seekbar {
        width: 80%;
    }

    .songtime {
        font-size: 9px;
        min-width: 30px;
    }
    
    /* Fixed song list artwork size for mobile */
    .songList ul li img {
        width: 25px !important;
        height: 25px !important;
        max-width: 25px !important;
        max-height: 25px !important;
    }
}

@media (max-width: 480px) {
    /* Further simplified mobile layout */
    #rightcontainer {
        height: calc(100vh - 165px);
        margin: 5px;
        padding: 5px;
    }

    .cardContainer {
        gap: 12px;
        padding: 0 5px;
        grid-template-columns: repeat(2, 1fr);
    }

    .card {
        max-width: none;
        width: 100%;
        padding: 10px;
    }

    .card h2 {
        font-size: 14px;
    }

    .card h4 {
        font-size: 12px;
    }

    .card p {
        font-size: 11px;
    }

    .play {
        width: 28px;
        height: 28px;
    }

    body {
        padding-bottom: 110px;
    }

    .playbar {
        height: 120px !important;
        padding: 3px 0;
    }
    
    .playbar-top {
        min-height: 30px;
    }
    
    .playbar-middle {
        height: 45px !important;
    }
    
    .playbar-bottom {
        height: 25px !important;
    }
    
    .songbuttons {
        gap: 12px;
    }

    #previous, #play, #next {
        width: 16px !important;
        height: 16px !important;
        max-width: 16px !important;
        max-height: 16px !important;
    }

    .songinfo {
        font-size: 11px;
        max-width: 100px;
    }

    .songtime {
        font-size: 8px;
        min-width: 25px;
    }

    .seekbar {
        height: 3px;
        width: 85%;
    }

    .circle {
        width: 8px;
        height: 8px;
        bottom: -2.5px;
    }

    .volume {
        width: 100px;
    }

    .volume .range input {
        width: 80px;
    }

    .searchbar {
        height: 28px;
        padding: 4px 8px;
    }

    .searchbar input[type="text"] {
        font-size: 13px;
        padding: 3px 6px;
    }

    .searchbar img {
        width: 14px;
        height: 14px;
    }
    
    /* Adjust left container icons for mobile */
    .home ul li img, .heading img {
        width: 16px !important;
        height: 16px !important;
        max-width: 16px !important;
        max-height: 16px !important;
    }
    
    .logo img {
        width: 35px !important;
        height: 35px !important;
        max-width: 35px !important;
        max-height: 35px !important;
    }
    
    /* Fixed song list artwork size for smallest screens */
    .songList ul li img {
        width: 20px !important;
        height: 20px !important;
        max-width: 20px !important;
        max-height: 20px !important;
    }
}

