@font-face {
    src: url(./PingFangSC-Regular.woff2);
    font-family: "PingFang";
}

@font-face {
    src: url(./sf-pro-display_regular.woff2);
    font-family: "SFPro";
}

* {
    font-family: "SFPro", "PingFang";
    -webkit-user-select: none;
    user-select: none;
    box-sizing: border-box;
}

body {
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(20px);
    backdrop-filter: blur(20px);
    z-index: 2;
    margin: 0;
    background: #000;
}

.main {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 80vw;
    max-width: 1200px;
    height: 80vh;
    max-height: 800px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.leftcontent {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /* padding-left: 20%; */
}

.svgcontainer {
    width: 250px;
    height: 250px;
    padding: 20px;
    background: #e8e8e8;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px #0005;
    transition: transform 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-top: 28px;
    transform: scale(1);
}

.svgcontainer:hover {
    transform: scale(1.1);
}

.svg {
    transform: scale(3);
}

input[type="file"] {
    display: none;
}

.processbar {
    width: 325px;
    background: #fff9;
    height: 8px;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 0 3px #0009;
}

.process {
    width: 0%;
    height: 100%;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 0 3px #0009;
}

.time {
    margin-top: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 325px;
    color: #fff;
    text-shadow: 0 0 3px #0009;
}

p {
    margin: 0;
}

.name {
    -webkit-user-select: auto;
    user-select: auto;
}

.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
}

.controls > * {
    display: flex;
    align-items: center;
    justify-content: center;
}

.control-btn {
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: transform 0.1s ease;
}

.control-btn:hover {
    transform: scale(1.1);
}

.controls > .play {
    display: block;
    transition: transform 0.1s ease;
    width: 40px;
    height: 35px;
}

.controls > .pause {
    display: none;
    transition: transform 0.1s ease;
    width: 40px;
    height: 35px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.modal-box {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-radius: 15px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-box-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-title {
    color: #fff;
    font-size: 24px;
    font-weight: bold;
}

.modal-close {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-search {
    position: relative;
    margin-bottom: 20px;
}

.modal-search input {
    width: 100%;
    padding: 12px 40px 12px 20px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    color: #fff;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
}

.modal-search input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-search input:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.15);
}

.modal-search svg {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.modal-wrapper {
    max-height: 60vh;
    overflow-y: auto;
}

.music-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.music-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-list li:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.music-list li.playing {
    background-color: rgba(255, 255, 255, 0.15);
    border-left: 4px solid rgba(255, 255, 255, 0.8);
}

.music-list li span:first-child {
    color: #fff;
    font-size: 14px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-list li span:last-child {
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.music-list li span:last-child:hover {
    transform: scale(1.2);
    color: #fff;
}

/* 滚动条样式 */
.modal-wrapper::-webkit-scrollbar {
    width: 8px;
}

.modal-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.modal-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.rightcontent {
    display: flex;
    width: 50%;
    height: auto;
    padding-left: 10vw;
}

.lyricscontainer {
    width: 50vw;
    height: 100vh;
    overflow: hidden;
    position: relative;
    /* box-shadow: 0px 0px 100px 50px #000 inset; */
    z-index: 2;
    padding: 0 5vw;
}

.lyrics {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transition: all 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 24px;
    line-height: 40px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.lyrics div {
    margin: 2% 0;
    opacity: 0.3;
    will-change: opacity, font-size, font-weight, margin-left, margin-top, margin-bottom;
    transition: opacity 0.75s cubic-bezier(0.25, 0.8, 0.25, 1),
        font-size 0.75s cubic-bezier(0.25, 0.8, 0.25, 1),
        font-weight 0.75s cubic-bezier(0.25, 0.8, 0.25, 1),
        margin-left 0.75s cubic-bezier(0.25, 0.8, 0.25, 1),
        margin-top 1s cubic-bezier(0.25, 0.8, 0.25, 1),
        margin-bottom 1s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 100%;
    text-shadow: 0 1px 5px #000;
    font-weight: normal;
    font-size: inherit;
    margin-top: 2%;
    font-size: 28px;
    word-wrap: break-word;
    white-space: normal;
    /* word-break: break-all; */
}

.lyrics div.highlight {
    margin: 2% 0;
    opacity: 1;
    font-size: 32px;
    font-weight: bold;
    filter: none;
    width: 100%;
    margin-top: 2%;
}

.background {
    margin: 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -5;
    background-color: var(--background);
    background-image:
        radial-gradient(closest-side, var(--color1), var(--color1-rgba)),
        radial-gradient(closest-side, var(--color2), var(--color2-rgba)),
        radial-gradient(closest-side, var(--color3), var(--color3-rgba)),
        radial-gradient(closest-side, var(--color4), var(--color4-rgba)),
        radial-gradient(closest-side, var(--color5), var(--color5-rgba));
    background-size:
        130vmax 130vmax,
        80vmax 80vmax,
        90vmax 90vmax,
        110vmax 110vmax,
        90vmax 90vmax;
    background-position:
        -80vmax -80vmax,
        60vmax -30vmax,
        10vmax 10vmax,
        -30vmax -10vmax,
        50vmax 50vmax;
    background-repeat: no-repeat;
    animation: 20s movement linear infinite;
    background-attachment: fixed;
}

@keyframes movement {

    0%,
    100% {
        background-size:
            130vmax 130vmax,
            80vmax 80vmax,
            90vmax 90vmax,
            110vmax 110vmax,
            90vmax 90vmax;
        background-position:
            -80vmax -80vmax,
            60vmax -30vmax,
            10vmax 10vmax,
            -30vmax -10vmax,
            50vmax 50vmax;
    }

    25% {
        background-size:
            100vmax 100vmax,
            90vmax 90vmax,
            100vmax 100vmax,
            90vmax 90vmax,
            60vmax 60vmax;
        background-position:
            -60vmax -90vmax,
            50vmax -40vmax,
            0vmax -20vmax,
            -40vmax -20vmax,
            40vmax 60vmax;
    }

    50% {
        background-size:
            80vmax 80vmax,
            110vmax 110vmax,
            80vmax 80vmax,
            60vmax 60vmax,
            80vmax 80vmax;
        background-position:
            -50vmax -70vmax,
            40vmax -30vmax,
            10vmax 0vmax,
            20vmax 10vmax,
            30vmax 70vmax;
    }

    75% {
        background-size:
            90vmax 90vmax,
            90vmax 90vmax,
            100vmax 100vmax,
            90vmax 90vmax,
            70vmax 70vmax;
        background-position:
            -50vmax -40vmax,
            50vmax -30vmax,
            20vmax 0vmax,
            -10vmax 10vmax,
            40vmax 60vmax;
    }
}

.noTransition, .noTransition * {
    transition: none !important;
}

/* 手机端适配 */
@media screen and (max-width: 768px) {
    .main {
        width: 95vw;
        height: 95vh;
        flex-direction: column;
        padding: 20px 0;
    }
    
    .leftcontent {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .rightcontent {
        width: 100%;
        height: 40%;
        padding-left: 0;
        margin-top: 20px;
    }
    
    .lyricscontainer {
        width: 100%;
        height: 100%;
        padding: 0 15px;
    }
    
    .svgcontainer {
        width: 200px;
        height: 200px;
        margin-top: 0;
    }
    
    .svg {
        transform: scale(2.5);
    }
    
    .time {
        width: 280px;
        margin-top: 40px;
    }
    
    .processbar {
        width: 280px;
    }
    
    .controls {
        gap: 15px;
        margin-top: 15px;
    }
    
    .control-btn {
        width: 36px;
        height: 36px;
    }
    
    .controls > .pause {
        width: 44px;
        height: 39px;
    }
    
    .philay {
        width: 44px;
        height: 39px;
    }
    
    .lyrics {
        font-size: 18px;
        line-height: 32px;
    }
    
    .lyrics div {
        font-size: 20px;
    }
    
    .lyrics div.highlight {
        font-size: 24px;
    }
    
    .modal-box {
        width: 95%;
        max-width: 100%;
        max-height: 90vh;
        padding: 15px;
    }
    
    .modal-title {
        font-size: 20px;
    }
    
    .modal-search input {
        padding: 10px 35px 10px 15px;
        font-size: 14px;
    }
    
    .music-list li {
        padding: 10px 12px;
    }
    
    .music-list li span:first-child {
        font-size: 13px;
    }
}