.music-player {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 1500;
    transition: all var(--transition-normal);
}

.music-player-content {
    background: var(--glass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    -moz-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.1),
        inset 0 -1px 1px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    width: 320px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--transition-normal);
}

.music-player-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: var(--radius-xl);
    padding: 1px;
    background: var(--glass-border-gradient);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 1;
    opacity: 0.8;
}

.music-player-content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.12) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.music-player.active .music-player-content {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.music-player:hover .music-player-content {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.08),
        inset 0 1px 1px rgba(255, 255, 255, 0.15),
        inset 0 -1px 1px rgba(0, 0, 0, 0.08),
        var(--glass-outer-glow);
}

.music-cover-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 
        0 4px 16px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.music-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.music-player.playing .music-cover {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.music-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 100%
    );
    pointer-events: none;
}

.music-info {
    text-align: center;
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.music-title-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 4px;
}

.music-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 180px;
}

.music-vip-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border-radius: 4px;
    text-shadow: none;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.4);
}

.music-trial-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    text-shadow: none;
    flex-shrink: 0;
    backdrop-filter: blur(4px);
}

.music-artist {
    font-size: 13px;
    color: var(--text-secondary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.music-progress-wrapper {
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

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

.music-progress-bar.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.music-progress-bar.disabled:hover .music-progress-handle {
    opacity: 0;
}

.music-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 2px;
    width: 0%;
    transition: width 0.1s linear;
    position: relative;
    overflow: visible;
}

.music-progress-handle {
    position: absolute;
    top: 50%;
    right: -6px;
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.music-progress-bar:hover .music-progress-handle {
    opacity: 1;
}

.music-time {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-tertiary);
}

.music-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    z-index: 2;
}

.music-btn {
    background: var(--glass-bg);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.music-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.1) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.music-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(113, 112, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.music-btn:active::after {
    width: 60px;
    height: 60px;
}

.music-btn-small {
    width: 36px;
    height: 36px;
    font-size: 12px;
}

.music-btn-play {
    width: 48px;
    height: 48px;
    font-size: 16px;
    background: linear-gradient(135deg, var(--primary-bg), var(--primary));
    color: white;
    border: none;
    box-shadow: 
        0 4px 16px rgba(113, 112, 255, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.music-btn:active {
    transform: scale(0.95);
    background: var(--glass-bg-active);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.music-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.music-btn-play:hover {
    transform: scale(1.05);
    box-shadow: 
        0 8px 24px rgba(113, 112, 255, 0.35),
        0 0 40px rgba(113, 112, 255, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.music-btn-play:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 8px rgba(113, 112, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.music-btn-small:hover {
    background: var(--glass-bg-hover);
    border-color: rgba(113, 112, 255, 0.3);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 
        0 4px 12px rgba(113, 112, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.music-volume-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.music-volume-slider {
    width: 0;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    margin-left: 0;
    opacity: 0;
    transition: all var(--transition-fast);
    position: relative;
    overflow: visible;
}

.music-volume-wrapper:hover .music-volume-slider {
    width: 80px;
    margin-left: 8px;
    opacity: 1;
}

.music-volume-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-hover));
    border-radius: 2px;
    width: 70%;
    position: relative;
}

.music-volume-handle {
    position: absolute;
    top: 50%;
    right: -5px;
    width: 10px;
    height: 10px;
    background: white;
    border-radius: 50%;
    transform: translateY(-50%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.music-volume-slider:hover .music-volume-handle {
    opacity: 1;
}

.music-toggle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-bg), var(--primary));
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    color: white;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 24px rgba(113, 112, 255, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: all var(--transition-normal);
    overflow: hidden;
}

.music-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.2) 0%,
        transparent 100%
    );
    pointer-events: none;
}

.music-toggle::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

.music-toggle:active::after {
    width: 80px;
    height: 80px;
}

.music-toggle:hover {
    transform: scale(1.05);
    box-shadow: 
        0 12px 32px rgba(113, 112, 255, 0.4),
        0 0 40px rgba(113, 112, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.music-toggle:active {
    transform: scale(0.95);
    box-shadow: 
        0 2px 8px rgba(113, 112, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.music-toggle:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.music-player.active .music-toggle {
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
}

.light .music-player-content {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 1px rgba(255, 255, 255, 0.8),
        inset 0 -1px 1px rgba(0, 0, 0, 0.05);
}

.light .music-player:hover .music-player-content {
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.6),
        inset 0 1px 1px rgba(255, 255, 255, 0.9),
        inset 0 -1px 1px rgba(0, 0, 0, 0.08);
}

.light .music-trial-badge {
    color: rgba(0, 0, 0, 0.7);
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .music-player {
        right: 16px;
        bottom: 16px;
    }
    
    .music-player-content {
        width: calc(100vw - 32px);
        max-width: 320px;
    }
    
    .music-toggle {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .music-player {
        right: 12px;
        bottom: 12px;
    }
    
    .music-player-content {
        width: calc(100vw - 24px);
        padding: 16px;
    }
    
    .music-cover-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .music-title {
        font-size: 14px;
    }
    
    .music-artist {
        font-size: 12px;
    }
    
    .music-btn-play {
        width: 44px;
        height: 44px;
    }
    
    .music-btn-small {
        width: 32px;
        height: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .music-player.playing .music-cover {
        animation: none;
    }
    
    .music-player,
    .music-player-content,
    .music-btn,
    .music-toggle {
        transition: none;
    }
}

.music-btn-together {
    position: relative;
}

.music-btn-together.connected {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.5));
    border-color: rgba(34, 197, 94, 0.4);
    box-shadow: 
        0 2px 8px rgba(34, 197, 94, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.music-btn-together.connected:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.4), rgba(34, 197, 94, 0.6));
    border-color: rgba(34, 197, 94, 0.5);
    box-shadow: 
        0 4px 12px rgba(34, 197, 94, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.15);
    color: #4ade80;
}

.music-btn-together.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.music-btn-together.disabled:hover {
    transform: none;
    background: var(--glass-bg);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

@keyframes together-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

.music-btn-together.connected {
    animation: together-pulse 2s ease-in-out infinite;
}

.listen-together-status-bar {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 12px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    position: relative;
    z-index: 2;
}

.listen-together-status-bar.visible {
    display: flex;
}

.together-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-tertiary);
    transition: all var(--transition-fast);
}

.together-status-dot.connecting {
    background: #facc15;
    animation: dot-pulse 1s ease-in-out infinite;
}

.together-status-dot.connected {
    background: #4ade80;
}

.together-status-dot.error {
    background: #f87171;
}

@keyframes dot-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.together-status-text {
    font-size: 12px;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.together-status-text.connecting {
    color: #facc15;
}

.together-status-text.connected {
    color: #4ade80;
}

.together-status-text.error {
    color: #f87171;
}

.together-progress-section {
    margin-top: 12px;
    padding: 0 4px;
}

.together-progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 6px;
    cursor: not-allowed;
    position: relative;
}

.together-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
}

.together-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, oklch(0.60 0.14 250), #a855f7);
    border-radius: 2px;
    transition: width 0.3s ease;
    width: 0%;
}

.together-progress-time {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
}

.together-lyrics-section {
    display: none;
    margin-top: 12px;
    position: relative;
    z-index: 2;
}

.together-lyrics-section.visible {
    display: block;
}

.together-current-lyric {
    padding: 12px 16px;
    background: linear-gradient(to right, rgba(236, 72, 153, 0.1), transparent);
    border-left: 3px solid #ec4899;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: 12px;
}

.together-current-lyric .lyric-label {
    font-size: 11px;
    color: #f472b6;
    font-weight: 500;
    display: block;
    margin-bottom: 6px;
}

.together-current-lyric .lyric-text {
    font-size: 15px;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.5;
    font-weight: 500;
}

.together-lyrics-container {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.together-lyrics-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    font-size: 12px;
    color: var(--text-tertiary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.lyrics-toggle-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.lyrics-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.together-lyrics-list {
    max-height: 120px;
    overflow-y: auto;
    padding: 8px 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.together-lyrics-list::-webkit-scrollbar {
    width: 4px;
}

.together-lyrics-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.together-lyrics-list.expanded {
    max-height: 200px;
}

.lyric-line {
    font-size: 13px;
    color: var(--text-tertiary);
    padding: 6px 0;
    text-align: center;
    transition: all 0.3s ease;
    line-height: 1.6;
}

.lyric-line.active {
    color: var(--text-primary);
    transform: scale(1.05);
    font-weight: 500;
}

.lyric-line.active::before {
    content: '♪ ';
    color: #ec4899;
}

.light .together-current-lyric {
    background: linear-gradient(to right, rgba(236, 72, 153, 0.15), transparent);
}

.light .together-progress-bar {
    background: rgba(0, 0, 0, 0.1);
}

.light .together-progress-time {
    color: rgba(0, 0, 0, 0.5);
}

.light .together-lyrics-container {
    background: rgba(0, 0, 0, 0.03);
}

.light .together-lyrics-header {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
