/* 音乐 App 专用样式 */

.music-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(240, 240, 240, 0.95) 100%);
    color: #333;
    overflow: hidden;
    position: relative;
}

.music-app-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    filter: blur(40px) brightness(0.8);
    opacity: 0.3;
    z-index: 0;
    transition: background-image 0.5s ease;
}

.music-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
}

/* 顶部栏 */
.music-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.music-back-btn {
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    margin: -10px;
}

.music-header-title {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    flex: 1;
}

.music-edit-btn {
    padding: 8px;
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.music-edit-btn:active {
    color: #333;
}

.music-edit-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: #f5f5f5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.music-select-all {
    font-size: 14px;
    color: #333;
    cursor: pointer;
    padding: 6px 12px;
}

.music-delete-selected {
    font-size: 14px;
    color: #ff4444;
    cursor: pointer;
    padding: 6px 12px;
}

.music-playlist-track-item.selected {
    background: rgba(0, 0, 0, 0.03);
}

.music-track-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.music-track-checkbox.checked {
    background: #333;
    border-color: #333;
}

.music-track-checkbox.checked::after {
    content: '✓';
    color: white;
    font-size: 12px;
}

.music-playlist-cover-edit {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.music-cover-preview {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-top: 8px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.music-cover-preview:active {
    transform: scale(0.95);
}

.music-cover-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-cover-preview .music-default-icon {
    font-size: 40px;
}

/* 用户信息 */
.music-user-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255,255,255,0.8);
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.music-user-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 15px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.music-user-avatar:active {
    transform: scale(0.95);
}

.music-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-user-icon {
    font-size: 32px;
}

.music-user-details {
    text-align: center;
}

.music-user-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
}

.music-user-name:hover {
    text-decoration-color: #333;
}

.music-user-bio {
    font-size: 14px;
    color: #999;
    max-width: 200px;
    cursor: pointer;
    text-decoration: underline;
    text-decoration-color: transparent;
    transition: text-decoration-color 0.2s ease;
}

.music-user-bio:hover {
    text-decoration-color: #999;
}

/* 播放主界面 */
.music-player-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-bottom: 40px;
}

.music-cover-wrapper {
    width: 240px;
    height: 240px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    overflow: hidden;
    margin-bottom: 40px;
    background-color: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.music-cover-wrapper:active {
    transform: scale(0.98);
}

.music-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-default-icon {
    font-size: 80px;
    color: #ccc;
}

.music-info-group {
    margin-bottom: 40px;
}

.music-main-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
    color: #222;
}

.music-main-artist {
    font-size: 16px;
    color: #888;
}

/* 进度条 */
.music-progress-container {
    width: 100%;
    margin-bottom: 40px;
}

.music-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(0,0,0,0.05);
    border-radius: 2px;
    position: relative;
    cursor: pointer;
}

.music-progress-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    background: #333;
    border-radius: 2px;
    width: 0%;
}

.music-time-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
    margin-top: 8px;
}

/* 控制按钮 */
.music-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.music-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.music-btn:active {
    transform: scale(0.9);
    opacity: 0.7;
}

.btn-play-pause {
    width: 64px;
    height: 64px;
    background: #333;
    color: white;
    border-radius: 50%;
}

.btn-play-pause svg {
    width: 32px;
    height: 32px;
}

.btn-mode {
    color: #666;
}

.btn-mode.active {
    color: #333;
}

.btn-playlist {
    color: #666;
}

/* 列表抽屉 */
.music-playlist-drawer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: white;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.1);
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 25;
    display: flex;
    flex-direction: column;
}

.music-playlist-drawer.active {
    transform: translateY(0);
}

.playlist-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.playlist-tabs {
    display: flex;
    gap: 15px;
}

.playlist-tab {
    padding: 5px 10px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.playlist-tab.active {
    color: #333;
    border-bottom-color: #07c160;
}

.playlist-title {
    font-weight: bold;
}

.playlist-close {
    padding: 5px;
    cursor: pointer;
}

.playlist-drawer-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.playlist-tab-content {
    display: none;
    flex: 1;
    overflow: hidden;
}

.playlist-tab-content.active {
    display: flex;
    flex-direction: column;
}

.playlist-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.playlist-item {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: background 0.2s;
}

.playlist-item:active {
    background: #f5f5f5;
}

.playlist-item.active {
    background: #f9f9f9;
}

.playlist-item.active .playlist-item-title {
    color: #333;
    font-weight: 600;
}

.playlist-item-info {
    flex: 1;
}

.playlist-item-title {
    font-size: 15px;
    margin-bottom: 4px;
}

.playlist-item-artist {
    font-size: 13px;
    color: #999;
}

/* 我的音乐页面样式 */
.music-my-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding-right: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.music-my-content::-webkit-scrollbar {
    display: none;
}

.music-my-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
}

.music-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.music-stat-num {
    font-size: 32px;
    font-weight: bold;
    color: #333;
}

.music-stat-label {
    font-size: 12px;
    color: #999;
}

.music-my-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
}

.music-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: rgba(255,255,255,0.8);
    border: none;
    border-radius: 12px;
    font-size: 12px;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.music-action-btn:active {
    transform: scale(0.98);
    background: #f0f0f0;
}

/* 歌单部分 */
.music-playlists-section {
    margin-bottom: 25px;
}

.section-header {
    margin-bottom: 15px;
}

.section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.music-playlists-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.music-playlist-card {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.8);
    border-radius: 16px;
    padding: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.music-playlist-card:active {
    transform: scale(0.98);
}

.music-playlist-cover {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-right: 15px;
}

.music-playlist-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-playlist-info {
    flex: 1;
}

.music-playlist-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.music-playlist-count {
    font-size: 13px;
    color: #999;
}

.music-play-btn {
    width: 40px;
    height: 40px;
    background: #333;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
}

.music-playlist-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.music-edit-btn-small {
    width: 32px;
    height: 32px;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.music-edit-btn-small:active {
    color: #333;
}

/* 底部导航栏 */
.music-nav-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 15px 0;
    background: rgba(255,255,255,0.95);
    border-top: 1px solid rgba(0,0,0,0.05);
    z-index: 20;
}

.music-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
}

.music-nav-item.active {
    color: #333;
}

.music-nav-item span {
    font-size: 12px;
}

.music-nav-item svg {
    width: 24px;
    height: 24px;
}

/* 内部弹窗样式 */
.music-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.music-modal.active {
    opacity: 1;
    visibility: visible;
}

.music-modal-content {
    background: white;
    border-radius: 16px;
    width: 85%;
    max-width: 320px;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.music-modal.active .music-modal-content {
    transform: scale(1);
}

.music-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.music-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.music-modal-close {
    font-size: 18px;
    color: #999;
    cursor: pointer;
    padding: 4px;
}

.music-modal-body {
    padding: 20px;
}

.music-modal-field {
    margin-bottom: 16px;
}

.music-modal-field:last-child {
    margin-bottom: 0;
}

.music-modal-field label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.music-modal-field input,
.music-modal-field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    resize: none;
}

.music-modal-field input:focus,
.music-modal-field textarea:focus {
    outline: none;
    border-color: #333;
}

.music-modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.music-modal-btn {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.music-modal-btn.cancel {
    background: #f5f5f5;
    color: #666;
}

.music-modal-btn.cancel:active {
    background: #eee;
}

.music-modal-btn.confirm {
    background: #333;
    color: white;
}

.music-modal-btn.confirm:active {
    background: #555;
}

.music-modal-btn.delete {
    background: #ff4444;
    color: white;
}

.music-modal-btn.delete:active {
    background: #cc0000;
}

/* 歌单详情页样式 */
.music-playlist-detail-header {
    display: flex;
    align-items: center;
    padding: 20px;
    gap: 16px;
}

.music-playlist-detail-cover {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.music-playlist-detail-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-playlist-detail-cover .music-default-icon {
    font-size: 40px;
}

.music-playlist-detail-info h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.music-playlist-detail-info p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.music-playlist-tracks {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px 100px 20px;
}

.music-playlist-tracks::-webkit-scrollbar {
    display: none;
}

.music-playlist-track-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background 0.2s ease;
}

.music-playlist-track-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.music-track-index {
    width: 30px;
    font-size: 14px;
    color: #999;
    text-align: center;
    margin-right: 12px;
}

.music-track-info {
    flex: 1;
    min-width: 0;
}

.music-track-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-artist {
    font-size: 12px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-track-duration {
    font-size: 12px;
    color: #999;
    margin-left: 12px;
}



.import-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.import-input:focus {
    outline: none;
    border-color: #333;
}

.import-input::placeholder {
    color: #bbb;
}

/* 一起听歌功能样式 */
.music-together-listen {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.music-together-avatars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.music-together-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.music-together-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.music-together-avatar .music-user-icon {
    font-size: 24px;
}

.music-together-waveform {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    width: 60px;
    height: 40px;
    padding: 0 8px;
}

.music-waveform-line {
    width: 3px;
    background: linear-gradient(to top, #666, #999);
    border-radius: 2px;
    animation: waveform-pulse 1s ease-in-out infinite;
}

.music-waveform-line:nth-child(1) { height: 40%; animation-delay: 0s; }
.music-waveform-line:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.music-waveform-line:nth-child(3) { height: 50%; animation-delay: 0.2s; }
.music-waveform-line:nth-child(4) { height: 90%; animation-delay: 0.3s; }
.music-waveform-line:nth-child(5) { height: 60%; animation-delay: 0.4s; }
.music-waveform-line:nth-child(6) { height: 80%; animation-delay: 0.5s; }
.music-waveform-line:nth-child(7) { height: 45%; animation-delay: 0.6s; }
.music-waveform-line:nth-child(8) { height: 65%; animation-delay: 0.7s; }
.music-waveform-line:nth-child(9) { height: 35%; animation-delay: 0.8s; }

@keyframes waveform-pulse {
    0%, 100% { transform: scaleY(0.5); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.music-together-duration {
    margin-top: 10px;
    font-size: 12px;
    color: #999;
}

/* 联系人选择模态框样式 */
.contact-selection-body {
    max-height: 400px;
    overflow-y: auto;
}

.contact-selection-group {
    margin-bottom: 20px;
}

.contact-selection-group-title {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
    padding-left: 10px;
}

.contact-selection-group-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.contact-selection-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-selection-item:hover {
    background: #f0f0f0;
}

.contact-selection-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-size: cover;
    background-position: center;
    margin-right: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.contact-selection-name {
    font-size: 14px;
    color: #333;
    flex: 1;
}

.contact-selection-empty {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

/* 导入选项弹窗 */
.music-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 19999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.music-modal.active {
    opacity: 1;
    visibility: visible;
}

.music-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80vh;
    overflow-y: auto;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.music-modal.active .music-modal-content {
    transform: translateY(0);
}

.music-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.music-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.music-modal-close {
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s ease;
}

.music-modal-close:hover {
    color: #333;
}

.music-modal-body {
    padding: 20px;
}

.import-options-section,
.import-playlist-section,
.import-notes-section {
    margin-bottom: 24px;
}

.import-options-section h3,
.import-playlist-section h3,
.import-notes-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 12px;
}

.import-option-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.import-option-btn:hover {
    background: #e8e8e8;
}

.import-option-btn svg {
    margin-right: 10px;
    color: #333;
}

.import-option-btn span {
    font-size: 14px;
    color: #333;
}

.playlist-option-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    margin-bottom: 8px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    color: #333;
}

.playlist-option-btn:hover {
    background: #e8e8e8;
}

.playlist-option-btn.selected {
    border-color: #333;
    background: #f0f0f0;
}

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

.import-notes li {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.4;
}

.import-notes li::before {
    content: '•';
    margin-right: 8px;
    color: #999;
}
