/* 音乐信息卡片样式 */
.music-card {
    background-color: #ffffffa6;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
}

.album-cover {
    width: 200px;
    height: 200px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* 唱片图片 */
.record-image {
    box-sizing: border-box;
    width: 200px;
    height: 200px;
    object-fit: cover;
    border-radius: 50%;
    transition: transform 0.3s ease;
    border: 5px solid #333;
}

/* 唱片旋转动画 */
@keyframes rotateRecord {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 播放时唱片旋转 */
.record-spinning.record-image {
    animation: rotateRecord 20s linear infinite;
}

/* 唱片中心 */
.record-center {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: white;
    border-radius: 50%;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.2);
    z-index: 1;
}

/* 专辑图上的播放按钮 */
.play-button-overlay {
    position: absolute;
    width: 56px;
    height: 56px;
    background-color: #4caf50b5;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.4);
    transition: all 0.3s ease;
    z-index: 2;
    opacity: 0.9;
    border: none;
    cursor: pointer;
}

.play-button-overlay:hover {
    background-color: #5D7494;
    transform: scale(1.05);
    opacity: 1;
}

.play-button-overlay svg {
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

.music-content {
    flex: 1;
    margin-left: 10px;
    height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.music-info {
    margin-top: 10px;
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.music-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-artist {
    font-size: 1rem;
    color: #666666;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 音频播放器样式 */
.audio-player {
    width: 100%;
    margin-bottom: 10px;
}

.progress-container {
    width: 100%;
    height: 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.progress-bar {
    height: 100%;
    background-color: #5D7494;
    border-radius: 3px;
    width: 0;
    position: relative;
}

.progress-handle {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #FF8C42;
    box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.progress-container:hover .progress-handle {
    opacity: 1;
}

.time-display {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #999999;
}

.player-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.control-button {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 50%;
}

.control-button:hover {
    background-color: #FFF5EB;
}

.play-button {
    width: 56px;
    height: 56px;
    background-color: #FF8C42;
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
    transition: all 0.3s ease;
}

.play-button:hover {
    background-color: #5D7494;
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.play-button svg {
    width: 24px;
    height: 24px;
    margin-left: 2px;
}

.control-button svg {
    width: 20px;
    height: 20px;
    color: #666666;
}

/* 歌词预览样式 */
.lyrics-section {
    background-color: #ffffffa6;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #333333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lyrics-container {
    height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem;
    border-radius: 1rem;
    background-color: #E4E4E4;
    text-align: center;
    scroll-behavior: smooth;
}

.lyrics-container::-webkit-scrollbar {
    width: 4px;
}

.lyrics-container::-webkit-scrollbar-track {
    background: transparent;
}

.lyrics-container::-webkit-scrollbar-thumb {
    background-color: #5D7494;
    border-radius: 2px;
}

.lyric-line {
    padding: 0.5rem 0;
    font-size: 0.95rem;
    color: #666666;
    transition: all 0.3s ease;
    line-height: 1.8;
}

.lyric-line.active {
    color: #5D7494;
    font-weight: 600;
    transform: scale(1.05);
}

/* 下载区域样式 */
.download-section {
    background-color: #ffffffa6;
    border-radius: 1.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.download-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.download-button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background-color: #E4E4E4;
    border: none;
    border-radius: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.download-button:hover {
    background-color: #5D7494;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px #5d749482;
}

.download-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.download-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 140, 66, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.download-button:hover .download-icon {
    background-color: rgba(255, 255, 255, 0.2);
}

.download-icon svg {
    width: 18px;
    height: 18px;
    color: #f44336;
    transition: all 0.3s ease;
}

.download-button:hover .download-icon svg {
    color: white;
}

.download-details {
    text-align: left;
}

.download-title {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.download-meta {
    font-size: 0.85rem;
    color: #999999;
    transition: all 0.3s ease;
}

.download-button:hover .download-meta {
    color: rgba(255, 255, 255, 0.8);
}

/* 加载状态样式 */
.loading-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666666;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #FF8C42;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 错误状态样式 */
.error-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #666666;
}

.error-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #FF8C42;
}

.error-text {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}


/* 响应式设计 */
@media (max-width: 768px) {
    .app-title {
        font-size: 2rem;
    }

    .app-subtitle {
        font-size: 1rem;
    }

    .music-card,
    .lyrics-section,
    .download-section {
        padding: 1.5rem;
    }

    /* 减小移动端专辑图大小 */
    .album-cover,
    .record-image {
        width: 100px;
        height: 100px;
    }

    .music-title {
        font-size: 1.3rem;
    }

    .music-artist {
        font-size: 0.9rem;
    }
    
    /* 修复移动端div溢出问题 */
    .music-info {
        display: block;
        overflow: hidden;
    }
    
    /* 为标题和艺术家设置容器，确保正确的溢出处理 */
    .music-title {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        max-width: 100%;
        margin-bottom: 5px;
    }
    
    .music-artist {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        display: block;
        max-width: 100%;
        margin-left: 0;
        margin-top: 0;
    }

    /* 调整移动端播放按钮大小 */
    .play-button-overlay {
        width: 45px;
        height: 45px;
    }

    .play-button-overlay svg {
        width: 20px;
        height: 20px;
    }

    .control-button svg {
        width: 18px;
        height: 18px;
    }
    
    /* 调整音乐内容区域高度与唱片一致 */
    .music-content {
        height: 120px;
    }
}

@media (max-width: 480px) {
    /* 进一步减小移动设备专辑图大小 */
    .album-cover {
        width: 100px;
        height: 100px;
    }

    .music-title {
        font-size: 1.2rem;
    }

    .music-artist {
        font-size: 0.85rem;
    }

    .music-meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .download-info {
        gap: 0.75rem;
    }

    .download-icon {
        width: 32px;
        height: 32px;
    }

    /* 调整小屏幕播放按钮大小 */
    .play-button-overlay {
        width: 38px;
        height: 38px;
    }

    .play-button-overlay svg {
        width: 18px;
        height: 18px;
    }
    
    /* 调整音乐内容区域高度与唱片一致 */
    .music-content {
        height: 100px;
    }
}

/* 小加载动画 */
.loading-spinner-small {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255, 140, 66, 0.3);
    border-top: 2px solid #FF8C42;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

 /* 弹窗样式 */
.share-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.share-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    overflow: hidden;
}

.share-modal-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.close-share-modal-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal-body {
    padding: 24px;
    text-align: center;
}

.qrcode-container {
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}

.qrcode-image {
    max-width: 100%;
    height: auto;
    max-height: 300px;
}

.qrcode-text {
    margin: 0;
    font-size: 16px;
    color: #333;
}