:root {
    --primary-color: #04b9a1;
    --secondary-color: #1be614;
    --text-color: #444;
    --dark-color: #121212;
    --dark-color-second: #1A1A1A;
    --card-background: #fff;
}

* {
    padding: 0;
    margin: 0;
    box-sizing: inherit;
    /* transition: all 0.02s ease-in-out; */
}

body {
    background-color: #f5f5f5;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.35s, color 0.3s;
}

html {
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* Region player */
.player {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.player .icon-pause {
    display: none;
}

.player.playing .icon-pause {
    display: inline-block;
}

.player.playing .icon-play {
    display: none;
}

/* icon css */
.player i:not(.icon-pause, .icon-play, .theme-icon) {
    padding: 15px 15px;
    border-radius: 50%;
    cursor: pointer;
}

/* #endregion Player */
.dashboard {
    padding: 16px 16px 14px;
    background-color: #fff;
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 480px;
    max-height: 500px;
    border-bottom: 1px solid #ebebeb;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.35s, color 0.3s;
}

/* #reginon search */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.search-box>i {
    position: absolute;
    right: 5px;
}

.search-bar {
    background-color: #f2f2f2;
    width: 100%;
    padding: 10px 18px;
    border-radius: 18px;
    border: none;
    outline: none;
    transition: background-color 0.35s, color 0.3s;
}

.search-songs {
    position: absolute;
    top: 100%;
    width: 100%;
    min-height: 100px;
    max-height: 250px;
    background-color: #f2f2f2;
    z-index: 1;
    border-bottom-right-radius: 18px;
    border-bottom-left-radius: 18px;
    display: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-top: 30px;
    text-align: center;
}

.search-songs .song {
    height: 50px;
    background-color: transparent !important;
    box-shadow: none;
}

.search-songs .title {
    font-size: 12px !important;
}

.favorite-songs .favorite {
    margin-right: 5px;
}

.favorite-songs .favorite,
.search-songs .favorite {
    font-size: 20px !important;
}

.favorite-songs .btn-delete,
.search-songs .btn-delete {
    display: none;
}

.search-songs .body {
    text-align: left;
}

/* #endregion SEARCH  */

/* #region Volume */
.btn-volume {
    position: relative;
}

/* .btn-volume:hover .volume-wrap {
  display: block;
} */

.volume-wrap {
    position: absolute;
    left: 0;
    right: 0;
    text-align: center;
    display: none;
    background-color: #fff;
}

.dark .volume-wrap {
    background-color: #1A1A1A;
}

.btn-volume:hover .volume-wrap {
    display: block;
}

.volume-range {
    accent-color: var(--secondary-color);
    height: 6em;
    writing-mode: vertical-lr;
    direction: rtl;
    vertical-align: bottom;
    margin-bottom: 5px;
}

/* #endregion Volume */

/* #region HEADER */
.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header {
    text-align: center;
    margin-bottom: 12px;
    margin-top: 12px;
    flex: 1;
    min-width: 0;
}

header h2 {
    color: var(--text-color);
    font-size: 20px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

header h4 {
    font-size: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* #endregion HEADER */

/* #region Options */
.option {
    position: relative;
}

.option-list {
    position: absolute;
    background-color: #fff;
    width: 150px;
    top: 100%;
    right: -16px;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
    display: none;
    animation: fadeIn 0.25s forwards;
    transition: background-color 0.35s, color 0.3s;
}

.option-item {
    font-size: 15px;
    padding: 13px;
    cursor: pointer;
    user-select: none;
    transition: color 0.4s, background-color 0.3s;
}

.option-item:hover {
    background-color: #f3f3f3;
    color: var(--primary-color);
}

.theme-icon {
    margin-left: 2px;
    margin-right: 3px;
}

/* #endregion Options */

/* #region Favorite songs */
.favorite-songs-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.35);
    display: none;
    animation: fadeIn 0.2s forwards;
}

.empty-list {
    display: block;
    color: rgb(188, 188, 188);
    margin: auto;
    text-align: center;
}

.favorite-songs {
    display: flex;
    flex-direction: column;
    margin: auto;
    background-color: white;
    width: 480px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 10px;
}

.favorite-songs .song {
    padding: 8px 16px;
    box-shadow: none;
}

.favorite-songs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 16px;
}

.favorite-songs-header h4 {
    font-weight: 600;
    font-size: 18px;
}

.favorite-songs-close {
    padding: 15px 20px;
    cursor: pointer;
}

.favorite-songs-close:hover {
    background-color: #e20000;
    color: #fff;
}

/* #endregion Favorite songs */

/* #region CD */
.cd {
    display: flex;
    margin: auto;
    width: 200px;
}

.cd-thumb {
    width: 100%;
    padding-top: 100%;
    border-radius: 50%;
    background-color: #333;
    background-size: cover;
    margin: auto;
}

/* #endregion CD */

/* #region CONTROL */
.control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 0 8px 0;
}

.control .btn {
    color: var(--text-color);
    font-size: 18px;
    cursor: pointer;
}

.control .btn.active {
    color: var(--secondary-color);
}

.control .btn:not(.active) {
    color: var(--text-color);
}

.control .btn:hover {
    color: var(--secondary-color);
    transform: scale(1.1);
    transition: all 0.2s;
}

.control .btn-toggle-play {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 24px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
}

/* #endregion CONTROL */

/* #region PROGRESS */
.progress-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
} 

.time-display {
    font-size: 14px;
    color: var(--text-color);
    min-width: 40px;
    user-select: none;
}

.dark .time-display {
    color: var(--primary-color)
}

.progress {
    accent-color: var(--primary-color);
    width: 100%;
    height: 65px;
    opacity: 0.7;
    -webkit-transition: 0.2s;
    transition: opacity 0.2s;
    cursor: pointer;
}

/* #endregion PROGRESS */

/* #region PLAYLIST */
.playlist {
    margin-top: 495px;
    padding: 6px;
    transition: background-color 0.35s, color 0.3s;
}

.playlist > p {
    text-align: center;
    margin: 10px 0;
}

.song {
    display: flex;
    align-items: center;
    background-color: #fff;
    padding: 8px 16px;
    border-radius: 5px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.35s, color 0.3s;
}

.song:hover {
    background-color: #ebebeb;
    /* transform: scale(1.01); */
}

.dark .song:hover {
    background-color: #222;
}

.song:active {
    opacity: 0.8;
}

.song.active .author,
.song.active .title,
.song.active .favorite,
.song.active .btn-delete {
    color: var(--secondary-color);
}

.song .thumb {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-size: cover;
    margin: 0 8px;
}

.song .body {
    flex: 1;
    padding: 0 16px;
}

.song .title {
    font-size: 14px;
    color: var(--text-color);
}

.song .author {
    padding: 8px 8px 4px 0;
    color: #999;
    font-size: 12px;
}

.liked .favorite {
    color: var(--primary-color);
}

.favorite {
    color: var(--dark-color-second);
    transition: color 0.3s ease;
    cursor: pointer;
}

.favorite:hover {
    color: var(--primary-color);
}

.btn-delete {
    color: var(--dark-color-second);
    transition: color 0.3s ease;
    cursor: pointer;
}

.btn-delete:hover {
    color: var(--primary-color);
}

/* .delete {
    color: var(--dark-color-second);
    transition: color 0.3s ease;
    cursor: pointer;
}

.delete:hover {
    color: var(--secondary-color);
} */
/* #endregion PLAYLIST */

/* #region Dark mode theme */
.dark {
    background-color: var(--dark-color);
    color: var(--primary-color);
    transition: background-color 0.35s, color 0.3s;
}

.dark .player i:not(.icon-pause, .icon-play, .favorite i) {
    color: var(--primary-color);
}

.dark .dashboard {
    border: none;
    background-color: #1A1A1A;
    transition: background-color 0.35s, color 0.3s;
}

.dark .playlist {
    transition: background-color 0.35s, color 0.3s;
}

.dark .search-bar {
    color: #fff;
    transition: background-color 0.35s, color 0.3s;
}

.dark .search-bar,
.dark .search-songs {
    background-color: #048271;
    color: #ebebeb;
}

.dark .search-bar::placeholder {
    color: #c2c2c2;
}

.dark header h2 {
    color: #0cd2b7;
}

.dark .option-list {
    background-color: #222;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.35s, color 0.3s;
}

.dark .control .btn.active i {
    color: var(--secondary-color);
}

.dark .favorite-songs {
    background-color: var(--dark-color-second);
}

.dark .favorite-songs-close,
.dark .favorite-songs-header {
    color: var(--primary-color);
}

.dark .song {
    background-color: var(--dark-color-second);
    color: var(--primary-color);
    transition: background-color 0.35s, color 0.3s;
}

.dark .song .favorite,
.dark .song .author,
.dark .song .title {
    color: var(--primary-color);
}

.dark .song.active .author,
.dark .song.active .title,
.dark .song.active .favorite,
.dark .song.active .btn-delete {
    color: var(--secondary-color);
}

.enjoyText {
    font-size: 14px;
    color: var(--text-color);
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
}

.miniText {
    font-size: 12px;
    margin: 5px 0 10px 0;
}

/* #endregion Dark mode theme */

/* Modal container upload song */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--card-background);
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    width: 350px;
}


.modal-content .marginLeft {
    text-align: left;
    margin: 4px 0;
}

.modal-content input {
    width: 100%;
    padding: 15px;
    margin: 5px 0;
    border: 1px solid #ddd;
    border-radius: 5px;
    outline-color: #888;
}

.modal-content button {
    margin: 10px 5px;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    background: var(--primary-color);
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.container-add-picture {
    display: flex;
    text-align: center;
    margin-top: 12px;
}

.container-add-picture #upload-image-btn {
    height: 39px;
    margin-right: 60px;
    margin-top: 25px;
}

.modal-content button:hover {
    background: #0acbb2;
}

.modal-content #cancel-song-btn {
    background: #555;
}

.modal-content #cancel-song-btn:hover {
    background: #666;
}

/* Fix bug */
/* Bug khi chỉnh khoảng cách của các bài hát */
.song-node {
    margin: 8px 0;
}

/* Bug khi cái pop Upload Songs hiện lên */
#upload-modal {
    display: none;
}

#upload-modal.flex {
    display: flex;
    /* Hiển thị modal khi cần */
}

/* Area css for animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* End of Area css for animation */

/* Responsive */
@media (max-width: 739px) {
    .favorite-songs {
        width: 100%;
    }
}