* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(145deg, #f6f7f9 0%, #e9edf2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #2c3e50;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.player-container {
    display: flex;
    gap: 30px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 30px;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
}

/* 搜索区域样式 */
.search-section {
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 16px;
    padding: 8px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box i {
    color: #94a3b8;
    font-size: 20px;
}

#playlist-input {
    flex: 1;
    border: none;
    background: none;
    padding: 10px;
    font-size: 15px;
    color: #1e293b;
}

#playlist-input::placeholder {
    color: #94a3b8;
}

#playlist-input:focus {
    outline: none;
}

#parse-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

#parse-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

/* 播放器主体样式 */
.player-main {
    flex: 1;
    min-width: 0;
}

.album-section {
    text-align: center;
    margin-bottom: 30px;
}

.album-cover {
    width: 260px;
    height: 260px;
    margin: 0 auto 20px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    position: relative;
}

.album-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.album-cover:hover img {
    transform: scale(1.05);
}

.song-info {
    margin-top: 20px;
}

.song-info h2 {
    font-size: 24px;
    color: #1e293b;
    margin-bottom: 8px;
}

.song-info p {
    font-size: 16px;
    color: #64748b;
}

/* 歌词区域样式 */
.lyrics-section {
    margin: 30px 0;
}

.lyrics-container {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 16px;
    padding: 20px;
    height: 120px;
    overflow: hidden;
    position: relative;
}

.lyrics-wrapper {
    height: 100%;
    overflow-y: auto;
    mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 20%, #000 80%, transparent 100%);
}

.lyrics-wrapper::-webkit-scrollbar {
    display: none; /* 隐藏滚动条 */
}

.lyrics-wrapper {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.lyrics-line {
    padding: 6px 0;
    text-align: center;
    color: #64748b;
    transition: all 0.3s ease;
}

.lyrics-line.active {
    color: #3b82f6;
    font-size: 1.1em;
    font-weight: 500;
}

/* 控制区域样式 */
.control-section {
    margin-top: 30px;
}

.progress-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.progress {
    flex: 1;
    height: 6px;
    background: rgba(203, 213, 225, 0.3);
    border-radius: 3px;
    cursor: pointer;
    position: relative;
}

.progress-current {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
}

#current-time, #duration {
    font-size: 14px;
    color: #64748b;
    min-width: 45px;
}

.controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.controls button {
    background: none;
    border: none;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.controls button:hover {
    background: rgba(255, 255, 255, 0.8);
}

.controls button i {
    font-size: 24px;
    color: #1e293b;
}

.controls #play-btn {
    width: 55px;
    height: 55px;
    background: #3b82f6;
}

.controls #play-btn i {
    color: white;
    font-size: 28px;
}

.controls #play-btn:hover {
    background: #2563eb;
    transform: scale(1.05);
}

/* 播放列表样式 */
.playlist-container {
    width: 320px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 20px;
}

.playlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.playlist-header h3 {
    font-size: 18px;
    color: #1e293b;
}

.song-count {
    font-size: 14px;
    color: #64748b;
}

.playlist {
    height: calc(100vh - 200px);
    max-height: 600px;
    overflow-y: auto;
}

.playlist::-webkit-scrollbar {
    width: 6px;
}

.playlist::-webkit-scrollbar-track {
    background: transparent;
}

.playlist::-webkit-scrollbar-thumb {
    background: rgba(203, 213, 225, 0.5);
    border-radius: 3px;
}

.playlist ul {
    list-style: none;
}

.playlist li {
    padding: 12px 15px;
    margin: 5px 0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.playlist li:hover {
    background: rgba(255, 255, 255, 0.8);
}

.playlist li.active {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.playlist li .song-index {
    font-size: 14px;
    color: #64748b;
    min-width: 28px;
}

.playlist li .song-details {
    flex: 1;
    min-width: 0;
}

.playlist li .song-name {
    font-size: 14px;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist li .song-artist {
    font-size: 12px;
    color: #64748b;
}

/* 响应式布局 */
@media (max-width: 1024px) {
    .player-container {
        max-width: 900px;
    }
    
    .album-cover {
        width: 220px;
        height: 220px;
    }
}

@media (max-width: 768px) {
    .player-container {
        flex-direction: column;
        padding: 20px;
    }
    
    .playlist-container {
        width: 100%;
        margin-top: 30px;
    }
    
    .album-cover {
        width: 200px;
        height: 200px;
    }
    
    .playlist {
        max-height: 300px;
    }
}

/* Toast 样式优化 */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.toast.success {
    border-left: 4px solid #10b981;
}

.toast.error {
    border-left: 4px solid #ef4444;
}

.toast.info {
    border-left: 4px solid #3b82f6;
}

.toast i {
    font-size: 20px;
}

.toast.success i { color: #10b981; }
.toast.error i { color: #ef4444; }
.toast.info i { color: #3b82f6; }

.toast-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    color: #64748b;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

.toast-hide {
    animation: slideOut 0.3s ease forwards;
}

/* 进度条预览 */
.progress-preview {
    position: absolute;
    top: -25px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
}

/* 加载动画 */
.loading {
    position: relative;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 欢迎提示样式 */
.welcome-tip {
    position: relative;
    margin-bottom: 20px;
    transform: translateY(10px);
    animation: slideDown 0.5s ease forwards;
}

.tip-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    backdrop-filter: blur(10px);
}

.tip-content i {
    font-size: 24px;
    color: #3b82f6;
}

.tip-content span {
    flex: 1;
    color: #1e293b;
    font-size: 15px;
}

.tip-close {
    background: none;
    border: none;
    color: #64748b;
    padding: 4px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.tip-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

.tip-close i {
    font-size: 20px;
    color: inherit;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-20px);
    }
}

/* 优化提示关闭动画 */
.welcome-tip.closing {
    animation: slideUp 0.3s ease forwards;
} 