:root {
    --primary-color: #6c5ce7;
    --secondary-color: #a8a5e6;
    --bg-gradient: linear-gradient(135deg, #2d3436 0%, #000000 100%);
}

body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    color: white;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: #000;
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: auto;
    display: block;
}

.player-container {
    width: 520px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    border: #ffffff 1px solid;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.345);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.album-art {
    width: 260px;
    height: 260px;
    border-radius: 15px;
    margin: 0 auto 25px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s;
}

.album-art:hover {
    transform: rotateY(10deg) rotateX(10deg) scale(1.05);
}

.album-art::before {
    content: '';
    position: absolute;
    inset: -25px;
    background: conic-gradient(from 45deg,
            var(--primary-color),
            var(--secondary-color),
            #ff6b6b,
            #4ecdc4,
            var(--primary-color));
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    z-index: -1;
    filter: blur(20px);
    opacity: 0.5;
    animation: moveGradient 8s ease-in-out infinite alternate,
        rotateGradient 12s linear infinite;
}

@keyframes moveGradient {
    0% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }

    50% {
        border-radius: 70% 30% 30% 70% / 70% 70% 30% 30%;
    }

    100% {
        border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    }
}

@keyframes rotateGradient {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.album-art img {
    width: 100%;
    height: 100%;
    border-radius: 30px;
    object-fit: cover;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.lyrics-container {
    height: 170px;
    overflow: hidden;
    margin: 20px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lyrics-wrapper {
    position: absolute;
    height: 170px;
    width: 400px;
    text-align: center;
    transition: transform 0.3s ease;
}

.lyric-line {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 12px 0;
    padding: 4px 0;
    transition: all 0.3s ease;
    opacity: 0.6;
}

.lyric-line.active {
    font-weight: 600;
    font-size: 15px;
    width: 391px;
    opacity: 1;
    background: linear-gradient(90deg,
            #ff9191,
            #a8a5e6,
            #9cd1ff,
            #a4e8ff);
    background-size: 300% auto;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    -webkit-background-clip: text;
    animation: softGradient 8s ease-in-out infinite;
    transform: scale(1.1);
    text-shadow: 0 0 12px rgba(108, 92, 231, 0.2);
}

@keyframes softGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@media screen and (max-width: 480px) {
    .lyrics-container {
        height: 140px;
        margin: 15px 0;
        padding: 0 10px;
        box-sizing: border-box;
    }

    .lyrics-wrapper {
        height: 140px;
        width: 100%;
    }

    .lyric-line {
        font-size: 13px;
        margin: 10px auto;
        max-width: 280px;
        padding: 0 15px;
    }

    .lyric-line.active {
        font-size: 14px;
        width: auto;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 320px) {
    .lyrics-container {
        height: 120px;
    }

    .lyrics-wrapper {
        height: 120px;
    }

    .lyric-line {
        font-size: 12px;
        max-width: 240px;
    }

    .lyric-line.active {
        font-size: 13px;
        max-width: 240px;
    }
}

.progress-container {
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin: 20px 0;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--primary-color);
    border-radius: 2px;
    position: relative;
    transition: width 0.1s linear;
}

.time-display {
    display: flex;
    justify-content: space-between;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    margin-top: 5px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
}

.control-btn {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: scale(1.2);
}

.control-btn:not(.play-btn):hover {
    color: var(--primary-color);
}

.play-btn {
    font-size: 28px;
    background: var(--primary-color);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(108, 92, 231, 0.4);
    animation: pulse 2s infinite;
}

.play-btn:hover {
    background: var(--secondary-color);
    box-shadow: 0 4px 20px rgba(108, 92, 231, 0.6);
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.song-info {
    text-align: center;
    margin-bottom: 20px;
}

.song-title {
    font-size: 18px;
    margin: 0;
    letter-spacing: 1px;
}

.song-artist {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 5px 0;
}

.audio-source {
    display: none;
}

::-webkit-scrollbar {
    width: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 2px;
}

footer {
    font-family: "ZSFT-ej", "Segoe UI", sans-serif;
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    color: #fff;
    font-size: 1rem;
    font-weight: 300;
    text-align: center;
    padding: 12px 0;
    z-index: 10;
}

footer svg {
    width: 25px;
    height: 25px;
    vertical-align: middle;
    margin: 0 6px 3px 0;
}

footer a {
    color: #b87dff;
    font-weight: 400;
    text-decoration: none;
}

@media screen and (max-width: 480px) {
    .player-container {
        width: 90%;
        padding: 20px;
        margin: 0 10px;
    }

    .album-art {
        width: 200px;
        height: 200px;
    }

    .controls {
        gap: 15px;
    }

    .control-btn {
        font-size: 16px;
    }

    .play-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .song-title {
        font-size: 16px;
    }

    .song-artist {
        font-size: 12px;
    }
}

@media screen and (max-width: 480px) {
    .player-container {
        width: calc(100% - 40px);
        max-width: 320px;
        padding: 15px;
        margin: 10px;
    }

    .album-art {
        width: 220px;
        height: 220px;
        margin-bottom: 15px;
    }

    .lyrics-container {
        height: 140px;
        margin: 15px 0;
    }

    .lyrics-wrapper {
        height: 140px;
        width: 280px;
    }

    .lyric-line {
        font-size: 13px;
        margin: 10px 0;
    }

    .lyric-line.active {
        font-size: 14px;
    }

    .controls {
        gap: 20px;
        margin-top: 10px;
    }

    .control-btn {
        font-size: 18px;
        padding: 8px;
    }

    .play-btn {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }

    .song-title {
        font-size: 16px;
        margin-bottom: 4px;
    }

    .song-artist {
        font-size: 13px;
    }

    .progress-container {
        margin: 15px 0;
    }

    .time-display {
        font-size: 11px;
    }

    footer {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 320px) {
    .player-container {
        padding: 12px;
    }

    .album-art {
        width: 200px;
        height: 200px;
    }

    .controls {
        gap: 15px;
    }

    .play-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

.bg-animation {
    z-index: -3;
}

.starry-sky {
    z-index: -2;
}

/* Flow Player 2025 @RFKONG */