/* Modern Reset & Global Styles */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #5839ce;
    --primary-light: #755ce5;
    --accent-color: #00e6c3;
    --accent-color-alt: #6145ff;
    --dark-bg: rgba(18, 18, 24, 0.85);
    --card-bg: rgba(30, 30, 50, 0.65);
    --card-bg-hover: rgba(38, 38, 65, 0.75);
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    --border-radius: 14px;
    --transition-speed: 0.3s;
}

body, html {
    height: 100%;
    width: 100%;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #0c0c14;
    background: linear-gradient(135deg, #0c0c20, #1a1a3a);
    overflow-x: hidden;
    position: relative;
}

/* 创建背景效果 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M11 18c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm48 25c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm-43-7c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm63 31c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM34 90c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zm56-76c1.657 0 3-1.343 3-3s-1.343-3-3-3-3 1.343-3 3 1.343 3 3 3zM12 86c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm28-65c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm23-11c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-6 60c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm29 22c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zM32 63c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm57-13c2.76 0 5-2.24 5-5s-2.24-5-5-5-5 2.24-5 5 2.24 5 5 5zm-9-21c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM60 91c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM35 41c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2zM12 60c1.105 0 2-.895 2-2s-.895-2-2-2-2 .895-2 2 .895 2 2 2z' fill='%235839ce' fill-opacity='0.05' fill-rule='evenodd'/%3E%3C/svg%3E");
    opacity: 0.6;
    z-index: -1;
}

/* 添加星星效果 */
@keyframes twinkle {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 0.7; }
}

.star {
    position: fixed;
    background-color: white;
    border-radius: 50%;
    z-index: -1;
    animation: twinkle var(--twinkle-duration, 4s) infinite ease-in-out;
    animation-delay: var(--twinkle-delay, 0s);
}

/* 创建不同大小和动画时间的星星 */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* 粒子效果 */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

@keyframes float-up {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: var(--start-opacity, 0.1);
    }
    90% {
        opacity: var(--start-opacity, 0.1);
    }
    100% {
        transform: translateY(-100px) translateX(var(--end-x, 100px)) rotate(var(--end-rotate, 360deg));
        opacity: 0;
    }
}

.particle {
    position: absolute;
    bottom: -100px;
    border-radius: 50%;
    animation: float-up linear infinite;
    animation-delay: var(--start-delay, 0s);
    transform-origin: center center;
    left: var(--start-x, 50%);
    filter: blur(1px);
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* Header */
header {
    padding: 2.5rem 0;
    text-align: center;
    background-color: rgba(8, 8, 25, 0.4);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(89, 57, 206, 0.1), transparent);
    transform: translateX(-100%);
    animation: shine 5s infinite linear;
}

@keyframes shine {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

header h1 {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--text-color);
    text-shadow: 0 0 15px rgba(0, 230, 195, 0.6), 0 0 30px rgba(0, 230, 195, 0.3);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}

header h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-light));
    transform: translateX(-50%);
    border-radius: 3px;
}

/* Main Content */
main {
    flex-grow: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Player Section */
#player-section {
    margin-bottom: 2rem;
}

/* 添加流光和呼吸效果的卡片边框 */
@keyframes border-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* 移除RGB效果 */

@keyframes border-glow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(0, 230, 195, 0.4), 0 0 20px rgba(89, 57, 206, 0.2);
    }
    50% {
        box-shadow: 0 0 15px rgba(0, 230, 195, 0.7), 0 0 30px rgba(89, 57, 206, 0.4);
    }
}

@keyframes card-breath {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.01);
    }
}

.player-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    animation: border-glow 4s infinite ease-in-out, card-breath 8s infinite ease-in-out;
}

.player-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -2;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--accent-color-alt), var(--primary-light), var(--accent-color));
    background-size: 400% 400%;
    border-radius: var(--border-radius);
    animation: border-flow 8s infinite linear;
    opacity: 0.7;
}

.player-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(97, 69, 255, 0.15), transparent 70%);
    z-index: -1;
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background-color: var(--card-bg-hover);
}

/* Now Playing Section */
.now-playing {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 1rem;
    text-align: center;
}

@keyframes album-border-flow {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes album-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.15);
    }
    50% {
        transform: scale(1.01);
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.2);
    }
}

.album-art {
    width: 220px;
    height: 220px;
    min-width: 220px;
    background: linear-gradient(135deg, rgba(89, 57, 206, 0.3), rgba(0, 230, 195, 0.3));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
    animation: album-pulse 5s infinite ease-in-out;
}

/* 移除专辑封面的RGB流光效果，保持原始显示效果 */
.album-art::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
}

.album-art img.album-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    transition: transform 0.3s ease;
    /* 确保图片没有任何滤镜效果 */
    filter: none;
}

.album-art img.album-cover:hover {
    transform: scale(1.05);
}

.track-info-display {
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.now-playing-text {
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.now-playing-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    white-space: normal;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1.3;
    max-height: 5.2rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Player Controls */
.player-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

#audio-player {
    width: 100%;
    height: 50px;
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.1);
}

.playback-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.control-btn {
    background-color: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.control-btn::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, var(--accent-color), var(--primary-color), var(--accent-color-alt), var(--primary-light));
    background-size: 400% 400%;
    border-radius: 50%;
    z-index: -1;
    animation: border-flow 8s infinite linear;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.control-btn:hover {
    background-color: rgba(30, 30, 50, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.control-btn:hover::before {
    opacity: 0.8;
}

.control-btn.active {
    background-color: rgba(30, 30, 50, 0.8);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

.control-btn.active::before {
    opacity: 1;
}

.control-btn i {
    font-size: 1.2rem;
}

/* Upload Button */
.upload-container {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

/* 移除RGB按钮效果 */

.upload-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color-alt));
    color: white;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    box-shadow: 0 5px 15px rgba(97, 69, 255, 0.35);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.upload-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-color-alt), var(--accent-color));
    z-index: -1;
    transition: opacity var(--transition-speed) ease;
    opacity: 0;
}

.upload-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(97, 69, 255, 0.5);
}

.upload-button:hover::before {
    opacity: 1;
}

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

/* Playlist Section */
#playlist-section {
    flex-grow: 1;
}

.playlist-card {
    background-color: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 100%;
    max-height: 560px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-speed) ease;
    position: relative;
    animation: border-glow 4s infinite ease-in-out alternate-reverse, card-breath 7s infinite ease-in-out;
}

.playlist-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    z-index: -2;
    background: linear-gradient(90deg, var(--primary-light), var(--accent-color), var(--primary-color), var(--accent-color-alt), var(--primary-light));
    background-size: 400% 400%;
    border-radius: var(--border-radius);
    animation: border-flow 10s infinite linear;
    opacity: 0.7;
}

.playlist-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at bottom left, rgba(0, 230, 195, 0.15), transparent 70%);
    z-index: -1;
}

.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    background-color: var(--card-bg-hover);
}

.playlist-card h2 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    font-weight: 600;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.85rem;
    position: relative;
}

.playlist-card h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--accent-color));
    transform: translateX(-50%);
    border-radius: 3px;
}

#playlist-items {
    list-style-type: none;
    overflow-y: auto;
    flex-grow: 1;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) rgba(255, 255, 255, 0.1);
    padding-right: 10px;
}

#playlist-items::-webkit-scrollbar {
    width: 6px;
}

#playlist-items::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#playlist-items::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 3px;
}

#playlist-items li {
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    background-color: rgba(255, 255, 255, 0.07);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#playlist-items li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    transform: translateX(-100%);
    transition: transform var(--transition-speed) ease;
}

#playlist-items li:hover {
    background-color: rgba(89, 57, 206, 0.2);
    transform: translateX(3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

#playlist-items li:hover::before {
    transform: translateX(0);
}

#playlist-items li.active {
    background: linear-gradient(120deg, rgba(89, 57, 206, 0.6), rgba(0, 230, 195, 0.6));
    box-shadow: 0 5px 15px rgba(0, 230, 195, 0.25);
    transform: translateX(3px) scale(1.02);
}

#playlist-items li.active::before {
    transform: translateX(0);
    background: white;
}

/* Track info and download button */
.track-info {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    gap: 0.75rem;
}

.track-thumbnail {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 6px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(89, 57, 206, 0.2), rgba(0, 230, 195, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.track-thumbnail img.track-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.track-thumbnail i {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.6);
}

.track-details {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.track-artist {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.download-button {
    padding: 0.4rem 0.6rem;
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--text-color);
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all var(--transition-speed) ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    font-weight: 500;
}

.download-button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 230, 195, 0.3);
}

.download-button i {
    font-size: 1.1rem;
}

#playlist-items li.active .download-button {
    background-color: rgba(255, 255, 255, 0.25);
}

#playlist-items li.active .download-button:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Footer */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: rgba(8, 8, 25, 0.6);
    color: var(--text-secondary);
    margin-top: auto;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(to right, 
        transparent, 
        rgba(0, 230, 195, 0.5), 
        rgba(89, 57, 206, 0.5), 
        transparent
    );
}

/* Responsive Design */
@media (min-width: 768px) {
    main {
        flex-direction: row;
    }
    
    #player-section {
        width: 40%;
        margin-bottom: 0;
    }
    
    #playlist-section {
        width: 60%;
    }
}

@media (max-width: 767px) {
    header h1 {
        font-size: 2rem;
    }
    
    main {
        padding: 1.2rem;
    }
    
    .player-card, .playlist-card {
        padding: 1.5rem;
    }
    
    .now-playing {
        flex-direction: column;
        text-align: center;
    }
    
    .album-art {
        margin: 0 auto;
    }
} 