/* 音乐应用：仿网易云主色 + 毛玻璃 */

#page-music.music-app-root,
#page-music {
    background: #1a1a1a;
}

#page-music .music-app-screen {
    background: linear-gradient(165deg, #2c1810 0%, #1a0f18 45%, #0d0d12 100%);
}

#page-music .music-app {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    color: rgba(255, 255, 255, 0.92);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', sans-serif;
}

.music-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: calc(env(safe-area-inset-top, 20px) + 6px) 12px 12px;
    flex-shrink: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.music-back {
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-app-title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.music-upload-btn {
    border: none;
    background: rgba(212, 60, 51, 0.9);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212, 60, 51, 0.35);
}

.music-tabs {
    display: flex;
    gap: 0;
    padding: 0 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.music-tab {
    flex: 1;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.45);
    padding: 12px 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
}

.music-tab.active {
    color: #fff;
}

.music-tab.active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 36px;
    height: 3px;
    border-radius: 2px;
    background: #d43c33;
}

.music-panel {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px 88px;
    -webkit-overflow-scrolling: touch;
}

.music-hint {
    font-size: 12px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
    margin: 0 0 12px;
}

.music-textarea-batch {
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 12px 14px;
    font-size: 13px;
    resize: vertical;
    min-height: 120px;
    margin-bottom: 10px;
}

.music-textarea-batch::placeholder {
    color: rgba(255, 255, 255, 0.28);
}

.music-btn-primary {
    border: none;
    background: linear-gradient(90deg, #e8554d, #d43c33);
    color: #fff;
    padding: 11px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
    box-shadow: 0 6px 20px rgba(212, 60, 51, 0.35);
}

.music-btn-block {
    max-width: none;
    margin-top: 14px;
}

.music-btn-ghost {
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    cursor: pointer;
    margin-left: 8px;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
}

.music-result-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.music-result-row {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.music-result-url {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.45);
    word-break: break-all;
    line-height: 1.4;
}

.music-result-title-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(0, 0, 0, 0.25);
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
}

.music-result-actions {
    display: flex;
    gap: 8px;
}

.music-btn-small {
    border: none;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.music-btn-play-staged {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.music-btn-fav-staged {
    background: rgba(212, 60, 51, 0.85);
    color: #fff;
}

.music-mine-settings {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.music-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
}

.music-mine-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.music-empty {
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 13px;
    padding: 32px 16px;
    margin: 0;
}

.music-mine-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    gap: 10px;
}

.music-mine-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
}

.music-mine-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 4px;
}

.music-mine-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.music-btn-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.music-mine-del {
    background: rgba(212, 60, 51, 0.35);
}

.music-mini-player {
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: 16px;
    z-index: 5;
}

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

.music-mini-title {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.music-mini-play {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #d43c33;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    flex-shrink: 0;
    margin-left: 12px;
    box-shadow: 0 4px 16px rgba(212, 60, 51, 0.45);
}

#page-music .screen.music-app-screen {
    position: relative;
}

/* 上传 / 歌词 弹窗 */
#page-music .music-modal.modal,
.music-modal.modal {
    z-index: 100060 !important;
    align-items: center;
    justify-content: center;
}

.music-modal-content {
    background: rgba(28, 28, 32, 0.92) !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    max-width: 340px !important;
    width: calc(100% - 32px) !important;
    border-radius: 20px !important;
}

.music-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.music-modal-head h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.music-modal-x {
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.music-upload-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.music-upload-tab {
    flex: 1;
    border: none;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.music-upload-tab.active {
    background: rgba(212, 60, 51, 0.35);
    color: #fff;
}

.music-field-label {
    display: block;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 6px;
    margin-top: 10px;
}

.music-field-label:first-of-type {
    margin-top: 0;
}

.music-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    padding: 11px 12px;
    font-size: 14px;
}

.music-file-input {
    width: 100%;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.music-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 14px;
}

.music-modal-actions .music-btn-primary {
    width: auto;
    max-width: none;
    padding: 10px 20px;
}

/* 全局悬浮歌词（对齐小手机屏幕顶部） */
.music-floating-lyrics {
    pointer-events: none;
    box-sizing: border-box;
    padding: 0 4px;
}

.music-floating-inner {
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin: 6px 8px 0;
    padding: 8px 10px 8px 14px;
    border-radius: 14px;
    min-height: 40px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

.music-floating-text {
    flex: 1;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    text-align: center;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.music-floating-close {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
