* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Montserrat", sans-serif;
    background-color: #000;
    color: #fff;
    overflow: hidden;
}

.main {
    display: flex;
    height: 100vh;
    margin: 0.5rem;
}

/* Sidebar Styles */
.sidebar {
    background-color: #000;
    width: 340px;
    border-radius: 1rem;
    margin-right: 0.5rem;
}

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

.nav-option {
    line-height: 2.5rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

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

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

.nav-option a {
    text-decoration: none;
    color: #fff;
    font-size: 1rem;
    margin-left: 1rem;
}

/* Library Styles */
.library {
    background-color: #121212;
    border-radius: 1rem;
    height: 100%;
    margin-top: 0.57rem;
    padding: 0.5rem 0.75rem;
    overflow-y: auto;
}

.options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.lib-options {
    display: flex;
    align-items: center;
}

.lib-options i {
    font-size: 1.25rem;
    margin-right: 0.5rem;
}

.icons {
    display: flex;
    gap: 1rem;
}

.icons i {
    opacity: 0.5;
    cursor: pointer;
    transition: opacity 0.2s;
}

.icons i:hover {
    opacity: 1;
}

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

.box-p1 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

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

/* Main Content Styles */
.main-content {
    background-color: #121212;
    flex: 1;
    border-radius: 1rem;
    overflow-y: auto;
    padding: 0 1.5rem;
}

.sticky-nav {
    position: sticky;
    top: 0;
    background-color: #121212;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    z-index: 10;
}

.sticky-nav-icons i {
    font-size: 1.5rem;
    margin-left: 0.75rem;
    opacity: 0.7;
    cursor: pointer;
    transition: opacity 0.2s;
}

.sticky-nav-icons i:hover {
    opacity: 1;
}

.sticky-nav-options {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Button Styles */
.badge {
    background-color: #fff;
    border: none;
    border-radius: 100px;
    padding: 0.5rem 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s;
}

.badge:hover {
    transform: scale(1.05);
}

.dark-badge {
    background-color: #000;
    color: #fff;
    border: 1px solid #fff;
}

.dark-badge i {
    margin-right: 0.5rem;
}

.user-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background-color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.user-icon i {
    font-size: 1.2rem;
    color: #fff;
}

/* Card Styles */
h2 {
    margin: 1.5rem 0 1rem 0;
    font-size: 1.5rem;
}

.cards-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background-color: #181818;
    width: 180px;
    border-radius: 0.5rem;
    padding: 1rem;
    transition: background-color 0.3s;
    cursor: pointer;
}

.card:hover {
    background-color: #282828;
}

.card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.card-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.card-info {
    font-size: 0.85rem;
    opacity: 0.6;
    line-height: 1.2;
}

/* Footer Styles */
.footer {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.line {
    width: 90%;
    border-top: 1px solid #282828;
}

/* Music Player Styles */
.music-player {
    background-color: #000;
    position: fixed;
    bottom: 0;
    width: 100%;
    height: 90px;
    border-top: 1px solid #282828;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
}

/* Album Section */
.album {
    width: 30%;
    display: flex;
    align-items: center;
}

.album-img img {
    width: 56px;
    height: 56px;
    border-radius: 4px;
    object-fit: cover;
}

.album-para {
    margin-left: 1rem;
}

.album-para p:first-child {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.2rem;
}

.album-para p:last-child {
    font-size: 0.7rem;
    opacity: 0.7;
}

.album-icons {
    margin-left: 1rem;
    display: flex;
    gap: 0.8rem;
}

.album-icons i {
    color: #b3b3b3;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s, transform 0.2s;
}

.album-icons i:hover {
    color: #fff;
    transform: scale(1.1);
}

.album-icons .liked {
    color: #1db954;
}

/* Player Section */
.player {
    width: 40%;
}

.player-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.player-control-icon {
    color: #b3b3b3;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

.player-control-icon:hover {
    color: #fff;
}

.play-icon {
    font-size: 2rem !important;
    color: #fff;
}

.active-control {
    color: #1db954 !important;
}

/* Playback Bar */
.playback-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.curr-time,
.total-time {
    font-size: 0.7rem;
    opacity: 0.7;
    min-width: 35px;
    text-align: center;
}

.progress-bar {
    width: 70%;
    height: 4px;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.progress-bar::-webkit-slider-runnable-track {
    background: #4d4d4d;
    border-radius: 100px;
    height: 4px;
}

.progress-bar::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    margin-top: -4px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.progress-bar:hover::-webkit-slider-runnable-track {
    background: #1db954;
}

/* Controls Section */
.controls {
    width: 30%;
}

.control-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.control-icons i {
    color: #b3b3b3;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.2s;
}

.control-icons i:hover {
    color: #fff;
}

.volume-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.volume-bar {
    width: 80px;
    height: 4px;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.volume-bar::-webkit-slider-runnable-track {
    background: #4d4d4d;
    border-radius: 100px;
    height: 4px;
}

.volume-bar::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    margin-top: -4px;
    opacity: 0;
    transition: opacity 0.2s;
}

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

.volume-bar:hover::-webkit-slider-runnable-track {
    background: #1db954;
}

/* ===== RESPONSIVE DESIGN FOR MOBILE DEVICES ===== */

/* Tablet Styles (768px - 1024px) */
@media screen and (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .card {
        width: 160px;
    }
    
    .hide {
        display: none;
    }
    
    .album-para p:first-child {
        font-size: 0.8rem;
    }
    
    .album-para p:last-child {
        font-size: 0.6rem;
    }
}

/* Small Tablet Styles (600px - 768px) */
@media screen and (max-width: 768px) {
    .main {
        margin: 0.25rem;
    }
    
    .sidebar {
        width: 240px;
        margin-right: 0.25rem;
    }
    
    .main-content {
        padding: 0 1rem;
    }
    
    h2 {
        font-size: 1.2rem;
        margin: 1rem 0 0.75rem 0;
    }
    
    .cards-container {
        gap: 1rem;
    }
    
    .card {
        width: 140px;
        padding: 0.75rem;
    }
    
    .card-title {
        font-size: 0.9rem;
    }
    
    .card-info {
        font-size: 0.75rem;
    }
    
    .album {
        width: 35%;
    }
    
    .album-img img {
        width: 48px;
        height: 48px;
    }
    
    .album-para {
        margin-left: 0.5rem;
    }
    
    .album-icons {
        gap: 0.5rem;
    }
    
    .player {
        width: 45%;
    }
    
    .player-controls {
        gap: 1rem;
    }
    
    .player-control-icon {
        font-size: 0.9rem;
    }
    
    .play-icon {
        font-size: 1.8rem !important;
    }
    
    .controls {
        width: 20%;
    }
    
    .control-icons {
        gap: 0.75rem;
    }
    
    .volume-bar {
        width: 60px;
    }
}

/* Mobile Styles (480px - 600px) */
@media screen and (max-width: 600px) {
    .main {
        flex-direction: column;
        margin: 0;
        height: 100vh;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        margin-right: 0;
        border-radius: 0;
        display: flex;
        flex-direction: row;
        background-color: #000;
        position: fixed;
        bottom: 90px;
        z-index: 100;
        overflow-x: auto;
        padding: 0.25rem;
    }
    
    .nav {
        background-color: #121212;
        height: auto;
        padding: 0.25rem 0.5rem;
        min-width: 120px;
        border-radius: 0.5rem;
        margin-right: 0.25rem;
    }
    
    .nav-option {
        line-height: 2rem;
    }
    
    .nav-option i {
        font-size: 1rem;
        width: 20px;
    }
    
    .nav-option a {
        font-size: 0.9rem;
        margin-left: 0.5rem;
    }
    
    .library {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        height: auto;
        margin-top: 0;
        padding: 0.25rem;
        border-radius: 0.5rem;
        min-width: 300px;
    }
    
    .options {
        min-width: 150px;
        margin-bottom: 0;
        padding: 0.25rem 0.5rem;
    }
    
    .lib-box {
        min-width: 200px;
        margin-left: 0.5rem;
    }
    
    .box {
        margin: 0;
        padding: 0.75rem;
        height: auto;
    }
    
    .box-p1 {
        font-size: 0.9rem;
        margin-top: 0;
    }
    
    .box-p2 {
        font-size: 0.75rem;
    }
    
    .badge {
        padding: 0.25rem 0.75rem;
        font-size: 0.8rem;
        height: auto;
    }
    
    .main-content {
        margin-top: 0;
        padding: 0.75rem;
        padding-bottom: 100px;
        border-radius: 0;
        height: calc(100vh - 90px);
    }
    
    .sticky-nav {
        padding: 0.75rem 0;
    }
    
    .sticky-nav-icons i {
        font-size: 1.2rem;
    }
    
    .cards-container {
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    .card {
        width: calc(50% - 0.5rem);
        margin-left: 0;
        padding: 0.5rem;
    }
    
    .music-player {
        height: 90px;
        padding: 0 0.5rem;
        z-index: 1000;
    }
    
    .album {
        width: 40%;
    }
    
    .album-img img {
        width: 48px;
        height: 48px;
    }
    
    .album-para {
        margin-left: 0.5rem;
    }
    
    .album-para p:first-child {
        font-size: 0.8rem;
    }
    
    .album-para p:last-child {
        font-size: 0.6rem;
    }
    
    .album-icons {
        margin-left: 0.5rem;
    }
    
    .player {
        width: 60%;
    }
    
    .player-controls {
        gap: 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    .player-control-icon {
        font-size: 0.8rem;
    }
    
    .play-icon {
        font-size: 1.5rem !important;
    }
    
    .playback-bar {
        gap: 0.25rem;
    }
    
    .curr-time, .total-time {
        font-size: 0.6rem;
        min-width: 30px;
    }
    
    .controls {
        display: none; /* Hide controls on small mobile to save space */
    }
}

/* Small Mobile Styles (below 480px) */
@media screen and (max-width: 480px) {
    .sidebar {
        bottom: 80px;
        overflow-x: auto;
    }
    
    .nav {
        min-width: 100px;
    }
    
    .nav-option i {
        font-size: 0.9rem;
        width: 18px;
    }
    
    .nav-option a {
        font-size: 0.8rem;
    }
    
    .library {
        min-width: 250px;
    }
    
    .options {
        min-width: 120px;
    }
    
    .lib-options i {
        font-size: 1rem;
    }
    
    .lib-options a {
        font-size: 0.8rem;
    }
    
    .box {
        padding: 0.5rem;
    }
    
    .box-p1 {
        font-size: 0.8rem;
    }
    
    .box-p2 {
        font-size: 0.7rem;
    }
    
    .main-content {
        padding: 0.5rem;
        padding-bottom: 90px;
    }
    
    h2 {
        font-size: 1rem;
    }
    
    .card {
        width: 100%; /* Stack cards vertically on very small screens */
    }
    
    .card-img {
        margin-bottom: 0.5rem;
    }
    
    .card-title {
        font-size: 0.85rem;
    }
    
    .card-info {
        font-size: 0.7rem;
    }
    
    .music-player {
        height: 80px;
    }
    
    .album {
        width: 45%;
    }
    
    .album-img img {
        width: 40px;
        height: 40px;
    }
    
    .album-para p:first-child {
        font-size: 0.7rem;
    }
    
    .album-para p:last-child {
        font-size: 0.5rem;
    }
    
    .album-icons i {
        font-size: 0.8rem;
    }
    
    .player {
        width: 55%;
    }
    
    .player-controls {
        gap: 0.5rem;
    }
    
    .player-control-icon {
        font-size: 0.7rem;
    }
    
    .play-icon {
        font-size: 1.2rem !important;
    }
    
    .curr-time, .total-time {
        font-size: 0.5rem;
        min-width: 25px;
    }
}

/* Landscape Mode for Mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .sidebar {
        bottom: 70px;
    }
    
    .music-player {
        height: 70px;
    }
    
    .main-content {
        padding-bottom: 80px;
    }
    
    .cards-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 1rem;
    }
    
    .card {
        min-width: 140px;
    }
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #282828;
    color: white;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 14px;
    z-index: 9999;
    animation: slideUp 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    white-space: nowrap;
}

@media screen and (max-width: 600px) {
    .toast {
        bottom: 100px;
        font-size: 12px;
        padding: 6px 12px;
        white-space: normal;
        max-width: 80%;
        text-align: center;
    }
}

@keyframes slideUp {
    from {
        bottom: 50px;
        opacity: 0;
    }
    to {
        bottom: 100px;
        opacity: 1;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #535353;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7a7a7a;
}

/* Touch-friendly improvements for mobile */
@media (hover: none) and (pointer: coarse) {
    .card:active {
        background-color: #282828;
        transform: scale(0.98);
    }
    
    .nav-option:active,
    .icons i:active,
    .player-control-icon:active,
    .control-icons i:active {
        opacity: 1;
        color: #fff;
    }
    
    .progress-bar::-webkit-slider-thumb,
    .volume-bar::-webkit-slider-thumb {
        opacity: 1;
        width: 16px;
        height: 16px;
    }
}