/* The switch - the box around the slider */
body {
    font-family: sans-serif;
    background-color: #FFFBF1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    /* border: 2px solid black; */
    margin: 1rem;
    margin-top: 0;
}

.heading-div h3 {
    position: relative;
    display: block;
    width: 60px;
    height: 34px;
    /* border: 2px solid black; */
    margin: 1rem;
    margin-top: 0;
}

/* Hide default HTML checkbox */
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* The slider */
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    -webkit-transition: .4s;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);

}

input:focus+.slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

.heading-div {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    padding: 1rem;
    /* border: 2px solid black; */
}

.heading-div h1 {
    /* border: 2px solid black; */
    margin: 1rem;
}

/* styling the container */
.container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    /* border: 2px solid black; */
    height: 75vh;
    margin-top: 1rem;
}

.all-songs {
    border: 2px solid black;
    border-radius: 2rem;
    width: 25vw;
    margin: 1rem;
    padding: 1rem;
    background-color: #FAF9F6;
}

/*.all-songs h2 {
    margin: 1rem;
}*/


/* .song_listed {
    width: 75%;
    margin: auto;
    margin-top: 5%;
} */

.card {
    border: 2px solid black;
    border-radius: 2rem;
    width: 25vw;
    /* margin: 1rem; */
    padding: 1rem;
    background-color: #FAF9F6;
}

.playlist {
    border: 2px solid black;
    border-radius: 2rem;
    width: 25vw;
    margin: 1rem;
    padding: 1rem;
    background-color: #FAF9F6;
}

.playlist h2:nth-of-type(2) {
    color: #444;
    font-weight: lighter;
}

.song_listed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 2.5rem;
    margin: 1%;
    padding: 0 1rem;
    background: linear-gradient(135deg, #5adaff, #5468ff);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 6px rgba(45, 35, 66, 0.3);
}

.song_listed:hover,
.song_listed:focus {
    box-shadow: 0 6px 12px rgba(45, 35, 66, 0.5);
    outline: none;
    transform: translateY(-2px);
}

.song_listed:active {
    box-shadow: inset 0 3px 7px #3c4fe0;
    transform: translateY(2px);
}

/* audio player interface styling */


.audio-player {
    width: 80%;
    margin: 1rem auto;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    border-radius: 18px;
    padding: 24px 20px 20px 20px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.20);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Style audio element internal controls */
.audio-player audio {
    width: 100%;
    outline: none;
    background: transparent;
    border-radius: 8px;
    min-height: 40px;
    filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .18));
}

/* Hide default outline on focus */
.audio-player audio:focus {
    outline: none;
}

/* Responsive design for mobile screens */
@media (max-width: 600px) {
    .audio-player {
        width: 98%;
        padding: 15px;
    }

    .audio-player audio {
        min-height: 32px;
    }
}

/* song image decor */

.img-card {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin: 1rem;
}

.card-img {
    height: 330px;
    width: 100%;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(44, 62, 80, 0.20);
}

/* playback buttons styling */

.playback-buttons {
    display: flex;
    flex-direction: row;
    justify-content: center;
    flex-wrap: wrap;
}

.play_buttons {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 2.5rem;
    margin: 1%;
    padding: 0 1rem;
    background: linear-gradient(135deg, #5adaff, #5468ff);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 6px rgba(45, 35, 66, 0.3);
}

.play_buttons:hover,
.play_buttons:focus {
    box-shadow: 0 6px 12px rgba(45, 35, 66, 0.5);
    outline: none;
    transform: translateY(-2px);
}

.play_buttons:active {
    box-shadow: inset 0 3px 7px #3c4fe0;
    transform: translateY(2px);
}

/* GENRE STYLING */


#genres {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 2.5rem;
    margin: 1%;
    padding: 0 1rem;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 6px rgba(45, 35, 66, 0.3);
}

#genres:hover,
#genres:focus {
    box-shadow: 0 6px 12px rgba(45, 35, 66, 0.5);
    outline: none;
    transform: translateY(-2px);
}

#genres:active {
    box-shadow: inset 0 3px 7px #3c4fe0;
    transform: translateY(2px);
}

/* PLAYLIST DECOR */

.new_playlist_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 2.5rem;
    margin: 1%;
    padding: 0 1rem;
    background: linear-gradient(135deg, #2b5876 0%, #4e4376 100%);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 6px rgba(45, 35, 66, 0.3);
}

.new_playlist_btn:hover,
.new_playlist_btn:focus {
    box-shadow: 0 6px 12px rgba(45, 35, 66, 0.5);
    outline: none;
    transform: translateY(-2px);
}

.new_playlist_btn:active {
    box-shadow: inset 0 3px 7px #3c4fe0;
    transform: translateY(2px);
}

.new_playlist_input {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1.5px solid #b3b3b3;
    border-radius: 6px;
    background-color: #fff8ef;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #2b2b2b;
    margin-right: 0.5rem;
}

.new_playlist_input:focus {
    border-color: #5468ff;
    box-shadow: 0 0 6px #5adaff40;
    background-color: #fff;
}


.appendPlaylist {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 2.5rem;
    margin: 1%;
    padding: 0 1rem;
    background: linear-gradient(135deg, #5adaff, #5468ff);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    user-select: none;
    transition: box-shadow 0.2s ease, transform 0.15s ease;
    box-shadow: 0 4px 6px rgba(45, 35, 66, 0.3);
}

.appendPlaylist:hover,
.appendPlaylist:focus {
    box-shadow: 0 6px 12px rgba(45, 35, 66, 0.5);
    outline: none;
    transform: translateY(-2px);
}

.appendPlaylist:active {
    box-shadow: inset 0 3px 7px #3c4fe0;
    transform: translateY(2px);
}

.addToPlaylist {
    display: flex;
    flex-direction: row;
    justify-content: center;
}

/* Default light mode styles here */

body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

/* Override other element styles in dark mode */
body.dark-mode .heading-div,
body.dark-mode .all-songs,
body.dark-mode .card,
body.dark-mode .playlist {
    padding: 1rem;
    border-color: #444;
    border-radius: 2rem;
    background-color: #1e1e1e;
    color: #ddd;
}

/* Adjust switch background in dark mode (optional) */

body.dark-mode .slider {
    background-color: #555;
}

/* PLAYLIST CLICKED BUTTON STYLING */

.appendPlaylist.selected {
    outline: 3px solid #5468ff;
    background: #283060;
    color: #fff;
}

body.dark-mode .playlist h2:nth-of-type(2) {
    color: #f0f0f0;
    font-weight: lighter;
}

/* SEARCH INPUT STYLING */

#searchInput {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1.5px solid #b3b3b3;
    border-radius: 6px;
    background-color: #fff8ef;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #2b2b2b;
    margin-right: 0.5rem;
}

#searchInput:focus {
    border-color: #5468ff;
    box-shadow: 0 0 6px #5adaff40;
    background-color: #fff;
}

.removeBtn {
  all: unset;
  cursor: pointer; /* Optional: to keep pointer cursor on hover */
  display: inline-block; /* Optional: restores button-like display */
}
